This is the main API for the OpenDDL-parser.
More...
#include <OpenDDLParser.h>
|
typedef void(* | logCallback) (LogSeverity severity, const std::string &msg) |
| The log callback function pointer.
|
|
|
static void | normalizeBuffer (std::vector< char > &buffer) |
|
static char * | parseName (char *in, char *end, Name **name) |
|
static char * | parseIdentifier (char *in, char *end, Identifier **id) |
|
static char * | parsePrimitiveDataType (char *in, char *end, Value::ValueType &type, size_t &len) |
|
static char * | parseReference (char *in, char *end, std::vector< Name * > &names) |
|
static char * | parseBooleanLiteral (char *in, char *end, Value **boolean) |
|
static char * | parseIntegerLiteral (char *in, char *end, Value **integer, Value::ValueType integerType=Value::ddl_int32) |
|
static char * | parseFloatingLiteral (char *in, char *end, Value **floating) |
|
static char * | parseStringLiteral (char *in, char *end, Value **stringData) |
|
static char * | parseHexaLiteral (char *in, char *end, Value **data) |
|
static char * | parseProperty (char *in, char *end, Property **prop) |
|
static char * | parseDataList (char *in, char *end, Value **data, size_t &numValues, Reference **refs, size_t &numRefs) |
|
static char * | parseDataArrayList (char *in, char *end, DataArrayList **dataList) |
|
static const char * | getVersion () |
|
This is the main API for the OpenDDL-parser.
Use instances of this class to manage the parsing and handling of your parser contexts.
OpenDDLParser::OpenDDLParser |
( |
char * |
buffer, |
|
|
size_t |
len |
|
) |
| |
The class constructor.
- Parameters
-
buffer | [in] The buffer |
len | [in] Size of the buffer |
const char* OpenDDLParser::getBuffer |
( |
| ) |
const |
Returns the buffer pointer.
- Returns
- The buffer pointer.
size_t OpenDDLParser::getBufferSize |
( |
| ) |
const |
Returns the size of the buffer.
- Returns
- The buffer size.
Context* OpenDDLParser::getContext |
( |
| ) |
const |
Returns the parser context, only available in case of a succeeded parsing.
- Returns
- Pointer to the active context or ddl_nullptr.
Getter for the log callback.
- Returns
- The current log callback.
DDLNode* OpenDDLParser::getRoot |
( |
| ) |
const |
Returns the root node.
- Returns
- The root node.
bool OpenDDLParser::parse |
( |
| ) |
|
Starts the parsing of the OpenDDL-file.
- Returns
- True in case of success, false in case of an error.
void OpenDDLParser::setBuffer |
( |
char * |
buffer, |
|
|
size_t |
len |
|
) |
| |
Assigns a new buffer to parse.
- Parameters
-
buffer | [in] The buffer |
len | [in] Size of the buffer |
void OpenDDLParser::setBuffer |
( |
const std::vector< char > & |
buffer | ) |
|
Assigns a new buffer to parse.
- Parameters
-
buffer | [in] The buffer as a std::vector. |
void OpenDDLParser::setLogCallback |
( |
logCallback |
callback | ) |
|
Setter for an own log callback function.
- Parameters
-
callback | [in] The own callback. |
The documentation for this class was generated from the following file: