YARP
Yet Another Robot Platform
yarp::os::impl::Storable Class Referenceabstract

A single item in a Bottle. More...

#include <yarp/os/impl/Storable.h>

+ Inheritance diagram for yarp::os::impl::Storable:

Detailed Description

A single item in a Bottle.

This extends the public yarp::os::Value interface with some implementation-specific details.

Definition at line 46 of file Storable.h.

Public Member Functions

virtual ~Storable ()
 Destructor. More...
 
virtual StorablecreateStorable () const =0
 Factory method. More...
 
virtual StorablecloneStorable () const
 Typed synonym for clone() More...
 
virtual void copy (const Storable &alt)=0
 Become a copy of the passed item. More...
 
bool operator== (const yarp::os::Value &alt) const
 
virtual yarp::os::Valuecreate () const override
 Create a new value of the same type. More...
 
virtual yarp::os::Valueclone () const override
 Create a copy of the value. More...
 
virtual bool read (ConnectionReader &connection) override
 Read this object from a network connection. More...
 
virtual bool write (ConnectionWriter &connection) const override
 Write this object to a network connection. More...
 
virtual bool readRaw (ConnectionReader &connection)=0
 
virtual bool writeRaw (ConnectionWriter &connection) const =0
 
virtual bool isBool () const override
 Checks if value is a boolean. More...
 
virtual bool asBool () const override
 Get boolean value. More...
 
virtual bool isInt8 () const override
 Checks if value is a 8-bit integer. More...
 
virtual std::int8_t asInt8 () const override
 Get 8-bit integer value. More...
 
virtual bool isInt16 () const override
 Checks if value is a 16-bit integer. More...
 
virtual std::int16_t asInt16 () const override
 Get 16-bit integer value. More...
 
virtual bool isInt32 () const override
 Checks if value is a 32-bit integer. More...
 
virtual std::int32_t asInt32 () const override
 Get 32-bit integer value. More...
 
virtual bool isInt64 () const override
 Checks if value is a 64-bit integer. More...
 
virtual std::int64_t asInt64 () const override
 Get 64-bit integer value. More...
 
virtual bool isFloat32 () const override
 Checks if value is a 32-bit floating point number. More...
 
virtual yarp::conf::float32_t asFloat32 () const override
 Get 32-bit floating point value. More...
 
virtual bool isFloat64 () const override
 Checks if value is a 64-bit floating point number. More...
 
virtual yarp::conf::float64_t asFloat64 () const override
 Get 64-bit floating point value. More...
 
virtual bool isString () const override
 Checks if value is a string. More...
 
virtual std::string asString () const override
 Get string value. More...
 
virtual bool isList () const override
 Checks if value is a list. More...
 
virtual yarp::os::BottleasList () const override
 Get list value. More...
 
virtual bool isDict () const override
 Checks if value is a dictionary. More...
 
virtual yarp::os::PropertyasDict () const override
 Get dictionary (hash table) value. More...
 
virtual bool isVocab () const override
 Checks if value is a vocabulary identifier. More...
 
virtual std::int32_t asVocab () const override
 Get vocabulary identifier as an integer. More...
 
virtual bool isBlob () const override
 Checks if value is a binary object. More...
 
virtual const char * asBlob () const override
 Get binary data value. More...
 
virtual size_t asBlobLength () const override
 Get binary data length. More...
 
virtual bool isNull () const override
 Checks if the object is invalid. More...
 
virtual SearchableasSearchable () const override
 Get dictionary or list value. More...
 
virtual bool check (const std::string &key) const override
 Check if there exists a property of the given name. More...
 
virtual yarp::os::Valuefind (const std::string &key) const override
 Gets a value corresponding to a given keyword. More...
 
virtual yarp::os::BottlefindGroup (const std::string &key) const override
 Gets a list corresponding to a given keyword. More...
 
virtual void fromString (const std::string &src)=0
 Initialize from a string representation, assuming that any syntax around this representation such as braces or parentheses has already been consumed. More...
 
virtual void fromStringNested (const std::string &src)
 Initialize from a string representation. More...
 
virtual std::string toString () const override=0
 Return a standard text representation of the content of the object. More...
 
virtual std::string toStringNested () const
 Create string representation, including any syntax that should wrap it such as braces or parentheses. More...
 
virtual std::int32_t subCode () const
 Return a code describing this item, used in serializing bottles. More...
 
virtual bool isLeaf () const override
 
