|  | YARP Yet Another Robot Platform |  | 
 
 
 
Go to the documentation of this file.
   11 #ifndef YARP_OS_BOTTLE_H 
   12 #define YARP_OS_BOTTLE_H 
   21 #define BOTTLE_TAG_INT8 32         // 0000 0000 0010 0000 
   22 #define BOTTLE_TAG_INT16 64        // 0000 0000 0100 0000 
   23 #define BOTTLE_TAG_INT32 1         // 0000 0000 0000 0001 
   24 #define BOTTLE_TAG_INT64 (1 + 16)  // 0000 0000 0001 0001 
   25 #define BOTTLE_TAG_VOCAB (1 + 8)   // 0000 0000 0000 1001 
   26 #define BOTTLE_TAG_FLOAT32 128     // 0000 0000 1000 0000 
   27 #define BOTTLE_TAG_FLOAT64 (2 + 8) // 0000 0000 0000 1010 
   28 #define BOTTLE_TAG_STRING (4)      // 0000 0000 0000 0100 
   29 #define BOTTLE_TAG_BLOB (4 + 8)    // 0000 0000 0000 1100 
   30 #define BOTTLE_TAG_LIST 256        // 0000 0001 0000 0000 
   31 #define BOTTLE_TAG_DICT 512        // 0000 0010 0000 0000 
   44 #ifndef DOXYGEN_SHOULD_SKIP_THIS 
   50 #endif // DOXYGEN_SHOULD_SKIP_THIS 
   75 #if defined(SWIG) && (SWIG_VERSION < 0x300011) 
   83     using Searchable::check;
 
   84     using Searchable::findGroup;
 
  101     explicit Bottle(
const std::string& text);
 
  121     Bottle(std::initializer_list<yarp::os::Value> values);
 
  156     inline 
void addInt(
int x)
 
  158         addInt32(
static_cast<std::int32_t
>(x));
 
  166     void addInt8(std::int8_t x);
 
  173     void addInt16(std::int16_t x);
 
  180     void addInt32(std::int32_t x);
 
  187     void addInt64(std::int64_t x);
 
  194     void addVocab(
int x);
 
  204     inline 
void addDouble(
double x)
 
  230     void addString(
const char* str);
 
  237     void addString(
const std::string& str);
 
  244     void add(
const Value& value);
 
  255     void add(
Value* value);
 
  295     Value& get(size_type index) 
const;
 
  302     size_type size() 
const;
 
  314     void fromString(
const std::string& text);
 
  322     void fromBinary(
const char* buf, 
size_t len);
 
  334     const char* toBinary(
size_t* size = 
nullptr);
 
  344     std::string 
toString() 
const override;
 
  385     void onCommencement() 
const override;
 
  387     bool check(
const std::string& key) 
const override;
 
  389     Value& find(
const std::string& key) 
const override;
 
  391     Bottle& findGroup(
const std::string& key) 
const override;
 
  393     bool isNull() 
const override;
 
  402     void copy(
const Bottle& alt, size_type first = 0, size_type len = npos);
 
  409     static Bottle& getNullBottle();
 
  417     bool operator==(
const Bottle& alt) 
const;
 
  425     bool operator!=(
const Bottle& alt) 
const;
 
  433     void append(
const Bottle& alt);
 
  459     int getSpecialization();
 
  468     static std::string describeBottleCode(
int code);
 
  472     void setReadOnly(
bool readOnly);
 
  477 #ifndef DOXYGEN_SHOULD_SKIP_THIS 
  482 #endif // DOXYGEN_SHOULD_SKIP_THIS 
  488 #endif // YARP_OS_BOTTLE_H 
  
 
A simple collection of objects that can be described and transmitted in a portable way.
This is a base class for objects that can be both read from and be written to the YARP network.
A base class for nested structures that can be searched.
static const size_type npos
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
constexpr std::int32_t BOTTLE_TAG_INT
A flexible data format for holding a bunch of numbers and strings.
A single item in a Bottle.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
An interface for writing to a network connection.
Bottle(std::initializer_list< yarp::os::Value > values)
Initializer list constructor.
#define YARP_DEPRECATED_INTERNAL_MSG(X)
An interface for reading from a network connection.
#define BOTTLE_TAG_FLOAT64
std::string toString(const T &value)
convert an arbitrary type to string.
The main, catch-all namespace for YARP.
RandScalar * implementation(void *t)
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
A single value (typically within a Bottle).
Utilities for manipulating the YARP network, excluding initialization and shutdown.
constexpr std::int32_t BOTTLE_TAG_DOUBLE
A class for storing options and configuration information.