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

#include "UIDNamePair.h"

Inheritance diagram for ot::UIDNamePair:
ot::Serializable

Public Member Functions

 UIDNamePair ()
 
 UIDNamePair (UID _uid, const std::string &_name)
 
 UIDNamePair (const ConstJsonObject &_jsonObject)
 
 UIDNamePair (const UIDNamePair &_other)
 
virtual ~UIDNamePair ()
 
UIDNamePairoperator= (const UIDNamePair &_other)
 
bool operator== (const UIDNamePair &_other) const
 
bool operator!= (const UIDNamePair &_other) const
 
virtual void addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
void setUid (ot::UID _uid)
 
ot::UID getUid (void) const
 
void setName (const std::string &_name)
 
const std::string & getName (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0
 Add the object contents to the provided JSON object.
 

Constructor & Destructor Documentation

◆ UIDNamePair() [1/4]

ot::UIDNamePair::UIDNamePair ( )

◆ UIDNamePair() [2/4]

ot::UIDNamePair::UIDNamePair ( UID _uid,
const std::string & _name )

◆ UIDNamePair() [3/4]

ot::UIDNamePair::UIDNamePair ( const ConstJsonObject & _jsonObject)

◆ UIDNamePair() [4/4]

ot::UIDNamePair::UIDNamePair ( const UIDNamePair & _other)

◆ ~UIDNamePair()

ot::UIDNamePair::~UIDNamePair ( )
virtual

Member Function Documentation

◆ addToJsonObject()

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

Add the object contents to the provided JSON object.

Parameters
_documentThe JSON document (used to get the allocator).
_objectThe JSON object to add the contents to.

◆ getName()

const std::string & ot::UIDNamePair::getName ( void ) const
inline

◆ getUid()

ot::UID ot::UIDNamePair::getUid ( void ) const
inline

◆ operator!=()

bool ot::UIDNamePair::operator!= ( const UIDNamePair & _other) const

◆ operator=()

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

◆ operator==()

bool ot::UIDNamePair::operator== ( const UIDNamePair & _other) const

◆ setFromJsonObject()

void ot::UIDNamePair::setFromJsonObject ( const 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.

◆ setName()

void ot::UIDNamePair::setName ( const std::string & _name)
inline

◆ setUid()

void ot::UIDNamePair::setUid ( ot::UID _uid)
inline

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