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

Public Member Functions

 NullBottle ()
 
bool isNull () const override
 Checks if the object is invalid. More...
 
- Public Member Functions inherited from yarp::os::Bottle
 Bottle ()
 Constructor. More...
 
 Bottle (const std::string &text)
 Creates a bottle from a string. More...
 
 Bottle (const Bottle &rhs)
 Copy constructor. More...
 
 Bottle (Bottle &&rhs) noexcept
 Move constructor. More...
 
 Bottle (std::initializer_list< yarp::os::Value > values)
 Initializer list constructor. More...
 
Bottleoperator= (const Bottle &rhs)
 Copy assignment operator. More...
 
Bottleoperator= (Bottle &&rhs) noexcept
 Move 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 addInt8 (std::int8_t x)
 Places a 8-bit integer in the bottle, at the end of the list. More...
 
void addInt16 (std::int16_t x)
 Places a 16-bit integer in the bottle, at the end of the list. More...
 
void addInt32 (std::int32_t x)
 Places a 32-bit integer in the bottle, at the end of the list. More...
 
void addInt64 (std::int64_t x)
 Places a 64-bit 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 addFloat32 (yarp::conf::float32_t x)
 Places a 32-bit floating point number in the bottle, at the end of the list. More...
 
void addFloat64 (yarp::conf::float64_t x)
 Places a 64-bit 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 std::string &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 (size_type index) const
 Reads a Value v from a certain part of the list. More...
 
size_type size () const
 Gets the number of elements in the bottle. More...
 
void fromString (const std::string &text)
 Initializes bottle from a string. More...
 
void fromBinary (const char *buf, size_t len)
 Initializes bottle from a binary representation. More...
 
const char * toBinary (size_t *size=nullptr)
 Returns binary representation of bottle. More...
 
std::string toString () const override
 Gives a human-readable textual representation of the bottle. More...
 
bool write (ConnectionWriter &writer) const override
 Output a representation of the bottle to a network connection. More...
 
bool read (ConnectionReader &reader) 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 (const PortWriter &writer, bool textMode=false)
 Set the bottle's value based on input from a serializable object. More...
 
void onCommencement () const override
 This is called when the port is about to begin writing operations. More...
 
bool check (const std::string &key) const override
 Check if there exists a property of the given name. More...
 
Valuefind (const std::string &key) const override
 Gets a value corresponding to a given keyword. More...
 
BottlefindGroup (const std::string &key) const override
 Gets a list corresponding to a given keyword. More...
 
bool isNull () const override
 Checks if the object is invalid. More...
 
void copy (const Bottle &alt, size_type first=0, size_type len=npos)
 Copy all or part of another Bottle. More...
 
bool operator== (const Bottle &alt) const
 Equality test. More...
 
bool operator!= (const Bottle &alt) const
 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...
 
virtual bool check (const std::string &key) const=0
 Check if there exists a property of the given name. More...
 
virtual bool check (const std::string &key, const std::string &comment) const
 Check if there exists a property of the given name. 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...
 
virtual BottlefindGroup (const std::string &key) const=0
 Gets a list corresponding to a given keyword. More...
 
BottlefindGroup (const std::string &key, const std::string &comment) const
 Gets a list corresponding to a given keyword. 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 yarp::os::Type getWriteType () const
 
- Public Member Functions inherited from yarp::os::Searchable
 Searchable ()
 Default constructor. More...
 
 Searchable (const Searchable &rhs)=default
 Copy constructor. More...
 
 Searchable (Searchable &&rhs) noexcept=default
 Move constructor. More...
 
virtual ~Searchable ()
 Destructor. More...
 
Searchableoperator= (const Searchable &rhs)=default
 Copy assignment operator. More...
 
Searchableoperator= (Searchable &&rhs) noexcept=default
 Move assignment operator. 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...
 

Additional Inherited Members

- Public Types inherited from yarp::os::Bottle
using size_type = size_t
 
- Static Public Member Functions inherited from yarp::os::Bottle
static BottlegetNullBottle ()
 A special Bottle with no content. More...
 
static std::string toString (int x)
 
static std::string describeBottleCode (int code)
 Convert a numeric bottle code to a string. More...
 
- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (const PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading. More...
 
- Static Public Attributes inherited from yarp::os::Bottle
static const size_type npos = static_cast<Bottle::size_type>(-1)
 
- Protected Member Functions inherited from yarp::os::Bottle
void setReadOnly (bool readOnly)
 

Detailed Description

Definition at line 33 of file Bottle.cpp.

Constructor & Destructor Documentation

◆ NullBottle()

NullBottle::NullBottle ( )
inline

Definition at line 36 of file Bottle.cpp.

Member Function Documentation

◆ isNull()

bool NullBottle::isNull ( ) const
inlineoverridevirtual

Checks if the object is invalid.

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

Reimplemented from yarp::os::Searchable.

Definition at line 41 of file Bottle.cpp.


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