Projects‎ > ‎USDS‎ > ‎USDS Basic parser‎ > ‎

USDS Basic parser API

Class BasicParser

Constructors

BasicParser() 

Method for the Dictionaries

void addDictionaryFromText(const char* text_dictionary, int size, usdsEncodes encode) throw(...); 
void CurrentDictionaryToText(usdsEncodes encode, std::string* text) throw(...);
void selectDictionary(int id, unsigned char major, unsigned char minor) throw(...);

Geting Information about the Dictionary

int getDictionaryID() throw(...); unsigned char getDictionaryMajor() throw(...); unsigned char getDictionaryMinor() throw(...); 

Finding tags and Fields in Dictionary

int getTagID(const char* name) throw(...);
int getFieldID(int tag_id, const char* name) throw(...);
UsdsBaseType* getFirstTag() throw(...);
UsdsBaseType* getFirstTag(const char* name) throw(...);
UsdsStruct* getFirstStructTag(const char* name) throw(...);

Creating DOM-object

UsdsBaseType* addTag(int id) throw(...);
UsdsStruct* addStructTag(const char* name) throw(...);


Working with the USDS Binary Document

void encode(BinaryOutput* buff, bool with_head, bool with_dictionary, bool with_body) throw(...);
void decode(const unsigned char* data, size_t data_size) throw(...);

Working with Text Formats

void getJSON(usdsEncodes encode, std::string* text) throw(...); 

Clearing of the Parser

void clear();
void clearBody();

Class UsdsStruct

Tag Information

const char* getName() throw(...);
size_t getNameSize() throw(...);
int getID() throw(...);
usdsTypes getType();
const char* getTypeName();

Navigation

UsdsBaseType* getNext() throw (...);
UsdsBaseType* getPrevious() throw (...);
UsdsBaseType* getParent() throw (...);

Filed Initializing

void setFieldValue(const char* name, int value) throw (...);
void setFieldValue(const char* name, long long value) throw (...);
void setFieldValue(const char* name, double value) throw (...);
void setFieldValue(const char* name, const char* value) throw (...);
void setFieldValue(const char* name, bool value) throw (...);

void setFieldValue(int id, int value) throw (...);
void setFieldValue(int id, long long value) throw (...);
void setFieldValue(int id, double value) throw (...);
void setFieldValue(int id, const char* value) throw (...);
void setFieldValue(int id, bool value) throw (...);

Getting the Field Values

void getFieldValue(const char* name, int* value) throw (...);
void getFieldValue(const char* name, long long* value) throw (...);
void getFieldValue(const char* name, double* value) throw (...);
void getFieldValue(const char* name, const char** value) throw (...);
void getFieldValue(const char* name, bool* value) throw (...);

void getFieldValue(int id, int* value) throw (...);
void getFieldValue(int id, long long* value) throw (...);
void getFieldValue(int id, double* value) throw (...);
void getFieldValue(int id, const char** value) throw (...);
void getFieldValue(int id, bool* value) throw (...)


Working with the Array Fileds

UsdsArray* getArrayField(const char* name) throw (...);
UsdsArray* getArrayField(int id) throw (...);



Class UsdsArray

Getting Array's Element Type

size_t getElementNumber() throw(...);
usdsTypes getElementType() throw(...);

Working with Array's Element with the Type "TAG"

UsdsBaseType* addTagElement() throw(...);
UsdsBaseType* getTagElement(size_t number) throw(...);



2015.11.03 Andrey Abramov
CC BY 4.0

Comments

The gadget spec URL could not be found