YARP  2.3.70.1
Yet Another Robot Platform
NullBottle Class Reference
+ Inheritance diagram for NullBottle:

Public Member Functions

 NullBottle ()
 
virtual bool isNull () const override
 Checks if the object is invalid. More...
 
- Public Member Functions inherited from yarp::os::Bottle
 Bottle ()
 Constructor. More...
 
 Bottle (const ConstString &text)
 Creates a bottle from a string. More...
 
 Bottle (const Bottle &bottle)
 Copy constructor. More...
 
Bottleoperator= (const Bottle &bottle)
 Assignment operator. More...
 
virtual ~Bottle ()
 Destructor. More...
 
void clear ()
 Empties the bottle of any objects it contains. More...
 
void addInt (int x)
 Places an integer in the bottle, at the end of the list. More...
 
void addInt64 (const YARP_INT64 &x)
 Places a 64 integer in the bottle, at the end of the list. More...
 
void addVocab (int x)
 Places a vocabulary item in the bottle, at the end of the list. More...
 
void addDouble (double x)
 Places a floating point number in the bottle, at the end of the list. More...
 
void addString (const char *str)
 Places a string in the bottle, at the end of the list. More...
 
void addString (const ConstString &str)
 Places a string in the bottle, at the end of the list. More...
 
void add (const Value &value)
 Add a Value to the bottle, at the end of the list. More...
 
void add (Value *value)
 Add a Value to the bottle, at the end of the list. More...
 
BottleaddList ()
 Places an empty nested list in the bottle, at the end of the list. More...
 
PropertyaddDict ()
 Places an empty key/value object in the bottle, at the end of the list. More...
 
Value pop ()
 Removes a Value v from the end of the list and returns this value. More...
 
Valueget (int index) const
 Reads a Value v from a certain part of the list. More...
 
int size () const
 Gets the number of elements in the bottle. More...
 
void fromString (const ConstString &text)
 Initializes bottle from a string. More...
 
void fromBinary (const char *buf, int len)
 Initializes bottle from a binary representation. More...
 
const char * toBinary (size_t *size=YARP_NULLPTR)
 Returns binary representation of bottle. More...
 
ConstString toString () const YARP_OVERRIDE
 Gives a human-readable textual representation of the bottle. More...
 
bool write (ConnectionWriter &writer) YARP_OVERRIDE
 Output a representation of the bottle to a network connection. More...
 
bool read (ConnectionReader &reader) YARP_OVERRIDE
 Set the bottle's value based on input from a network connection. More...
 
bool write (PortReader &reader, bool textMode=false)
 Copy the bottle's value to a object that can read a serialization. More...
 
bool read (PortWriter &writer, bool textMode=false)
 Set the bottle's value based on input from a serializable object. More...
 
void onCommencement () YARP_OVERRIDE
 This is called when the port is about to begin writing operations. More...
 
virtual bool check (const ConstString &key) const YARP_OVERRIDE
 Check if there exists a property of the given name. More...
 
virtual Valuefind (const ConstString &key) const YARP_OVERRIDE
 Gets a value corresponding to a given keyword. More...
 
BottlefindGroup (const ConstString &key) const YARP_OVERRIDE
 Gets a list corresponding to a given keyword. More...
 
void copy (const Bottle &alt, int first=0, int len=-1)
 Copy all or part of another Bottle. More...
 
bool operator== (const Bottle &alt)
 Equality test. More...
 
bool operator!= (const Bottle &alt)
 Inequality test. More...
 
void append (const Bottle &alt)
 Append the content of the given bottle to the current list. More...
 
Bottle tail () const
 Get all but the first element of a bottle. More...
 
void hasChanged ()
 Declare that the content of the Bottle has been changed. More...
 
int getSpecialization ()
 Get numeric bottle code for this bottle. More...
 
YARP_DEPRECATED void add (const char *txt)
 
- 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 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 NullBottlebottleNull = YARP_NULLPTR
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Bottle
static BottlegetNullBottle ()
 A special Bottle with no content. More...
 
static ConstString toString (int x)
 
static ConstString describeBottleCode (int code)
 Convert a numeric bottle code to a string. 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...
 
- Protected Member Functions inherited from yarp::os::Bottle
void setReadOnly (bool readOnly)
 

Detailed Description

Definition at line 24 of file Bottle.cpp.

Constructor & Destructor Documentation

◆ NullBottle()

NullBottle::NullBottle ( )
inline

Definition at line 27 of file Bottle.cpp.

Member Function Documentation

◆ isNull()

virtual bool NullBottle::isNull ( ) const
inlineoverridevirtual

Checks if the object is invalid.

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

Reimplemented from yarp::os::Bottle.

Definition at line 28 of file Bottle.cpp.

Member Data Documentation

◆ bottleNull

NullBottle * NullBottle::bottleNull = YARP_NULLPTR
static

Definition at line 29 of file Bottle.cpp.


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