Visualization Library 2.0.0-b3

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::VLXParser Class Referenceabstract

Base class for VLX parsers. More...

#include <VLXParser.hpp>

+ Inheritance diagram for vl::VLXParser:

Public Member Functions

virtual bool parseHeader ()=0
 
virtual bool parse ()=0
 
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< ref< VLXStructure > > & structures ()
 The imported structures. More...
 
const std::vector< 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...
 

Protected Attributes

std::string mEncoding
 
unsigned short mVersion
 
std::vector< ref< VLXStructure > > mStructures
 
std::map< std::string, VLXValuemMetadata
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

Base class for VLX parsers.

Definition at line 41 of file VLXParser.hpp.

Member Function Documentation

◆ encoding()

const std::string& vl::VLXParser::encoding ( ) const
inline

The encoding used to encode strings.

Definition at line 91 of file VLXParser.hpp.

References mEncoding.

◆ link()

bool vl::VLXParser::link ( )
inline

Links the.

Definition at line 52 of file VLXParser.hpp.

References vl::VLXLinker::add(), vl::VLXLinker::link(), and mStructures.

◆ metadata()

const std::map< std::string, VLXValue >& vl::VLXParser::metadata ( ) const
inline

The imported metadata.

Definition at line 88 of file VLXParser.hpp.

References mMetadata.

◆ parse()

virtual bool vl::VLXParser::parse ( )
pure virtual

Implemented in vl::VLXParserVLB, and vl::VLXParserVLT.

◆ parseHeader()

virtual bool vl::VLXParser::parseHeader ( )
pure virtual

Implemented in vl::VLXParserVLT, and vl::VLXParserVLB.

◆ parseMetadata()

void vl::VLXParser::parseMetadata ( )
inline

Moves the <Metadata> key/value pairs in the Metadata map for quick and easy access and removes the <Metadata> structure.

Definition at line 63 of file VLXParser.hpp.

References mMetadata, mStructures, and vl::VLXStructure::value().

Referenced by vl::VLXParserVLT::parse(), and vl::VLXParserVLB::parse().

◆ structures() [1/2]

std::vector< ref<VLXStructure> >& vl::VLXParser::structures ( )
inline

The imported structures.

Definition at line 82 of file VLXParser.hpp.

References mStructures.

◆ structures() [2/2]

const std::vector< ref<VLXStructure> >& vl::VLXParser::structures ( ) const
inline

The imported structures.

Definition at line 85 of file VLXParser.hpp.

References mStructures.

◆ version()

unsigned short vl::VLXParser::version ( ) const
inline

The VLX language version.

Definition at line 94 of file VLXParser.hpp.

References mVersion.

Member Data Documentation

◆ mEncoding

std::string vl::VLXParser::mEncoding
protected

◆ mMetadata

std::map< std::string, VLXValue > vl::VLXParser::mMetadata
protected

◆ mStructures

std::vector< ref<VLXStructure> > vl::VLXParser::mStructures
protected

◆ mVersion

unsigned short vl::VLXParser::mVersion
protected

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