- Public Member Functions inherited from yarp::os::Value
 Value ()
 Construct a list Value. More...
 
 Value (std::int32_t x, bool isVocab=false)
 Construct an integer Value. More...
 
 Value (yarp::conf::float64_t x)
 Construct a floating point Value. More...
 
 Value (const std::string &str, bool isVocab=false)
 Construct a string Value. More...
 
 Value (void *data, int length)
 Construct a binary data Value. More...
 
 Value (const Value &alt)
 Copy constructor. More...
 
const Valueoperator= (const Value &alt)
 Assignment operator. More...
 
virtual ~Value ()
 Destructor. More...
 
virtual bool isInt () const final
 Checks if value is an integer. More...
 
virtual bool isDouble () const final
 Checks if value is a floating point number. More...
 
virtual int asInt () const final
 Get integer value. More...
 
virtual double asDouble () const final
 Get floating point value. More...
 
bool operator== (const Value &alt) const
 Equality test. More...
 
bool operator!= (const Value &alt) const
 Inequality test. More...
 
void fromString (const char *str)
 Set value to correspond to a textual representation. More...
 
std::string toString () const override
 Return a standard text representation of the content of the object. More...
 
virtual std::int32_t getCode () const
 Get standard type code of value. More...
 
- Public Member Functions inherited from yarp::os::Portable
virtual Type getType () const
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. More...
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations. More...
 
virtual yarp::os::Type getWriteType () const
 
- Public Member Functions inherited from yarp::os::Searchable
 Searchable ()
 Default constructor. More...
 
virtual ~Searchable ()
 Destructor. More...
 
virtual bool check (const std::string &key, const std::string &comment) const
 Check if there exists a property of the given name. More...
 
BottlefindGroup (const std::string &key, const std::string &comment) const
 Gets a list corresponding to a given keyword. More...
 
virtual bool check (const std::string &key, Value *&result, const std::string &comment="") const
 Gets a value corresponding to a given keyword. More...
 
virtual Value check (const std::string &key, const Value &fallback, const std::string &comment="") const
 Gets a value corresponding to a given keyword. More...
 

Static Public Member Functions

static StorablecreateByCode (std::int32_t id)
 
- Static Public Member Functions inherited from yarp::os::Value
static ValuemakeInt (int x)
 Create an integer Value. More...
 
static ValuemakeInt8 (std::int8_t x)
 Create a 8-bit integer Value. More...
 
static ValuemakeInt16 (std::int16_t x)
 Create a 16-bit integer Value. More...
 
static ValuemakeInt32 (std::int32_t x)
 Create a 32-bit integer Value. More...
 
static ValuemakeInt64 (std::int64_t x)
 Create a 64-bit integer Value. More...
 
static ValuemakeDouble (double x)
 Create a floating point Value. More...
 
static ValuemakeFloat32 (yarp::conf::float32_t x)
 Create a 32-bit floating point Value. More...
 
static ValuemakeFloat64 (yarp::conf::float64_t x)
 Create a 64-bit floating point Value. More...
 
static ValuemakeString (const std::string &str)
 Create a string Value. More...
 
static ValuemakeVocab (std::int32_t v)
 Create a vocabulary identifier Value. More...
 
static ValuemakeVocab (const std::string &str)
 Create a vocabulary identifier Value. More...
 
static ValuemakeBlob (void *data, int length)
 Create a Value containing binary data. More...
 
static ValuemakeList ()
 Create a list Value. More...
 
static ValuemakeList (const char *txt)
 Create a list Value and initialize it. More...
 
static ValuemakeValue (const std::string &txt)
 Create a Value from a text description. More...
 
static ValuegetNullValue ()
 Return an invalid, "null" Value. More...
 
- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading. More...
 

Constructor & Destructor Documentation

◆ ~Storable()

Storable::~Storable ( )
virtualdefault

Destructor.

Member Function Documentation

◆ asBlob()

virtual const char* yarp::os::impl::Storable::asBlob ( ) const
inlineoverridevirtual

Get binary data value.

Returns
pointer to binary data if value is indeed binary data. Otherwise returns nullptr

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreBlob.

Definition at line 123 of file Storable.h.

◆ asBlobLength()

virtual size_t yarp::os::impl::Storable::asBlobLength ( ) const
inlineoverridevirtual

Get binary data length.

Returns
length of binary data if value is indeed binary data. Otherwise returns 0

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreBlob.

Definition at line 124 of file Storable.h.

◆ asBool()

virtual bool yarp::os::impl::Storable::asBool ( ) const
inlineoverridevirtual

Get boolean value.

