OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::PropertyGridCfg Class Reference

#include "PropertyGridCfg.h"

Inheritance diagram for ot::PropertyGridCfg:
ot::Serializable

Public Member Functions

 PropertyGridCfg ()
 
 PropertyGridCfg (const PropertyGridCfg &_other)
 
virtual ~PropertyGridCfg ()
 
PropertyGridCfgoperator= (const PropertyGridCfg &_other)
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ot::ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
void mergeWith (const PropertyGridCfg &_other, bool _replaceExistingProperties)
 Adds the contents of the other configuration to this configuration.
 
void setRootGroups (const std::list< PropertyGroup * > &_groups)
 
void addRootGroup (PropertyGroup *_group)
 
const std::list< PropertyGroup * > & getRootGroups (void) const
 
PropertyGroupfindGroup (const std::string &_name, bool _searchChildGroups=false) const
 
PropertyGroupfindOrCreateGroup (const std::string &_name, bool _searchChildGroups=false)
 
std::list< Property * > getAllProperties (void) const
 Returns all properties of all groups and nested groups.
 
std::list< Property * > findPropertiesBySpecialType (const std::string &_specialType) const
 
PropertyfindPropertyByPath (const std::string &_path, char _delimiter='/') const
 Returns the property at the given path.
 
PropertyfindPropertyByPath (std::list< std::string > _path) const
 Returns the property at the given path. The path contains the group names from root to the item. The last path entry must be the property name.
 
bool isEmpty (void) const
 Returns false if at least one property exists in any of the groups and its child groups.
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Constructor & Destructor Documentation

◆ PropertyGridCfg() [1/2]

ot::PropertyGridCfg::PropertyGridCfg ( )

◆ PropertyGridCfg() [2/2]

ot::PropertyGridCfg::PropertyGridCfg ( const PropertyGridCfg & _other)

◆ ~PropertyGridCfg()

ot::PropertyGridCfg::~PropertyGridCfg ( )
virtual

Member Function Documentation

◆ addRootGroup()

void ot::PropertyGridCfg::addRootGroup ( PropertyGroup * _group)

◆ addToJsonObject()

void ot::PropertyGridCfg::addToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference
_allocatorAllocator

Implements ot::Serializable.

◆ findGroup()

ot::PropertyGroup * ot::PropertyGridCfg::findGroup ( const std::string & _name,
bool _searchChildGroups = false ) const

◆ findOrCreateGroup()

ot::PropertyGroup * ot::PropertyGridCfg::findOrCreateGroup ( const std::string & _name,
bool _searchChildGroups = false )

◆ findPropertiesBySpecialType()

std::list< ot::Property * > ot::PropertyGridCfg::findPropertiesBySpecialType ( const std::string & _specialType) const

◆ findPropertyByPath() [1/2]

ot::Property * ot::PropertyGridCfg::findPropertyByPath ( const std::string & _path,
char _delimiter = '/' ) const

Returns the property at the given path.

See also
Property* findPropertyByPath(const std::list<std::string>& _path)

◆ findPropertyByPath() [2/2]

ot::Property * ot::PropertyGridCfg::findPropertyByPath ( std::list< std::string > _path) const

Returns the property at the given path. The path contains the group names from root to the item. The last path entry must be the property name.

◆ getAllProperties()

std::list< ot::Property * > ot::PropertyGridCfg::getAllProperties ( void ) const

Returns all properties of all groups and nested groups.

◆ getRootGroups()

const std::list< PropertyGroup * > & ot::PropertyGridCfg::getRootGroups ( void ) const
inline

◆ isEmpty()

bool ot::PropertyGridCfg::isEmpty ( void ) const

Returns false if at least one property exists in any of the groups and its child groups.

◆ mergeWith()

void ot::PropertyGridCfg::mergeWith ( const PropertyGridCfg & _other,
bool _replaceExistingProperties )

Adds the contents of the other configuration to this configuration.

Parameters
_otherOther configuration to merge into this.
_replaceExistingPropertiesIf enabled existing properties will be replaced with their corresponding property in the other group. Note that the property type may change if the other group contains a different property type.

◆ operator=()

ot::PropertyGridCfg & ot::PropertyGridCfg::operator= ( const PropertyGridCfg & _other)

◆ setFromJsonObject()

void ot::PropertyGridCfg::setFromJsonObject ( const ot::ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setRootGroups()

void ot::PropertyGridCfg::setRootGroups ( const std::list< PropertyGroup * > & _groups)

The documentation for this class was generated from the following files: