YARP
Yet Another Robot Platform
yarp::os::impl::BottleImpl Class Reference

A flexible data format for holding a bunch of numbers and strings. More...

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

Detailed Description

A flexible data format for holding a bunch of numbers and strings.

Handy to use until you work out how to make your own more efficient formats for transmission.

Definition at line 34 of file BottleImpl.h.

Public Member Functions

 BottleImpl ()
 
 BottleImpl (Searchable *parent)
 
virtual ~BottleImpl ()
 
bool isInt8 (int index)
 
bool isInt16 (int index)
 
bool isInt32 (int index)
 
bool isInt64 (int index)
 
bool isFloat32 (int index)
 
bool isFloat64 (int index)
 
bool isString (int index)
 
bool isList (int index)
 
Storablepop ()
 
Storableget (size_t index) const
 
void addInt8 (std::int8_t x)
 
void addInt16 (std::int16_t x)
 
void addInt32 (std::int32_t x)
 
void addInt64 (std::int64_t x)
 
void addFloat32 (yarp::conf::float32_t x)
 
void addFloat64 (yarp::conf::float64_t x)
 
void addVocab (std::int32_t x)
 
void addString (const std::string &text)
 
yarp::os::BottleaddList ()
 
yarp::os::PropertyaddDict ()
 
void clear ()
 
void fromString (const std::string &line)
 
std::string toString () const
 
size_t size () const
 
bool read (ConnectionReader &reader)
 
bool write (ConnectionWriter &writer) const
 
void onCommencement ()
 
const char * getBytes () const
 
size_t byteCount () const
 
void copyRange (const BottleImpl *alt, int first=0, int len=-1)
 
bool fromBytes (const yarp::os::Bytes &data)
 
void toBytes (yarp::os::Bytes &data)
 
bool fromBytes (yarp::os::ConnectionReader &reader)
 
void fromBinary (const char *text, size_t len)
 
void specialize (std::int32_t subCode)
 
int getSpecialization ()
 
void setNested (bool nested)
 
std::int32_t subCode ()
 
void addBit (yarp::os::Value *bit)
 
void addBit (const yarp::os::Value &bit)
 
yarp::os::ValueaddBit (const char *str)
 
void hasChanged ()
 
bool checkIndex (size_t index) const
 
void edit ()
 
ValuefindGroupBit (const std::string &key) const
 
ValuefindBit (const std::string &key) const
 

Static Public Member Functions

static StoreNullgetNull ()
 
static bool isComplete (const char *txt)
 

Public Attributes

Searchable *const parent
 
bool invalid
 
bool ro
 

Private Member Functions

 YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG (std::vector< Storable *>) content
 
 YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG (std::vector< char >) data
 
void add (Storable *s)
 
void smartAdd (const std::string &str)
 
void synch ()
 
void synch () const
 

Private Attributes

int speciality
 
bool nested
 
bool dirty
 

Constructor & Destructor Documentation

◆ BottleImpl() [1/2]

BottleImpl::BottleImpl ( )

Definition at line 36 of file BottleImpl.cpp.

◆ BottleImpl() [2/2]

BottleImpl::BottleImpl ( Searchable parent)

Definition at line 46 of file BottleImpl.cpp.

◆ ~BottleImpl()

BottleImpl::~BottleImpl ( )
virtual

Definition at line 57 of file BottleImpl.cpp.

Member Function Documentation

◆ add()

void BottleImpl::add ( Storable s)
private

Definition at line 63 of file BottleImpl.cpp.

◆ addBit() [1/3]

void yarp::os::impl::BottleImpl::addBit ( yarp::os::Value bit)
inline

Definition at line 98 of file BottleImpl.h.

◆ addBit() [2/3]

void yarp::os::impl::BottleImpl::addBit ( const yarp::os::Value bit)
inline

Definition at line 104 of file BottleImpl.h.

◆ addBit() [3/3]

yarp::os::Value& yarp::os::impl::BottleImpl::addBit ( const char *  str)
inline

