YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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 addVocab32 (yarp::conf::vocab32_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 chargetBytes () 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 33 of file BottleImpl.h.

Member Typedef Documentation

◆ size_type

Constructor & Destructor Documentation

◆ BottleImpl() [1/2]

BottleImpl::BottleImpl ( )

Definition at line 33 of file BottleImpl.cpp.

◆ BottleImpl() [2/2]

BottleImpl::BottleImpl ( Searchable parent)

Definition at line 43 of file BottleImpl.cpp.

◆ ~BottleImpl()

BottleImpl::~BottleImpl ( )
virtual

Definition at line 54 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 145 of file BottleImpl.h.

◆ addBit() [2/3]

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

Definition at line 137 of file BottleImpl.h.

◆ addBit() [3/3]

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

Definition at line 131 of file BottleImpl.h.

◆ addDict()

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

Definition at line 651 of file BottleImpl.cpp.

◆ addFloat32()

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

Definition at line 78 of file BottleImpl.h.

◆ addFloat64()

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

Definition at line 83 of file BottleImpl.h.

◆ addInt16()

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

Definition at line 63 of file BottleImpl.h.

◆ addInt32()

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

Definition at line 68 of file BottleImpl.h.

◆ addInt64()

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

Definition at line 73 of file BottleImpl.h.

◆ addInt8()

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

Definition at line 58 of file BottleImpl.h.

◆ addList()

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

Definition at line 644 of file BottleImpl.cpp.

◆ addString()

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

Definition at line 93 of file BottleImpl.h.

◆ addVocab32()

void yarp::os::impl::BottleImpl::addVocab32 ( yarp::conf::vocab32_t  x)
inline

Definition at line 88 of file BottleImpl.h.

◆ byteCount()

size_t BottleImpl::byteCount ( ) const

Definition at line 423 of file BottleImpl.cpp.

◆ checkIndex()

bool BottleImpl::checkIndex ( size_type  index) const

Definition at line 580 of file BottleImpl.cpp.

◆ clear()

void BottleImpl::clear ( )

Definition at line 67 of file BottleImpl.cpp.

◆ copyRange()

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

Definition at line 658 of file BottleImpl.cpp.

◆ edit()

void BottleImpl::edit ( )

Definition at line 682 of file BottleImpl.cpp.

◆ findBit()

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

Definition at line 708 of file BottleImpl.cpp.

◆ findGroupBit()

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

Definition at line 692 of file BottleImpl.cpp.

◆ fromBinary()

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

Definition at line 355 of file BottleImpl.cpp.

◆ fromBytes() [1/2]

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

Definition at line 367 of file BottleImpl.cpp.

◆ fromBytes() [2/2]

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

Definition at line 331 of file BottleImpl.cpp.

◆ fromString()

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

Definition at line 190 of file BottleImpl.cpp.

◆ get()

Storable & BottleImpl::get ( size_type  index) const

Definition at line 639 of file BottleImpl.cpp.

◆ getBytes()

const char * BottleImpl::getBytes ( ) const

Definition at line 416 of file BottleImpl.cpp.

◆ getNull()

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

Definition at line 156 of file BottleImpl.h.

◆ getSpecialization()

int BottleImpl::getSpecialization ( )

Definition at line 564 of file BottleImpl.cpp.

◆ hasChanged()

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

Definition at line 165 of file BottleImpl.h.

◆ isComplete()

bool BottleImpl::isComplete ( const char txt)
static

Definition at line 255 of file BottleImpl.cpp.

◆ isFloat32()

bool BottleImpl::isFloat32 ( int  index)

Definition at line 605 of file BottleImpl.cpp.

◆ isFloat64()

bool BottleImpl::isFloat64 ( int  index)

Definition at line 610 of file BottleImpl.cpp.

◆ isInt16()

bool BottleImpl::isInt16 ( int  index)

Definition at line 590 of file BottleImpl.cpp.

◆ isInt32()

bool BottleImpl::isInt32 ( int  index)

Definition at line 595 of file BottleImpl.cpp.

◆ isInt64()

bool BottleImpl::isInt64 ( int  index)

Definition at line 600 of file BottleImpl.cpp.

◆ isInt8()

bool BottleImpl::isInt8 ( int  index)

Definition at line 585 of file BottleImpl.cpp.

◆ isList()

bool BottleImpl::isList ( int  index)

Definition at line 620 of file BottleImpl.cpp.

◆ isString()

bool BottleImpl::isString ( int  index)

Definition at line 615 of file BottleImpl.cpp.

◆ onCommencement()

void BottleImpl::onCommencement ( )

Definition at line 429 of file BottleImpl.cpp.

◆ pop()

Storable * BottleImpl::pop ( )

Definition at line 625 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 569 of file BottleImpl.cpp.

◆ size()

BottleImpl::size_type BottleImpl::size ( ) const

Definition at line 325 of file BottleImpl.cpp.

◆ specialize()

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

Definition at line 558 of file BottleImpl.cpp.

◆ subCode()

std::int32_t BottleImpl::subCode ( )

Definition at line 575 of file BottleImpl.cpp.

◆ toBytes()

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

Definition at line 408 of file BottleImpl.cpp.

◆ toString()

std::string BottleImpl::toString ( ) const

Definition at line 312 of file BottleImpl.cpp.

◆ write()

bool BottleImpl::write ( ConnectionWriter writer) const

Definition at line 434 of file BottleImpl.cpp.

Member Data Documentation

◆ invalid

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

Definition at line 172 of file BottleImpl.h.

◆ npos

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

Definition at line 37 of file BottleImpl.h.

◆ parent

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

Definition at line 43 of file BottleImpl.h.

◆ ro

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

Definition at line 173 of file BottleImpl.h.


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