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 | Protected Attributes | List of all members
vlX::Parser Class Referenceabstract

Base class for VLX parsers. More...

#include <Parser.hpp>

+ Inheritance diagram for vlX::Parser:

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< 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...
 

Protected Attributes

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
 

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 Parser.hpp.

Member Function Documentation

◆ encoding()

const std::string& vlX::Parser::encoding ( ) const
inline

The encoding used to encode strings.

Definition at line 91 of file Parser.hpp.

References mEncoding.

◆ link()

bool vlX::Parser::link ( )
inline

Links the.

Definition at line 52 of file Parser.hpp.

References vlX::Linker::add(), vlX::Linker::link(), and mStructures.

◆ metadata()

const std::map< std::string, VLXValue >& vlX::Parser::metadata ( ) const
inline

The imported metadata.

Definition at line 88 of file Parser.hpp.

References mMetadata.

◆ parse()

virtual bool vlX::Parser::parse ( )
pure virtual

Implemented in vlX::ParserVLB, and vlX::ParserVLT.

◆ parseHeader()

virtual bool vlX::Parser::parseHeader ( )
pure virtual

Implemented in vlX::ParserVLT, and vlX::ParserVLB.

◆ parseMetadata()

void vlX::Parser::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 Parser.hpp.

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

Referenced by vlX::ParserVLT::parse(), and vlX::ParserVLB::parse().

◆ structures() [1/2]

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

The imported structures.

Definition at line 82 of file Parser.hpp.

References mStructures.

◆ structures() [2/2]

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

The imported structures.

Definition at line 85 of file Parser.hpp.

References mStructures.

◆ version()

unsigned short vlX::Parser::version ( ) const
inline

The VLX language version.

Definition at line 94 of file Parser.hpp.

References mVersion.

Member Data Documentation

◆ mEncoding

std::string vlX::Parser::mEncoding
protected

◆ mMetadata

std::map< std::string, VLXValue > vlX::Parser::mMetadata
protected

Definition at line 100 of file Parser.hpp.

Referenced by metadata(), vlX::ParserVLT::parse(), vlX::ParserVLB::parse(), and parseMetadata().

◆ mStructures

std::vector< vl::ref<VLXStructure> > vlX::Parser::mStructures
protected

◆ mVersion

unsigned short vlX::Parser::mVersion
protected

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