Definition at line 112 of file BottleImpl.h.

◆ addDict()

yarp::os::Property & BottleImpl::addDict ( )

Definition at line 655 of file BottleImpl.cpp.

◆ addFloat32()

void yarp::os::impl::BottleImpl::addFloat32 ( yarp::conf::float32_t  x)
inline

Definition at line 60 of file BottleImpl.h.

◆ addFloat64()

void yarp::os::impl::BottleImpl::addFloat64 ( yarp::conf::float64_t  x)
inline

Definition at line 61 of file BottleImpl.h.

◆ addInt16()

void yarp::os::impl::BottleImpl::addInt16 ( std::int16_t  x)
inline

Definition at line 57 of file BottleImpl.h.

◆ addInt32()

void yarp::os::impl::BottleImpl::addInt32 ( std::int32_t  x)
inline

Definition at line 58 of file BottleImpl.h.

◆ addInt64()

void yarp::os::impl::BottleImpl::addInt64 ( std::int64_t  x)
inline

Definition at line 59 of file BottleImpl.h.

◆ addInt8()

void yarp::os::impl::BottleImpl::addInt8 ( std::int8_t  x)
inline

Definition at line 56 of file BottleImpl.h.

◆ addList()

yarp::os::Bottle & BottleImpl::addList ( )

Definition at line 648 of file BottleImpl.cpp.

◆ addString()

void yarp::os::impl::BottleImpl::addString ( const std::string &  text)
inline

Definition at line 63 of file BottleImpl.h.

◆ addVocab()

void yarp::os::impl::BottleImpl::addVocab ( std::int32_t  x)
inline

Definition at line 62 of file BottleImpl.h.

◆ byteCount()

size_t BottleImpl::byteCount ( ) const

Definition at line 412 of file BottleImpl.cpp.

◆ checkIndex()

bool BottleImpl::checkIndex ( size_t  index) const

Definition at line 581 of file BottleImpl.cpp.

◆ clear()

void BottleImpl::clear ( )

Definition at line 70 of file BottleImpl.cpp.

◆ copyRange()

void BottleImpl::copyRange ( const BottleImpl alt,
int  first = 0,
int  len = -1 
)

Definition at line 662 of file BottleImpl.cpp.

◆ edit()

void BottleImpl::edit ( )

Definition at line 702 of file BottleImpl.cpp.

◆ findBit()

Value & BottleImpl::findBit ( const std::string &  key) const

Definition at line 728 of file BottleImpl.cpp.

◆ findGroupBit()

Value & BottleImpl::findGroupBit ( const std::string &  key) const

Definition at line 712 of file BottleImpl.cpp.

◆ fromBinary()

void BottleImpl::fromBinary ( const char *  text,
size_t  len 
)

Definition at line 344 of file BottleImpl.cpp.

◆ fromBytes() [1/2]

bool BottleImpl::fromBytes ( const yarp::os::Bytes data)

Definition at line 356 of file BottleImpl.cpp.

◆ fromBytes() [2/2]

bool BottleImpl::fromBytes ( yarp::os::ConnectionReader reader)

Definition at line 318 of file BottleImpl.cpp.

◆ fromString()

void BottleImpl::fromString ( const std::string &  line)

Definition at line 175 of file BottleImpl.cpp.

◆ get()

Storable & BottleImpl::get ( size_t  index) const

Definition at line 643 of file BottleImpl.cpp.

◆ getBytes()

const char * BottleImpl::getBytes ( ) const

Definition at line 405 of file BottleImpl.cpp.

◆ getNull()

static StoreNull& yarp::os::impl::BottleImpl::getNull ( )
inlinestatic

Definition at line 123 of file BottleImpl.h.

◆ getSpecialization()

int BottleImpl::getSpecialization ( )

Definition at line 565 of file BottleImpl.cpp.

◆ hasChanged()

void yarp::os::impl::BottleImpl::hasChanged ( )
inline

