![]() |
Blue Brain BioExplorer
|
#include <PropertyMap.h>
Public Member Functions | |
PropertyMap ()=default | |
PropertyMap (const std::string &name) | |
PropertyMap (const PropertyMap &other)=default | |
PropertyMap (PropertyMap &&other) noexcept | |
PropertyMap & | operator= (PropertyMap other) noexcept |
bool | empty () const |
const auto & | getName () const |
template<typename T > | |
void | updateProperty (const std::string &name, const T &t) |
void | setProperty (const Property &newProperty) |
template<typename T > | |
T | getProperty (const std::string &name, T valIfNotFound) const |
template<typename T > | |
T | getProperty (const std::string &name) const |
bool | hasProperty (const std::string &name) const |
const auto & | getEnums (const std::string &name) const |
Property::Type | getPropertyType (const std::string &name) const |
const auto & | getMetaData (const std::string &name) const |
const auto & | getProperties () const |
void | merge (const PropertyMap &input) |
void | update (const PropertyMap &input) |
bool | parse (int argc, const char **argv) |
Container class for holding properties that are mapped by name to a supported C++ type and their respective value.
Definition at line 262 of file PropertyMap.h.
|
default |
|
inline |
Definition at line 266 of file PropertyMap.h.
|
default |
|
inlinenoexcept |
Definition at line 275 of file PropertyMap.h.
|
inline |
Definition at line 288 of file PropertyMap.h.
|
inline |
Definition at line 349 of file PropertyMap.h.
|
inline |
Definition at line 365 of file PropertyMap.h.
|
inline |
Definition at line 293 of file PropertyMap.h.
|
inline |
Definition at line 373 of file PropertyMap.h.
|
inline |
std::runtime_error | if value property value was not found. |
Definition at line 335 of file PropertyMap.h.
|
inline |
Definition at line 323 of file PropertyMap.h.
|
inline |
Definition at line 357 of file PropertyMap.h.
|
inline |
Definition at line 343 of file PropertyMap.h.
void core::PropertyMap::merge | ( | const PropertyMap & | input | ) |
Merge this property map with properties from another.
std::runtime | error if a property with the same name but incompatible types is found in both maps. |
Definition at line 256 of file PropertyMap.cpp.
|
inlinenoexcept |
Definition at line 281 of file PropertyMap.h.
bool core::PropertyMap::parse | ( | int | argc, |
const char ** | argv | ||
) |
Parse and fill values from the commandline.
Options are added by converting the camelCase property name to hyphenated-case.
Integer enums are handled by matching the string to int value from the index in the enums vector of the property.
argc | number of commandline arguments |
argv | list of strings of commandline arguments |
Definition at line 278 of file PropertyMap.cpp.
|
inline |
Update or add the given property.
Definition at line 307 of file PropertyMap.h.
void core::PropertyMap::update | ( | const PropertyMap & | input | ) |
Take the values from another property map only for properties that are known and compatible to this one.
std::runtime | error if a property with the same name but incompatible types is found in both maps. |
Definition at line 269 of file PropertyMap.cpp.
|
inline |
Update the property of the given name
Definition at line 296 of file PropertyMap.h.