Kanzi Connect  3.9.9
Kanzi Connect C++ API
kanzi::connect::RuntimeStreamContentDataObject Class Reference

Wraps a protobuffer object. More...

#include <runtime_stream.hpp>

Public Member Functions

RuntimeStreamContentDataObject addChild ()
 Insert a child object. More...
 
int childCount () const
 Retrieves amount of childs. More...
 
void freeObject ()
 Retrieve wrapped content data object. More...
 
RuntimeStreamContentDataList getChilds ()
 Retrieves a childs. More...
 
uint32_t getHash () const
 Retrieve the hash. More...
 
const string & getName () const
 Retrieve name. More...
 
int32_t getType () const
 Retrieve the type. More...
 
bool getValueBool () const
 Retrieve boolean value. More...
 
int getValueInt () const
 Retrieve int value. More...
 
double getValueReal () const
 Retrieve real value. More...
 
const string & getValueString () const
 Retrieve string value. More...
 
bool hasSelf () const
 Is the self structure defined. More...
 
bool identifiedByHash () const
 Checks whether this object is identified by hash or by name. More...
 
void reset ()
 clears the contents. More...
 
 RuntimeStreamContentDataObject (ContentDataObject *object, bool takeOwnership=true)
 C++ constructor. More...
 
string serializeToString ()
 Serializes the object to string. More...
 
void setHash (uint32_t hash)
 Set hash. More...
 
void setName (const string &name)
 Set name. More...
 
void setType (int32_t type)
 Sets type. More...
 
void setValueBool (bool value)
 Set bool value. More...
 
void setValueInt (int32_t value)
 Set int value. More...
 
void setValueReal (double value)
 Set real value. More...
 
void setValueString (const string &value)
 Set string value. More...
 
bool valid () const
 Checks is the object valid and whether it holds a valid pointer. More...
 
virtual ~RuntimeStreamContentDataObject ()
 C++ destructor. More...
 

Static Public Member Functions

static RuntimeStreamContentDataObject create ()
 Creates object. More...
 
static RuntimeStreamContentDataObject parseFromString (const string &stream)
 Parses a stream and creates an object that contains the tree. More...
 

Detailed Description

Wraps a protobuffer object.

Constructor & Destructor Documentation

◆ RuntimeStreamContentDataObject()

kanzi::connect::RuntimeStreamContentDataObject::RuntimeStreamContentDataObject ( ContentDataObject *  object,
bool  takeOwnership = true 
)
inline

C++ constructor.

Parameters
objectobject to wrap.

◆ ~RuntimeStreamContentDataObject()

virtual kanzi::connect::RuntimeStreamContentDataObject::~RuntimeStreamContentDataObject ( )
virtual

C++ destructor.

Member Function Documentation

◆ addChild()

RuntimeStreamContentDataObject kanzi::connect::RuntimeStreamContentDataObject::addChild ( )

Insert a child object.

Returns
wrapped child object.

◆ childCount()

int kanzi::connect::RuntimeStreamContentDataObject::childCount ( ) const

Retrieves amount of childs.

Returns
size

◆ create()

static RuntimeStreamContentDataObject kanzi::connect::RuntimeStreamContentDataObject::create ( )
static

Creates object.

This allocates a new wrapped object which is owned by the returned instance.

Returns
newly created object.

◆ freeObject()

void kanzi::connect::RuntimeStreamContentDataObject::freeObject ( )

Retrieve wrapped content data object.

◆ getChilds()

RuntimeStreamContentDataList kanzi::connect::RuntimeStreamContentDataObject::getChilds ( )

Retrieves a childs.

Returns
the list referring to childs.

◆ getHash()

uint32_t kanzi::connect::RuntimeStreamContentDataObject::getHash ( ) const

Retrieve the hash.

Returns
hash code.

◆ getName()

const string& kanzi::connect::RuntimeStreamContentDataObject::getName ( ) const

Retrieve name.

Returns
name.

◆ getType()

int32_t kanzi::connect::RuntimeStreamContentDataObject::getType ( ) const

Retrieve the type.

Returns
type

◆ getValueBool()

bool kanzi::connect::RuntimeStreamContentDataObject::getValueBool ( ) const

Retrieve boolean value.

Returns
boolean value.

◆ getValueInt()

int kanzi::connect::RuntimeStreamContentDataObject::getValueInt ( ) const

Retrieve int value.

Returns
integer value.

◆ getValueReal()

double kanzi::connect::RuntimeStreamContentDataObject::getValueReal ( ) const

Retrieve real value.

Returns
real value.

◆ getValueString()

const string& kanzi::connect::RuntimeStreamContentDataObject::getValueString ( ) const

Retrieve string value.

Returns
string value.

◆ hasSelf()

bool kanzi::connect::RuntimeStreamContentDataObject::hasSelf ( ) const

Is the self structure defined.

Returns
true if self defined.

◆ identifiedByHash()

bool kanzi::connect::RuntimeStreamContentDataObject::identifiedByHash ( ) const

Checks whether this object is identified by hash or by name.

Returns
true if identified by hash, otherwise object is identified by name

◆ parseFromString()

static RuntimeStreamContentDataObject kanzi::connect::RuntimeStreamContentDataObject::parseFromString ( const string &  stream)
static

Parses a stream and creates an object that contains the tree.

Method can fail and thus after calling it should be checked that the object is valid.

if (object.valid()) {
// work with object
}
Parameters
streamthe stream to input
Returns
true

◆ reset()

void kanzi::connect::RuntimeStreamContentDataObject::reset ( )

clears the contents.

◆ serializeToString()

string kanzi::connect::RuntimeStreamContentDataObject::serializeToString ( )

Serializes the object to string.

Returns
object-tree serialized as string

◆ setHash()

void kanzi::connect::RuntimeStreamContentDataObject::setHash ( uint32_t  hash)

Set hash.

Parameters
setsthe hash.

◆ setName()

void kanzi::connect::RuntimeStreamContentDataObject::setName ( const string &  name)

Set name.

Parameters
namethe name

◆ setType()

void kanzi::connect::RuntimeStreamContentDataObject::setType ( int32_t  type)

Sets type.

Parameters
typethe type.

◆ setValueBool()

void kanzi::connect::RuntimeStreamContentDataObject::setValueBool ( bool  value)

Set bool value.

Parameters
valuevalue to set

◆ setValueInt()

void kanzi::connect::RuntimeStreamContentDataObject::setValueInt ( int32_t  value)

Set int value.

Parameters
valuevalue to set

◆ setValueReal()

void kanzi::connect::RuntimeStreamContentDataObject::setValueReal ( double  value)

Set real value.

Parameters
valuevalue to set

◆ setValueString()

void kanzi::connect::RuntimeStreamContentDataObject::setValueString ( const string &  value)

Set string value.

Parameters
valuevalue to set

◆ valid()

bool kanzi::connect::RuntimeStreamContentDataObject::valid ( ) const

Checks is the object valid and whether it holds a valid pointer.

Returns
true if valid.

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