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

The ManagedPropertyObject class is a basic wrapper for the use of the PropertyManager. A PropertyManager instance is accessable trough a regular and a const getter methods. More...

#include "ManagedPropertyObject.h"

+ Inheritance diagram for ot::ManagedPropertyObject:

Public Member Functions

 ManagedPropertyObject (PropertyManager *_propertyManager=(PropertyManager *) nullptr)
 Constructor.
 
 ManagedPropertyObject (ManagedPropertyObject &&_other) noexcept
 Move constructor.
 
virtual ~ManagedPropertyObject ()
 Destructor.
 
ManagedPropertyObjectoperator= (ManagedPropertyObject &&_other) noexcept
 Assignment move operator.
 
void addPropertiesToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const
 Serialize the properties into the provided JSON object.
 
void setPropertiesFromJsonObject (const ot::ConstJsonObject &_object)
 Serialize the properties into the provided JSON object.
 
void setPropertyManager (PropertyManager *_manager)
 Replace the current property manager.
 
PropertyManagergetPropertyManager (void) const
 Get the property manager that holds all properties.
 
PropertyfindProperty (const std::string &_groupName, const std::string &_valueName)
 Finds a property by group and name.
 
const PropertyfindProperty (const std::string &_groupName, const std::string &_valueName) const
 Finds a property by group and name.
 
- Public Member Functions inherited from ot::PropertyManagerNotifier
 PropertyManagerNotifier ()
 
 PropertyManagerNotifier (const PropertyManagerNotifier &_other)
 
 PropertyManagerNotifier (PropertyManagerNotifier &&_other) noexcept
 
virtual ~PropertyManagerNotifier ()
 
PropertyManagerNotifieroperator= (const PropertyManagerNotifier &_other)
 
PropertyManagerNotifieroperator= (PropertyManagerNotifier &&_other) noexcept
 
virtual void propertyHasChanged (const ot::Property *_property)
 

Detailed Description

The ManagedPropertyObject class is a basic wrapper for the use of the PropertyManager. A PropertyManager instance is accessable trough a regular and a const getter methods.

Constructor & Destructor Documentation

◆ ManagedPropertyObject() [1/2]

ot::ManagedPropertyObject::ManagedPropertyObject ( PropertyManager * _propertyManager = (PropertyManager*)nullptr)

Constructor.

Parameters
_propertyManagerProperty manager to use. May be null.

◆ ManagedPropertyObject() [2/2]

ot::ManagedPropertyObject::ManagedPropertyObject ( ManagedPropertyObject && _other)
noexcept

Move constructor.

Parameters
_otherOther object to move data from.

◆ ~ManagedPropertyObject()

virtual ot::ManagedPropertyObject::~ManagedPropertyObject ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ addPropertiesToJsonObject()

void ot::ManagedPropertyObject::addPropertiesToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const

Serialize the properties into the provided JSON object.

Parameters
_objectJSON object to write the properties into.
_allocatorJSON allocator to use.

◆ findProperty() [1/2]

ot::Property * ot::ManagedPropertyObject::findProperty ( const std::string & _groupName,
const std::string & _valueName )

Finds a property by group and name.

Parameters
_groupNameThe property group name.
_valueNameThe property value name.
Returns
Pointer to the found Property, or nullptr if not found.

◆ findProperty() [2/2]

const ot::Property * ot::ManagedPropertyObject::findProperty ( const std::string & _groupName,
const std::string & _valueName ) const

Finds a property by group and name.

Parameters
_groupNameThe property group name.
_valueNameThe property value name.
Returns
Pointer to the found Property, or nullptr if not found.

◆ getPropertyManager()

PropertyManager * ot::ManagedPropertyObject::getPropertyManager ( void ) const
inline

Get the property manager that holds all properties.

◆ operator=()

ot::ManagedPropertyObject & ot::ManagedPropertyObject::operator= ( ManagedPropertyObject && _other)
noexcept

Assignment move operator.

Parameters
_otherOther object to move data from.
Returns
Reference to this object.

◆ setPropertiesFromJsonObject()

void ot::ManagedPropertyObject::setPropertiesFromJsonObject ( const ot::ConstJsonObject & _object)

Serialize the properties into the provided JSON object.

Parameters
_objectJSON object to read the properties from.

◆ setPropertyManager()

void ot::ManagedPropertyObject::setPropertyManager ( PropertyManager * _manager)
inline

Replace the current property manager.

Parameters
_managerManager to set.

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