libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::Systems::ConfigDataBlock Class Reference

#include <Peer.h>

Public Member Functions

 ConfigDataBlock ()
 
 ConfigDataBlock (ConfigDataBlock const &rhs)
 
virtual ~ConfigDataBlock ()
 
ConfigDataBlockoperator= (const ConfigDataBlock &rhs)
 
void lock () noexcept
 Locks the internal binary data vector so one can work with a reference to it externally. More...
 
void unlock () noexcept
 Unlocks the internal binary data vector. More...
 
std::vector< uint8_t >::size_type getBinaryDataSize () noexcept
 Returns the size of the data vector. More...
 
std::vector< uint8_t > getBinaryData () noexcept
 Returns a copy of the data vector. More...
 
std::vector< uint8_t > & getBinaryDataReference () noexcept
 Returns a reference to the data vector. More...
 
void setBinaryData (std::vector< uint8_t > &value) noexcept
 Sets the internal binary data vector to "value". More...
 
bool equals (std::vector< uint8_t > &value) noexcept
 Compares the passed vector with the internal one. More...
 

Public Attributes

uint64_t databaseId = 0
 The id of this parameter in the database. More...
 

Constructor & Destructor Documentation

§ ConfigDataBlock() [1/2]

BaseLib::Systems::ConfigDataBlock::ConfigDataBlock ( )
inline

§ ConfigDataBlock() [2/2]

BaseLib::Systems::ConfigDataBlock::ConfigDataBlock ( ConfigDataBlock const &  rhs)

§ ~ConfigDataBlock()

virtual BaseLib::Systems::ConfigDataBlock::~ConfigDataBlock ( )
inlinevirtual

Member Function Documentation

§ equals()

bool BaseLib::Systems::ConfigDataBlock::equals ( std::vector< uint8_t > &  value)
noexcept

Compares the passed vector with the internal one.

This method is thread safe.

Returns
Returns "true" if both vectors are equal. "false" otherwise.

§ getBinaryData()

std::vector< uint8_t > BaseLib::Systems::ConfigDataBlock::getBinaryData ( )
noexcept

Returns a copy of the data vector.

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Returns
Returns a copy of the internal binary data vector.

§ getBinaryDataReference()

std::vector< uint8_t > & BaseLib::Systems::ConfigDataBlock::getBinaryDataReference ( )
noexcept

Returns a reference to the data vector.

Call "lock()" before executing this method and "unlock()" when you're done working with the reference.

Returns
Returns a reference to the internal binary data vector.

§ getBinaryDataSize()

std::vector< uint8_t >::size_type BaseLib::Systems::ConfigDataBlock::getBinaryDataSize ( )
noexcept

Returns the size of the data vector.

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Returns
Returns the size of the internal binary data vector.

§ lock()

void BaseLib::Systems::ConfigDataBlock::lock ( )
noexcept

Locks the internal binary data vector so one can work with a reference to it externally.

§ operator=()

ConfigDataBlock & BaseLib::Systems::ConfigDataBlock::operator= ( const ConfigDataBlock rhs)

§ setBinaryData()

void BaseLib::Systems::ConfigDataBlock::setBinaryData ( std::vector< uint8_t > &  value)
noexcept

Sets the internal binary data vector to "value".

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Parameters
valueThe new data vector.

§ unlock()

void BaseLib::Systems::ConfigDataBlock::unlock ( )
noexcept

Unlocks the internal binary data vector.

Member Data Documentation

§ databaseId

uint64_t BaseLib::Systems::ConfigDataBlock::databaseId = 0

The id of this parameter in the database.


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