YARP  2.3.70.1
Yet Another Robot Platform
yarp::os::impl::StoreList Class Reference

A nested list of items. More...

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

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

Public Member Functions

 StoreList ()
 
yarp::os::Bottleinternal ()
 
virtual ConstString toString () const override
 Return a standard text representation of the content of the object. More...
 
virtual void fromString (const ConstString &src) override
 Initialize from a string representation, assuming that any syntax around this representation such as braces or parentheses has already been consumed. More...
 
virtual ConstString toStringNested () const override
 Create string representation, including any syntax that should wrap it such as braces or parentheses. More...
 
virtual void fromStringNested (const ConstString &src) override
 Initialize from a string representation. More...
 
virtual int getCode () const override
 Get standard type code of value. More...
 
virtual bool readRaw (ConnectionReader &reader) override
 
virtual bool writeRaw (ConnectionWriter &writer) override
 
virtual StorablecreateStorable () const override
 Factory method. More...
 
virtual bool isList () const override
 Checks if value is a list. More...
 
virtual yarp::os::BottleasList () const override
 Get list value. More...
 
virtual int subCode () const override
 Return a code describing this item, used in serializing bottles. More...
 
virtual yarp::os::Valuefind (const yarp::os::ConstString &key) const override
 Gets a value corresponding to a given keyword. More...
 
virtual yarp::os::BottlefindGroup (const yarp::os::ConstString &key) const override
 Gets a list corresponding to a given keyword. More...
 
virtual void copy (const Storable &alt) override
 Become a copy of the passed item. More...
 
- Public Member Functions inherited from yarp::os::impl::Storable
virtual bool isBool () const override
 Checks if value is a boolean. More...
 
virtual bool isInt () const override
 Checks if value is an integer (32 bit or smaller). More...
 
virtual bool isInt64 () const override
 Checks if value is a 64-bit integer or smaller. More...
 
virtual bool isString () const override
 Checks if value is a string. More...
 
virtual bool isDouble () const override
 Checks if value is a floating point number. More...
 
virtual bool isDict () const override
 Checks if value is a dictionary. More...
 
virtual bool isVocab () const override
 Checks if value is a vocabulary identifier. More...
 
virtual bool isBlob () const override
 Checks if value is a binary object. More...
 
virtual bool isNull () const override
 Checks if the object is invalid. More...
 
virtual bool asBool () const override
 Get boolean value. More...
 
virtual int asInt () const override
 Get integer value. More...
 
virtual YARP_INT64 asInt64 () const override
 Get 64-bit integer value. More...
 
virtual int asVocab () const override
 Get vocabulary identifier as an integer. More...
 
virtual double asDouble () const override
 Get floating point value. More...
 
virtual yarp::os::ConstString asString () const override
 Get string value. More...
 
virtual SearchableasSearchable () const override
 Get dictionary or list value. More...
 
virtual yarp::os::PropertyasDict () const override
 Get dictionary (hash table) value. 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 read (ConnectionReader &connection) override
 Read this object from a network connection. More...
 
virtual bool write (ConnectionWriter &connection) override
 Write this object to a network connection. More...
 
virtual bool check (const yarp::os::ConstString &key) const override
 Check if there exists a property of the given name. 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 ~Storable ()
 Destructor. More...
 
virtual StorablecloneStorable () const
 Typed synonym for clone() More...
 
virtual bool isLeaf () const override
 
