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>

Public Types

using size_type = size_t
 

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_type 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_type 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, size_type first=0, size_type len=npos)
 
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_type 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

Searchableparent
 
bool invalid
 
bool ro
 

Static Public Attributes

static constexpr size_type npos = static_cast<size_type>(-1)
 

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 35 of file BottleImpl.h.

Member Typedef Documentation

◆ size_type

Definition at line 38 of file BottleImpl.h.

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

◆ addBit() [1/3]

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

Definition at line 147 of file BottleImpl.h.

◆ addBit() [2/3]

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

Definition at line 139 of file BottleImpl.h.

◆ addBit() [3/3]

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

Definition at line 133 of file BottleImpl.h.

◆ addDict()

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

Definition at line 654 of file BottleImpl.cpp.

◆ addFloat32()

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

Definition at line 80 of file BottleImpl.h.

◆ addFloat64()

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

Definition at line 85 of file BottleImpl.h.

◆ addInt16()

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

Definition at line 65 of file BottleImpl.h.

◆ addInt32()

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

Definition at line 70 of file BottleImpl.h.

◆ addInt64()

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

Definition at line 75 of file BottleImpl.h.

◆ addInt8()

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

Definition at line 60 of file BottleImpl.h.

◆ addList()

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

Definition at line 647 of file BottleImpl.cpp.

◆ addString()

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

Definition at line 95 of file BottleImpl.h.

◆ addVocab()

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

Definition at line 90 of file BottleImpl.h.

◆ byteCount()

size_t BottleImpl::byteCount ( ) const

Definition at line 426 of file BottleImpl.cpp.

◆ checkIndex()

bool BottleImpl::checkIndex ( size_type  index) const

Definition at line 583 of file BottleImpl.cpp.

◆ clear()

void BottleImpl::clear ( )

Definition at line 70 of file BottleImpl.cpp.

◆ copyRange()

void BottleImpl::copyRange ( const BottleImpl alt,
size_type  first = 0,
size_type  len = npos 
)

Definition at line 661 of file BottleImpl.cpp.

◆ edit()

void BottleImpl::edit ( )

Definition at line 685 of file BottleImpl.cpp.

◆ findBit()

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

Definition at line 711 of file BottleImpl.cpp.

◆ findGroupBit()

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

Definition at line 695 of file BottleImpl.cpp.

◆ fromBinary()

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

Definition at line 358 of file BottleImpl.cpp.

◆ fromBytes() [1/2]

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

Definition at line 370 of file BottleImpl.cpp.

◆ fromBytes() [2/2]

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

Definition at line 334 of file BottleImpl.cpp.

◆ fromString()

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

Definition at line 193 of file BottleImpl.cpp.

◆ get()

Storable & BottleImpl::get ( size_type  index) const

Definition at line 642 of file BottleImpl.cpp.

◆ getBytes()

const char * BottleImpl::getBytes ( ) const

Definition at line 419 of file BottleImpl.cpp.

◆ getNull()

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

Definition at line 158 of file BottleImpl.h.

◆ getSpecialization()

int BottleImpl::getSpecialization ( )

Definition at line 567 of file BottleImpl.cpp.

◆ hasChanged()

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

Definition at line 167 of file BottleImpl.h.

◆ isComplete()

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

Definition at line 258 of file BottleImpl.cpp.

◆ isFloat32()

bool BottleImpl::isFloat32 ( int  index)

Definition at line 608 of file BottleImpl.cpp.

◆ isFloat64()

bool BottleImpl::isFloat64 ( int  index)

Definition at line 613 of file BottleImpl.cpp.

◆ isInt16()

bool BottleImpl::isInt16 ( int  index)

Definition at line 593 of file BottleImpl.cpp.

◆ isInt32()

bool BottleImpl::isInt32 ( int  index)

Definition at line 598 of file BottleImpl.cpp.

◆ isInt64()

bool BottleImpl::isInt64 ( int  index)

Definition at line 603 of file BottleImpl.cpp.

◆ isInt8()

bool BottleImpl::isInt8 ( int  index)

Definition at line 588 of file BottleImpl.cpp.

◆ isList()

bool BottleImpl::isList ( int  index)

Definition at line 623 of file BottleImpl.cpp.

◆ isString()

bool BottleImpl::isString ( int  index)

Definition at line 618 of file BottleImpl.cpp.

◆ onCommencement()

void BottleImpl::onCommencement ( )

Definition at line 432 of file BottleImpl.cpp.

◆ pop()

Storable * BottleImpl::pop ( )

Definition at line 628 of file BottleImpl.cpp.

◆ read()

bool BottleImpl::read ( ConnectionReader reader)

Definition at line 450 of file BottleImpl.cpp.

◆ setNested()

void BottleImpl::setNested ( bool  nested)

Definition at line 572 of file BottleImpl.cpp.

◆ size()

BottleImpl::size_type BottleImpl::size ( ) const

Definition at line 328 of file BottleImpl.cpp.

◆ specialize()

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

Definition at line 561 of file BottleImpl.cpp.

◆ subCode()

std::int32_t BottleImpl::subCode ( )

Definition at line 578 of file BottleImpl.cpp.

◆ toBytes()

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

Definition at line 411 of file BottleImpl.cpp.

◆ toString()

std::string BottleImpl::toString ( ) const

Definition at line 315 of file BottleImpl.cpp.

◆ write()

bool BottleImpl::write ( ConnectionWriter writer) const

Definition at line 437 of file BottleImpl.cpp.

Member Data Documentation

◆ invalid

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

Definition at line 174 of file BottleImpl.h.

◆ npos

constexpr size_type yarp::os::impl::BottleImpl::npos = static_cast<size_type>(-1)
staticconstexpr

Definition at line 39 of file BottleImpl.h.

◆ parent

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

Definition at line 45 of file BottleImpl.h.

◆ ro

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

Definition at line 175 of file BottleImpl.h.


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