Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Parses a VLT file translating it into a VLX hierarchy. More...
#include <VLXParserVLB.hpp>
Public Member Functions | |
VLXParserVLB () | |
bool | parseHeader () |
bool | readChunk (unsigned char &chunk) |
bool | readInteger (long long &n) |
void | decodeIntegers (const std::vector< unsigned char > &in, std::vector< long long > &out) |
bool | readString (std::string &str) |
bool | parse () |
bool | parseStructure (VLXStructure *st) |
bool | parseList (VLXList *list) |
bool | readValue (VLXValue &val) |
void | setInputFile (VirtualFile *file) |
VirtualFile * | inputFile () |
const VirtualFile * | inputFile () const |
Parses a VLT file translating it into a VLX hierarchy.
Definition at line 41 of file VLXParserVLB.hpp.
vl::VLXParserVLB::VLXParserVLB | ( | ) | [inline] |
Definition at line 46 of file VLXParserVLB.hpp.
References vl::VLXParser::mVersion.
bool vl::VLXParserVLB::parseHeader | ( | ) | [inline, virtual] |
Implements vl::VLXParser.
Definition at line 51 of file VLXParserVLB.hpp.
References inputFile(), vl::VLXParser::mEncoding, vl::VLXParser::mVersion, vl::VirtualFile::read(), and vl::VirtualFile::readUInt8().
Referenced by parse().
bool vl::VLXParserVLB::readChunk | ( | unsigned char & | chunk ) | [inline] |
Definition at line 80 of file VLXParserVLB.hpp.
References inputFile(), and vl::VirtualFile::read().
Referenced by parse(), and readValue().
bool vl::VLXParserVLB::readInteger | ( | long long & | n ) | [inline] |
Definition at line 82 of file VLXParserVLB.hpp.
References inputFile(), and vl::VirtualFile::read().
Referenced by parseList(), parseStructure(), readString(), and readValue().
void vl::VLXParserVLB::decodeIntegers | ( | const std::vector< unsigned char > & | in, |
std::vector< long long > & | out | ||
) | [inline] |
Definition at line 108 of file VLXParserVLB.hpp.
Referenced by readValue().
bool vl::VLXParserVLB::readString | ( | std::string & | str ) | [inline] |
Definition at line 132 of file VLXParserVLB.hpp.
References inputFile(), vl::VirtualFile::read(), readInteger(), and VL_CHECK.
Referenced by parseList(), parseStructure(), and readValue().
bool vl::VLXParserVLB::parse | ( | ) | [inline, virtual] |
Implements vl::VLXParser.
Definition at line 147 of file VLXParserVLB.hpp.
References vl::VirtualFile::close(), vl::Log::error(), vl::ref< T >::get(), inputFile(), vl::VLXParser::mEncoding, vl::VLXParser::mMetadata, vl::VLXParser::mStructures, vl::VLXParser::mVersion, vl::OM_ReadOnly, vl::VirtualFile::open(), parseHeader(), vl::VLXParser::parseMetadata(), parseStructure(), readChunk(), and vl::VLB_ChunkStructure.
bool vl::VLXParserVLB::parseStructure | ( | VLXStructure * | st ) | [inline] |
Definition at line 219 of file VLXParserVLB.hpp.
References readInteger(), readString(), readValue(), vl::VLXStructure::setID(), vl::VLXStructure::Value::setKey(), vl::VLXTaggedValue::setTag(), vl::VLXStructure::value(), and vl::VLXStructure::Value::value().
Referenced by parse(), and readValue().
bool vl::VLXParserVLB::parseList | ( | VLXList * | list ) | [inline] |
Definition at line 257 of file VLXParserVLB.hpp.
References readInteger(), readString(), readValue(), vl::VLXTaggedValue::setTag(), and vl::VLXList::value().
Referenced by readValue().
bool vl::VLXParserVLB::readValue | ( | VLXValue & | val ) | [inline] |
Definition at line 285 of file VLXParserVLB.hpp.
References decodeIntegers(), vl::decompress(), vl::VLXValue::getArrayInteger(), vl::VLXValue::getArrayReal(), vl::VLXValue::getList(), vl::VLXValue::getRawtextBlock(), vl::VLXValue::getStructure(), inputFile(), parseList(), parseStructure(), vl::VirtualFile::read(), readChunk(), vl::VirtualFile::readDouble(), vl::VirtualFile::readFloat(), readInteger(), readString(), vl::VirtualFile::readUInt8(), vl::VLXValue::setArrayInteger(), vl::VLXValue::setArrayReal(), vl::VLXValue::setBool(), vl::VLXValue::setID(), vl::VLXValue::setIdentifier(), vl::VLXValue::setInteger(), vl::VLXValue::setList(), vl::VLXValue::setRawtextBlock(), vl::VLXValue::setReal(), vl::VLXValue::setString(), vl::VLXValue::setStructure(), vl::VLXRawtextBlock::setValue(), vl::VLXArrayTemplate< T >::value(), VL_CHECK, vl::VLB_ChunkArrayInteger, vl::VLB_ChunkArrayRealDouble, vl::VLB_ChunkArrayRealFloat, vl::VLB_ChunkBool, vl::VLB_ChunkID, vl::VLB_ChunkIdentifier, vl::VLB_ChunkInteger, vl::VLB_ChunkList, vl::VLB_ChunkRawtext, vl::VLB_ChunkRealDouble, vl::VLB_ChunkString, and vl::VLB_ChunkStructure.
Referenced by parseList(), and parseStructure().
void vl::VLXParserVLB::setInputFile | ( | VirtualFile * | file ) | [inline] |
Definition at line 497 of file VLXParserVLB.hpp.
Referenced by vl::VLXSerializer::loadVLB().
VirtualFile* vl::VLXParserVLB::inputFile | ( | ) | [inline] |
Definition at line 499 of file VLXParserVLB.hpp.
References vl::ref< T >::get().
Referenced by parse(), parseHeader(), readChunk(), readInteger(), readString(), and readValue().
const VirtualFile* vl::VLXParserVLB::inputFile | ( | ) | const [inline] |
Definition at line 501 of file VLXParserVLB.hpp.
References vl::ref< T >::get().