libutil++  1.9.3
 All Classes Functions Variables
Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
sella::util::MessagePack Class Reference

Public Member Functions

 MessagePack (uint8_t *&buffer, uint32_t &length, uint32_t offset=0, uint32_t unused=0, bool resizable=false) THROWS(MemoryException)
 
uint32_t create (uint32_t offset) NO_EXCEPTIONS
 
bool verify (void) NO_EXCEPTIONS
 
uint32_t create (uint32_t offset, const char *index) NO_EXCEPTIONS
 
uint32_t create (uint32_t offset, const uint8_t *buffer, uint32_t length) NO_EXCEPTIONS
 
uint32_t create (uint32_t offset, MessagePack &other, uint32_t length) NO_EXCEPTIONS
 
uint32_t select (uint32_t offset, MessagePack &other, uint32_t source) NO_EXCEPTIONS
 
uint32_t select (uint32_t offset, const uint8_t *buffer, uint32_t length) NO_EXCEPTIONS
 
uint32_t select (uint32_t offset, const char *index) NO_EXCEPTIONS
 
uint32_t remove (uint32_t offset, const char *index) NO_EXCEPTIONS
 
bool update (uint32_t offset, MessagePack &other, uint32_t source) NO_EXCEPTIONS
 
bool update (uint32_t offset, const char *value) NO_EXCEPTIONS
 
bool update (uint32_t offset, const char *value, uint32_t length) NO_EXCEPTIONS
 
bool update (uint32_t offset, const std::string &value) NO_EXCEPTIONS
 
bool update (uint32_t offset, bool value) NO_EXCEPTIONS
 
bool update (uint32_t offset, int64_t value) NO_EXCEPTIONS
 
bool update (uint32_t offset, uint64_t value) NO_EXCEPTIONS
 
bool update (uint32_t offset, double value) NO_EXCEPTIONS
 
bool update (uint32_t offset) NO_EXCEPTIONS
 
bool decode (char *buffer, uint32_t length, uint32_t offset) NO_EXCEPTIONS
 
bool decode (std::string &buffer, uint32_t offset) NO_EXCEPTIONS
 
bool decode (bool &buffer, uint32_t offset) NO_EXCEPTIONS
 
bool decode (int64_t &buffer, uint32_t offset) NO_EXCEPTIONS
 
bool decode (uint64_t &buffer, uint32_t offset) NO_EXCEPTIONS
 
bool decode (double &buffer, uint32_t offset) NO_EXCEPTIONS
 
uint32_t decode_first (uint32_t offset) NO_EXCEPTIONS
 
int compare (uint32_t offset, const char *value) NO_EXCEPTIONS
 
int compare (uint32_t offset, const char *value, uint32_t length) NO_EXCEPTIONS
 
int compare (uint32_t offset, const std::string &value) NO_EXCEPTIONS
 
int compare (uint32_t offset, bool value) NO_EXCEPTIONS
 
int compare (uint32_t offset, int64_t value) NO_EXCEPTIONS
 
int compare (uint32_t offset, uint64_t value) NO_EXCEPTIONS
 
int compare (uint32_t offset, double value) NO_EXCEPTIONS
 
void scan (uint32_t offset, std::function< bool(uint32_t i, uint32_t v)> callback)
 
void scan (uint32_t offset, mp_scan_callback callback, void *parameters)
 
uint8_t typeof (uint32_t offset) NO_EXCEPTIONS
 
void print (bool debug=false) NO_EXCEPTIONS
 
std::string json (uint32_t offset=0) NO_EXCEPTIONS
 
uint32_t append_object (uint32_t offset, uint32_t count) NO_EXCEPTIONS
 
uint32_t append_vector (uint32_t offset, uint32_t count) NO_EXCEPTIONS
 
uint32_t memcpy (uint8_t *buffer, uint32_t length, uint32_t offset) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset, const char *value) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset, const std::string &value) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset, bool value) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset, int64_t value) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset, uint64_t value) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset, double value) NO_EXCEPTIONS
 
uint32_t append (uint32_t offset) NO_EXCEPTIONS
 
bool recast (uint32_t offset, uint32_t type) NO_EXCEPTIONS
 
bool resize (uint32_t offset, uint32_t size) NO_EXCEPTIONS
 
uint32_t count (uint32_t offset) NO_EXCEPTIONS
 
uint32_t strlen (uint32_t offset) NO_EXCEPTIONS
 
uint32_t bytes (uint32_t offset) NO_EXCEPTIONS
 
uint32_t size (void) NO_EXCEPTIONS
 
uint32_t length (void) NO_EXCEPTIONS
 
uint32_t next (uint32_t offset) NO_EXCEPTIONS
 
uint32_t down (uint32_t offset) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key, const char *value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key, const std::string &value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key, bool value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key, int64_t value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key, uint64_t value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key, double value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const char *key) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key, const char *value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key, const std::string &value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key, bool value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key, int64_t value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key, uint64_t value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key, double value) NO_EXCEPTIONS
 
uint32_t append_kv (uint32_t offset, const std::string &key) NO_EXCEPTIONS
 

Static Public Attributes

static const uint8_t TYPE_NULL = 0x00
 
static const uint8_t TYPE_VECTOR = 0x01
 
static const uint8_t TYPE_OBJECT = 0x02
 
static const uint8_t TYPE_STRING = 0x03
 
static const uint8_t TYPE_BOOLEAN = 0x04
 
static const uint8_t TYPE_SIGNED = 0x05
 
static const uint8_t TYPE_UNSIGNED = 0x06
 
static const uint8_t TYPE_FLOAT = 0x07
 
static const uint8_t TYPE_BINARY = 0x08
 
static const uint8_t TYPE_EXTENSION = 0x09
 
static const uint8_t TYPE_UNKNOWN = 0xff
 

Protected Member Functions

uint32_t search (uint32_t offset, const char *index, uint32_t bytes, bool create) NO_EXCEPTIONS
 
uint32_t select (uint32_t offset, uint32_t index, bool create) NO_EXCEPTIONS
 
uint32_t select (uint32_t offset, const char *index, uint32_t bytes, bool create) NO_EXCEPTIONS
 
uint32_t insert (uint32_t offset, const char *index) NO_EXCEPTIONS
 
uint32_t insert (uint32_t offset, uint32_t index, uint32_t count) NO_EXCEPTIONS
 
void scan_vector (uint32_t length, uint32_t offset, std::function< bool(uint32_t i, uint32_t v)> callback)
 
void scan_vector (uint32_t length, uint32_t offset, mp_scan_callback callback, void *parameters)
 
void scan_object (uint32_t length, uint32_t offset, std::function< bool(uint32_t i, uint32_t v)> callback)
 
void scan_object (uint32_t length, uint32_t offset, mp_scan_callback callback, void *parameters)
 
bool expand (uint32_t offset, uint32_t length) NO_EXCEPTIONS
 
bool reduce (uint32_t offset, uint32_t length) NO_EXCEPTIONS
 
double swap64 (double value) NO_EXCEPTIONS
 

Static Protected Member Functions

static bool select_vector_callback (uint32_t i, uint32_t v, void *p)
 
static bool select_object_callback (uint32_t i, uint32_t v, void *p)
 

Detailed Description

Definition at line 58 of file MessagePack.h.


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