Definition at line 132 of file BottleImpl.h.

◆ isComplete()

bool BottleImpl::isComplete ( const char *  txt)
static

Definition at line 241 of file BottleImpl.cpp.

◆ isFloat32()

bool BottleImpl::isFloat32 ( int  index)

Definition at line 609 of file BottleImpl.cpp.

◆ isFloat64()

bool BottleImpl::isFloat64 ( int  index)

Definition at line 614 of file BottleImpl.cpp.

◆ isInt16()

bool BottleImpl::isInt16 ( int  index)

Definition at line 594 of file BottleImpl.cpp.

◆ isInt32()

bool BottleImpl::isInt32 ( int  index)

Definition at line 599 of file BottleImpl.cpp.

◆ isInt64()

bool BottleImpl::isInt64 ( int  index)

Definition at line 604 of file BottleImpl.cpp.

◆ isInt8()

bool BottleImpl::isInt8 ( int  index)

Definition at line 589 of file BottleImpl.cpp.

◆ isList()

bool BottleImpl::isList ( int  index)

Definition at line 624 of file BottleImpl.cpp.

◆ isString()

bool BottleImpl::isString ( int  index)

Definition at line 619 of file BottleImpl.cpp.

◆ onCommencement()

void BottleImpl::onCommencement ( )

Definition at line 418 of file BottleImpl.cpp.

◆ pop()

Storable * BottleImpl::pop ( )

Definition at line 629 of file BottleImpl.cpp.

◆ read()

bool BottleImpl::read ( ConnectionReader reader)

Definition at line 447 of file BottleImpl.cpp.

◆ setNested()

void BottleImpl::setNested ( bool  nested)

Definition at line 570 of file BottleImpl.cpp.

◆ size()

size_t BottleImpl::size ( ) const

Definition at line 312 of file BottleImpl.cpp.

◆ smartAdd()

void BottleImpl::smartAdd ( const std::string &  str)
private

Definition at line 79 of file BottleImpl.cpp.

◆ specialize()

void BottleImpl::specialize ( std::int32_t  subCode)

Definition at line 559 of file BottleImpl.cpp.

◆ subCode()

std::int32_t BottleImpl::subCode ( )

Definition at line 576 of file BottleImpl.cpp.

◆ synch() [1/2]

void BottleImpl::synch ( )
private

Definition at line 522 of file BottleImpl.cpp.

◆ synch() [2/2]

void BottleImpl::synch ( ) const
private

Definition at line 517 of file BottleImpl.cpp.

◆ toBytes()

void BottleImpl::toBytes ( yarp::os::Bytes data)

Definition at line 397 of file BottleImpl.cpp.

◆ toString()

std::string BottleImpl::toString ( ) const

Definition at line 299 of file BottleImpl.cpp.

◆ write()

bool BottleImpl::write ( ConnectionWriter writer) const

Definition at line 423 of file BottleImpl.cpp.

◆ YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG() [1/2]

yarp::os::impl::BottleImpl::YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG ( std::vector< Storable *>  )
private

◆ YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG() [2/2]

yarp::os::impl::BottleImpl::YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG ( std::vector< char >  )
private

Member Data Documentation

◆ dirty

bool yarp::os::impl::BottleImpl::dirty
private

Definition at line 149 of file BottleImpl.h.

◆ invalid

bool yarp::os::impl::BottleImpl::invalid

Definition at line 136 of file BottleImpl.h.

◆ nested

bool yarp::os::impl::BottleImpl::nested
private

Definition at line 148 of file BottleImpl.h.

◆ parent

Searchable* const yarp::os::impl::BottleImpl::parent

Definition at line 41 of file BottleImpl.h.

◆ ro

bool yarp::os::impl::BottleImpl::ro

Definition at line 137 of file BottleImpl.h.

◆ speciality

int yarp::os::impl::BottleImpl::speciality
private

Definition at line 147 of file BottleImpl.h.


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