Returns
boolean value if value is indeed a boolean. If it is another type, the appropriate cast value is returned. Otherwise returns false.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 90 of file Storable.h.

◆ asDict()

virtual yarp::os::Property* yarp::os::impl::Storable::asDict ( ) const
inlineoverridevirtual

Get dictionary (hash table) value.

Returns
pointer to dictionary if value is indeed of the right type. Otherwise returns nullptr

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreDict.

Definition at line 117 of file Storable.h.

◆ asFloat32()

virtual yarp::conf::float32_t yarp::os::impl::Storable::asFloat32 ( ) const
inlineoverridevirtual

Get 32-bit floating point value.

Returns
floating point value if value is indeed a 32-bit floating point. If it is another numeric type, the appropriate cast value is returned. Otherwise returns 0.
Warning
This method performs casts if the Value is not a Float32 value, therefore it might lead to unexpected behaviours if the type is not properly checked.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab, yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 105 of file Storable.h.

◆ asFloat64()

virtual yarp::conf::float64_t yarp::os::impl::Storable::asFloat64 ( ) const
inlineoverridevirtual

Get 64-bit floating point value.

Returns
floating point value if value is indeed a 64-bit floating point. If it is another numeric type, the appropriate cast value is returned. Otherwise returns 0.
Warning
This method performs casts if the Value is not a Float32 value, therefore it might lead to unexpected behaviours if the type is not properly checked.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab, yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 108 of file Storable.h.

◆ asInt16()

virtual std::int16_t yarp::os::impl::Storable::asInt16 ( ) const
inlineoverridevirtual

Get 16-bit integer value.

Returns
16-bit integer value if value is indeed an integer. If it is another numeric type, the appropriate cast value is returned. Otherwise returns 0.
Warning
This method performs casts if the Value is not a Float32 value, therefore it might lead to unexpected behaviours if the type is not properly checked.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 96 of file Storable.h.

◆ asInt32()

virtual std::int32_t yarp::os::impl::Storable::asInt32 ( ) const
inlineoverridevirtual

Get 32-bit integer value.

Returns
32-bit integer value if value is indeed an integer. If it is another numeric type, the appropriate cast value is returned. Otherwise returns 0.
Warning
This method performs casts if the Value is not a Float32 value, therefore it might lead to unexpected behaviours if the type is not properly checked.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab, yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 99 of file Storable.h.

◆ asInt64()

virtual std::int64_t yarp::os::impl::Storable::asInt64 ( ) const
inlineoverridevirtual

Get 64-bit integer value.

Returns
64-bit integer value if value is indeed an integer. If it is another numeric type, the appropriate cast value is returned. Otherwise returns 0.
Warning
This method performs casts if the Value is not a Float32 value, therefore it might lead to unexpected behaviours if the type is not properly checked.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab, yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 102 of file Storable.h.

◆ asInt8()

virtual std::int8_t yarp::os::impl::Storable::asInt8 ( ) const
inlineoverridevirtual

Get 8-bit integer value.

Returns
8-bit integer value if value is indeed an integer. If it is another numeric type, the appropriate cast value is returned. Otherwise returns 0.
Warning
This method performs casts if the Value is not a Float32 value, therefore it might lead to unexpected behaviours if the type is not properly checked.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 93 of file Storable.h.

◆ asList()

virtual yarp::os::Bottle* yarp::os::impl::Storable::asList ( ) const
inlineoverridevirtual

Get list value.

Returns
pointer to list if value is indeed a list. Otherwise returns nullptr

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreList.

Definition at line 114 of file Storable.h.

◆ asSearchable()

virtual Searchable* yarp::os::impl::Storable::asSearchable ( ) const
inlineoverridevirtual

Get dictionary or list value.

Returns
pointer to dictionary or list value if present. Otherwise returns nullptr

Reimplemented from yarp::os::Value.

Definition at line 129 of file Storable.h.

◆ asString()

virtual std::string yarp::os::impl::Storable::asString ( ) const
inlineoverridevirtual

Get string value.

Returns
string value if value is indeed a string. Otherwise returns empty string.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreString, and yarp::os::impl::StoreVocab.

Definition at line 111 of file Storable.h.

◆ asVocab()

virtual std::int32_t yarp::os::impl::Storable::asVocab ( ) const
inlineoverridevirtual

Get vocabulary identifier as an integer.

Returns
integer value of vocabulary identifier.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreString, yarp::os::impl::StoreVocab, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, and yarp::os::impl::StoreInt8.

Definition at line 120 of file Storable.h.

