YARP  2.3.68+272-20170522.1+git50f0ae7
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
 Return a standard text representation of the content of the object. More...
 
virtual void fromString (const ConstString &src)
 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
 Create string representation, including any syntax that should wrap it such as braces or parentheses. More...
 
virtual void fromStringNested (const ConstString &src)
 Initialize from a string representation. More...
 
virtual int getCode () const
 Get standard type code of value. More...
 
virtual bool readRaw (ConnectionReader &reader)
 
virtual bool writeRaw (ConnectionWriter &writer)
 
virtual StorablecreateStorable () const
 Factory method. More...
 
virtual bool isList () const
 Checks if value is a list. More...
 
virtual yarp::os::BottleasList () const
 Get list value. More...
 
virtual int subCode () const
 Return a code describing this item, used in serializing bottles. More...
 
virtual yarp::os::Valuefind (const yarp::os::ConstString &key) const
 Gets a value corresponding to a given keyword. More...
 
virtual yarp::os::BottlefindGroup (const yarp::os::ConstString &key) const
 Gets a list corresponding to a given keyword. More...
 
virtual void copy (const Storable &alt)
 Become a copy of the passed item. More...
 
- Public Member Functions inherited from yarp::os::impl::Storable
virtual bool isBool () const
 Checks if value is a boolean. More...
 
virtual bool isInt () const
 Checks if value is an integer (32 bit or smaller). More...
 
virtual bool isInt64 () const
 Checks if value is a 64-bit integer or smaller. More...
 
virtual bool isString () const
 Checks if value is a string. More...
 
virtual bool isDouble () const
 Checks if value is a floating point number. More...
 
virtual bool isDict () const
 Checks if value is a dictionary. More...
 
virtual bool isVocab () const
 Checks if value is a vocabulary identifier. More...
 
virtual bool isBlob () const
 Checks if value is a binary object. More...
 
virtual bool isNull () const
 Checks if the object is invalid. More...
 
virtual bool asBool () const
 Get boolean value. More...
 
virtual int asInt () const
 Get integer value. More...
 
virtual YARP_INT64 asInt64 () const
 Get 64-bit integer value. More...
 
virtual int asVocab () const
 Get vocabulary identifier as an integer. More...
 
virtual double asDouble () const
 Get floating point value. More...
 
virtual yarp::os::ConstString asString () const
 Get string value. More...
 
virtual SearchableasSearchable () const
 Get dictionary or list value. More...
 
virtual yarp::os::PropertyasDict () const
 Get dictionary (hash table) value. More...
 
virtual const char * asBlob () const
 Get binary data value. More...
 
virtual size_t asBlobLength () const
 Get binary data length. More...
 
virtual bool read (ConnectionReader &connection)
 Read this object from a network connection. More...
 
virtual bool write (ConnectionWriter &connection)
 Write this object to a network connection. More...
 
virtual bool check (const yarp::os::ConstString &key) const
 Check if there exists a property of the given name. More...
 
bool operator== (const yarp::os::Value &alt) const
 
virtual yarp::os::Valuecreate () const
 Create a new value of the same type. More...
 
virtual yarp::os::Valueclone () const
 Create a copy of the value. More...
 
virtual ~Storable ()
 Destructor. More...
 
virtual StorablecloneStorable () const
 Typed synonym for clone() More...
 
virtual bool isLeaf () const
 
- 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
 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
inlinevirtual

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)
inlinevirtual

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
inlinevirtual

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
inlinevirtual

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
inlinevirtual

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)
virtual

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 1073 of file BottleImpl.cpp.

◆ fromStringNested()

void StoreList::fromStringNested ( const ConstString src)
virtual

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 1078 of file BottleImpl.cpp.

◆ getCode()

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

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
inlinevirtual

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)
virtual

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

Definition at line 1089 of file BottleImpl.cpp.

◆ subCode()

int StoreList::subCode ( ) const
virtual

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

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

Definition at line 1127 of file BottleImpl.cpp.

◆ toString()

ConstString StoreList::toString ( ) const
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::impl::Storable.

Definition at line 1063 of file BottleImpl.cpp.

◆ toStringNested()

ConstString StoreList::toStringNested ( ) const
virtual

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

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

Definition at line 1068 of file BottleImpl.cpp.

◆ writeRaw()

bool StoreList::writeRaw ( ConnectionWriter writer)
virtual

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

Definition at line 1096 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: