Visualization Library 2.1.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | List of all members
vlX::ParserVLB Class Reference

Parses a VLT file translating it into a VLX hierarchy. More...

#include <ParserVLB.hpp>

+ Inheritance diagram for vlX::ParserVLB:

Public Member Functions

 ParserVLB ()
 
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 (vl::VirtualFile *file)
 
vl::VirtualFileinputFile ()
 
const vl::VirtualFileinputFile () const
 
- Public Member Functions inherited from vlX::Parser
bool link ()
 Links the. More...
 
void parseMetadata ()
 Moves the <Metadata> key/value pairs in the Metadata map for quick and easy access and removes the <Metadata> structure. More...
 
std::vector< vl::ref< VLXStructure > > & structures ()
 The imported structures. More...
 
const std::vector< vl::ref< VLXStructure > > & structures () const
 The imported structures. More...
 
const std::map< std::string, VLXValue > & metadata () const
 The imported metadata. More...
 
const std::string & encoding () const
 The encoding used to encode strings. More...
 
unsigned short version () const
 The VLX language version. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 
- Protected Attributes inherited from vlX::Parser
std::string mEncoding
 
unsigned short mVersion
 
std::vector< vl::ref< VLXStructure > > mStructures
 
std::map< std::string, VLXValuemMetadata
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

Parses a VLT file translating it into a VLX hierarchy.

Definition at line 42 of file ParserVLB.hpp.

Constructor & Destructor Documentation

◆ ParserVLB()

vlX::ParserVLB::ParserVLB ( )
inline

Definition at line 47 of file ParserVLB.hpp.

References vlX::Parser::mVersion.

Member Function Documentation

◆ decodeIntegers()

void vlX::ParserVLB::decodeIntegers ( const std::vector< unsigned char > &  in,
std::vector< long long > &  out 
)
inline

Definition at line 109 of file ParserVLB.hpp.

Referenced by readValue().

◆ inputFile() [1/2]

vl::VirtualFile* vlX::ParserVLB::inputFile ( )
inline

Definition at line 500 of file ParserVLB.hpp.

Referenced by parse(), parseHeader(), readChunk(), readInteger(), readString(), and readValue().

◆ inputFile() [2/2]

const vl::VirtualFile* vlX::ParserVLB::inputFile ( ) const
inline

Definition at line 502 of file ParserVLB.hpp.

◆ parse()

bool vlX::ParserVLB::parse ( )
inlinevirtual

◆ parseHeader()

bool vlX::ParserVLB::parseHeader ( )
inlinevirtual

◆ parseList()

bool vlX::ParserVLB::parseList ( VLXList list)
inline

◆ parseStructure()

bool vlX::ParserVLB::parseStructure ( VLXStructure st)
inline

◆ readChunk()

bool vlX::ParserVLB::readChunk ( unsigned char &  chunk)
inline

Definition at line 81 of file ParserVLB.hpp.

References inputFile(), and vl::VirtualFile::read().

Referenced by parse(), and readValue().

◆ readInteger()

bool vlX::ParserVLB::readInteger ( long long &  n)
inline

Definition at line 83 of file ParserVLB.hpp.

References inputFile(), and vl::VirtualFile::read().

Referenced by parseList(), parseStructure(), readString(), and readValue().

◆ readString()

bool vlX::ParserVLB::readString ( std::string &  str)
inline

Definition at line 133 of file ParserVLB.hpp.

References inputFile(), vl::VirtualFile::read(), readInteger(), and VL_CHECK.

Referenced by parseList(), parseStructure(), and readValue().

◆ readValue()

bool vlX::ParserVLB::readValue ( VLXValue val)
inline

◆ setInputFile()

void vlX::ParserVLB::setInputFile ( vl::VirtualFile file)
inline

Definition at line 498 of file ParserVLB.hpp.

Referenced by vlX::VLXSerializer::loadVLB().


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