◆ check()

bool Storable::check ( const std::string &  key) const
overridevirtual

Check if there exists a property of the given name.

Parameters
keythe name to check for
Returns
true iff a property of the given name exists, even if it doesn't have a value associated with it

Reimplemented from yarp::os::Value.

Definition at line 197 of file Storable.cpp.

◆ clone()

virtual yarp::os::Value* yarp::os::impl::Storable::clone ( ) const
inlineoverridevirtual

Create a copy of the value.

Returns
the new value, which will equal this.

Reimplemented from yarp::os::Value.

Definition at line 78 of file Storable.h.

◆ cloneStorable()

virtual Storable* yarp::os::impl::Storable::cloneStorable ( ) const
inlinevirtual

Typed synonym for clone()

Definition at line 62 of file Storable.h.

◆ copy()

◆ create()

virtual yarp::os::Value* yarp::os::impl::Storable::create ( ) const
inlineoverridevirtual

Create a new value of the same type.

Returns
the new value.

Reimplemented from yarp::os::Value.

Definition at line 77 of file Storable.h.

◆ createByCode()

Storable * Storable::createByCode ( std::int32_t  id)
static

Definition at line 129 of file Storable.cpp.

◆ createStorable()

◆ find()

Value & Storable::find ( const std::string &  key) const
overridevirtual

Gets a value corresponding to a given keyword.

Parameters
keyThe keyword to look for
Returns
A value corresponding to a given keyword. If there is no such value, then the isNull() method called on the result will be true. Otherwise, the value can be read by calling result.asInt32(), result.asString(), etc. as appropriate.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreDict, and yarp::os::impl::StoreList.

Definition at line 185 of file Storable.cpp.

◆ findGroup()

Bottle & Storable::findGroup ( const std::string &  key) const
overridevirtual

Gets a list corresponding to a given keyword.

Parameters
keyThe keyword to look for
Returns
A list corresponding to a given keyword. If there is no such list, then the isNull() method called on the result will be true. Otherwise, the elements of the list can be read through result.get(index) where result.get(0) is the keyword, and result.get(i) for i>=1 are the "real" elements of the list.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreDict, and yarp::os::impl::StoreList.

Definition at line 191 of file Storable.cpp.

◆ fromString()

virtual void yarp::os::impl::Storable::fromString ( const std::string &  src)
pure virtual

◆ fromStringNested()

virtual void yarp::os::impl::Storable::fromStringNested ( const std::string &  src)
inlinevirtual

Initialize from a string representation.

This should consume any syntax around that representation such as braces or parentheses.

Reimplemented in yarp::os::impl::StoreDict, yarp::os::impl::StoreList, yarp::os::impl::StoreBlob, yarp::os::impl::StoreString, and yarp::os::impl::StoreVocab.

Definition at line 155 of file Storable.h.

◆ isBlob()

virtual bool yarp::os::impl::Storable::isBlob ( ) const
inlineoverridevirtual

Checks if value is a binary object.

If so, asBlob() and asBlobLength() will return it.

Returns
true iff value is a binary object.

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreBlob.

Definition at line 122 of file Storable.h.

◆ isBool()

virtual bool yarp::os::impl::Storable::isBool ( ) const
inlineoverridevirtual

Checks if value is a boolean.

If so, asBool() will return that boolean.

Returns
true iff value is a boolean

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab.

Definition at line 89 of file Storable.h.

◆ isDict()

virtual bool yarp::os::impl::Storable::isDict ( ) const
inlineoverridevirtual

Checks if value is a dictionary.

If so, asDict() will return that dictionary.

Returns
true iff value is a dictionary

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreDict.

Definition at line 116 of file Storable.h.

◆ isFloat32()

virtual bool yarp::os::impl::Storable::isFloat32 ( ) const
inlineoverridevirtual

Checks if value is a 32-bit floating point number.

If so, asFloat32() will return that number.

Returns
true iff value is a 32-bit floating point number

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreFloat32.

Definition at line 104 of file Storable.h.

◆ isFloat64()

virtual bool yarp::os::impl::Storable::isFloat64 ( ) const
inlineoverridevirtual

Checks if value is a 64-bit floating point number.

If so, asFloat64() will return that number.

Returns
true iff value is a 64-bit floating point number

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreFloat64.

Definition at line 107 of file Storable.h.

◆ isInt16()

virtual bool yarp::os::impl::Storable::isInt16 ( ) const
inlineoverridevirtual

Checks if value is a 16-bit integer.

If so, asInt16() will return that integer.