- Public Member Functions inherited from yarp::os::Value
 Value ()
 Construct a list Value. More...
 
 Value (int x, bool isVocab=false)
 Construct an integer Value. More...
 
 Value (double x)
 Construct a floating point Value. More...
 
 Value (const ConstString &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...
 
bool operator== (const Value &alt) const
 Equality test. More...
 
bool operator!= (const Value &alt) const
 Inequality test. More...
 
bool operator== (const char *alt) const
 
bool operator!= (const char *alt) const
 
void fromString (const char *str)
 Set value to correspond to a textual representation. More...
 
ConstString toString () const YARP_OVERRIDE
 Return a standard text representation of the content of the object. More...
 
- Public Member Functions inherited from yarp::os::Portable
virtual Type getType ()
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType ()
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. More...
 
virtual void onCompletion ()
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement ()
 This is called when the port is about to begin writing operations. More...
 
virtual Type getWriteType ()
 
- Public Member Functions inherited from yarp::os::Searchable
 Searchable ()
 Default constructor. More...
 
virtual ~Searchable ()
 Destructor. More...
 
virtual bool check (const ConstString &key, const ConstString &comment) const
 Check if there exists a property of the given name. More...
 
BottlefindGroup (const ConstString &key, const ConstString &comment) const
 Gets a list corresponding to a given keyword. More...
 
virtual bool check (const ConstString &key, Value *&result, const ConstString &comment="") const
 Gets a value corresponding to a given keyword. More...
 
virtual Value check (const ConstString &key, const Value &fallback, const ConstString &comment="") const
 Gets a value corresponding to a given keyword. More...
 

Static Public Attributes

static const int code = BOTTLE_TAG_LIST
 

Private Attributes

yarp::os::Bottle content
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::impl::Storable
static StorablecreateByCode (int id)
 
- Static Public Member Functions inherited from yarp::os::Value
static ValuemakeInt (int x)
 Create an integer Value. More...
 
static ValuemakeDouble (double x)
 Create a floating point Value. More...
 
static ValuemakeString (const ConstString &str)
 Create a string Value. More...
 
static ValuemakeVocab (int v)
 Create a vocabulary identifier Value. More...
 
static ValuemakeVocab (const ConstString &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 ConstString &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...
 

Detailed Description

A nested list of items.

Definition at line 354 of file BottleImpl.h.

Constructor & Destructor Documentation

◆ StoreList()

yarp::os::impl::StoreList::StoreList ( )
inline

Definition at line 360 of file BottleImpl.h.

Member Function Documentation

◆ asList()

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

Get list value.

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

Reimplemented from yarp::os::impl::Storable.

Definition at line 371 of file BottleImpl.h.

◆ copy()

virtual void yarp::os::impl::StoreList::copy ( const Storable alt)
inlineoverridevirtual

Become a copy of the passed item.

Implements yarp::os::impl::Storable.

Definition at line 387 of file BottleImpl.h.

◆ createStorable()

virtual Storable* yarp::os::impl::StoreList::createStorable ( ) const
inlineoverridevirtual

Factory method.

Implements yarp::os::impl::Storable.

Definition at line 369 of file BottleImpl.h.

◆ find()

virtual yarp::os::Value& yarp::os::impl::StoreList::find ( const yarp::os::ConstString key) const
inlineoverridevirtual

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.asInt(), result.asString(), etc. as appropriate.

Reimplemented from yarp::os::impl::Storable.

Definition at line 378 of file BottleImpl.h.

◆ findGroup()

virtual yarp::os::Bottle& yarp::os::impl::StoreList::findGroup ( const yarp::os::ConstString key) const
inlineoverridevirtual

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::impl::Storable.

Definition at line 383 of file BottleImpl.h.

◆ fromString()

void StoreList::fromString ( const ConstString src)
overridevirtual

Initialize from a string representation, assuming that any syntax around this representation such as braces or parentheses has already been consumed.

Implements yarp::os::impl::Storable.

Definition at line 1087 of file BottleImpl.cpp.

◆ fromStringNested()

void StoreList::fromStringNested ( const ConstString src)
overridevirtual

Initialize from a string representation.

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

Reimplemented from yarp::os::impl::Storable.

Definition at line 1092 of file BottleImpl.cpp.

◆ getCode()

virtual int yarp::os::impl::StoreList::getCode ( ) const
inlineoverridevirtual

Get standard type code of value.

Returns
the standard type code of the value.

Reimplemented from yarp::os::Value.

Definition at line 366 of file BottleImpl.h.

◆ internal()

yarp::os::Bottle& yarp::os::impl::StoreList::internal ( )
inline

Definition at line 361 of file BottleImpl.h.

◆ isList()

virtual bool yarp::os::impl::StoreList::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::impl::Storable.

Definition at line 370 of file BottleImpl.h.

◆ readRaw()

bool StoreList::readRaw ( ConnectionReader reader)
overridevirtual

Implements yarp::os::impl::Storable.

Definition at line 1103 of file BottleImpl.cpp.

◆ subCode()

int StoreList::subCode ( ) const
overridevirtual

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

Reimplemented from yarp::os::impl::Storable.

Definition at line 1141 of file BottleImpl.cpp.

◆ toString()

ConstString StoreList::toString ( ) const
overridevirtual

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::impl::Storable.

Definition at line 1077 of file BottleImpl.cpp.

◆ toStringNested()

ConstString StoreList::toStringNested ( ) const
overridevirtual

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

Reimplemented from yarp::os::impl::Storable.

Definition at line 1082 of file BottleImpl.cpp.

◆ writeRaw()

bool StoreList::writeRaw ( ConnectionWriter writer)
overridevirtual

Implements yarp::os::impl::Storable.

Definition at line 1110 of file BottleImpl.cpp.

Member Data Documentation

◆ code

const int StoreList::code = BOTTLE_TAG_LIST
static

Definition at line 375 of file BottleImpl.h.

◆ content

yarp::os::Bottle yarp::os::impl::StoreList::content
private

Definition at line 357 of file BottleImpl.h.


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