Returns
true iff value is a 16-bit integer

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreInt16.

Definition at line 95 of file Storable.h.

◆ isInt32()

virtual bool yarp::os::impl::Storable::isInt32 ( ) const
inlineoverridevirtual

Checks if value is a 32-bit integer.

If so, asInt32() will return that integer.

Returns
true iff value is a 32-bit integer

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreInt32.

Definition at line 98 of file Storable.h.

◆ isInt64()

virtual bool yarp::os::impl::Storable::isInt64 ( ) const
inlineoverridevirtual

Checks if value is a 64-bit integer.

If so, asInt64() will return that integer.

Returns
true iff value is a 64-bit integer

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreInt64.

Definition at line 101 of file Storable.h.

◆ isInt8()

virtual bool yarp::os::impl::Storable::isInt8 ( ) const
inlineoverridevirtual

Checks if value is a 8-bit integer.

If so, asInt8() will return that integer.

Returns
true iff value is a 8-bit integer

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreInt8.

Definition at line 92 of file Storable.h.

◆ isLeaf()

virtual bool yarp::os::impl::Storable::isLeaf ( ) const
inlineoverridevirtual

Reimplemented from yarp::os::Value.

Definition at line 168 of file Storable.h.

◆ isList()

virtual bool yarp::os::impl::Storable::isList ( ) const
inlineoverridevirtual

Checks if value is a list.

If so, asList() will return that list.

Returns
true iff value is a list

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreList.

Definition at line 113 of file Storable.h.

◆ isNull()

virtual bool yarp::os::impl::Storable::isNull ( ) const
inlineoverridevirtual

Checks if the object is invalid.

Returns
True if the object is invalid or "null".

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreNull.

Definition at line 126 of file Storable.h.

◆ isString()

virtual bool yarp::os::impl::Storable::isString ( ) const
inlineoverridevirtual

Checks if value is a string.

If so, asString() will return that string.

Returns
true iff value is a string

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreString.

Definition at line 110 of file Storable.h.

◆ isVocab()

virtual bool yarp::os::impl::Storable::isVocab ( ) const
inlineoverridevirtual

Checks if value is a vocabulary identifier.

If so, asVocab() will return it.

Returns
true iff value is a vocabulary identifier

Reimplemented from yarp::os::Value.

Reimplemented in yarp::os::impl::StoreVocab.

Definition at line 119 of file Storable.h.

◆ operator==()

bool Storable::operator== ( const yarp::os::Value alt) const

Definition at line 207 of file Storable.cpp.

◆ read()

bool Storable::read ( ConnectionReader reader)
overridevirtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Reimplemented from yarp::os::Value.

Definition at line 213 of file Storable.cpp.

◆ readRaw()

◆ subCode()

virtual std::int32_t yarp::os::impl::Storable::subCode ( ) const
inlinevirtual

Return a code describing this item, used in serializing bottles.

Reimplemented in yarp::os::impl::StoreList.

Definition at line 166 of file Storable.h.

◆ toString()

virtual std::string yarp::os::impl::Storable::toString ( ) const
overridepure virtual

Return a standard text representation of the content of the object.

The representation is readable by the Bottle and Property classes.

Returns
A standard text representation of the content of the object.

Implements yarp::os::Searchable.

Implemented in yarp::os::impl::StoreDict, yarp::os::impl::StoreList, yarp::os::impl::StoreBlob, yarp::os::impl::StoreString, yarp::os::impl::StoreVocab, yarp::os::impl::StoreFloat64, yarp::os::impl::StoreFloat32, yarp::os::impl::StoreInt64, yarp::os::impl::StoreInt32, yarp::os::impl::StoreInt16, yarp::os::impl::StoreInt8, and yarp::os::impl::StoreNull.

◆ toStringNested()

virtual std::string yarp::os::impl::Storable::toStringNested ( ) const
inlinevirtual

Create string representation, including any syntax that should wrap it such as braces or parentheses.

Reimplemented in yarp::os::impl::StoreDict, yarp::os::impl::StoreList, yarp::os::impl::StoreBlob, yarp::os::impl::StoreString, and yarp::os::impl::StoreVocab.

Definition at line 161 of file Storable.h.

◆ write()

bool Storable::write ( ConnectionWriter writer) const
overridevirtual

Write this object to a network connection.

Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write

Parameters
writeran interface to the network connection for writing
Returns
true iff the object is successfully written

Reimplemented from yarp::os::Value.

Definition at line 222 of file Storable.cpp.

◆ writeRaw()


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