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 | List of all members
vl::VLXVisitorExportToVLB Class Reference

Translates a VLX hierarchy into VLB format writing to the provided VirtualFile. More...

#include <VLXVisitorExportToVLB.hpp>

+ Inheritance diagram for vl::VLXVisitorExportToVLB:

Public Member Functions

 VLXVisitorExportToVLB (VirtualFile *file=NULL)
 
bool isUsed (const std::string &uid)
 
void writeValue (VLXValue &value)
 
virtual void visitStructure (VLXStructure *obj)
 
virtual void visitList (VLXList *list)
 
virtual void visitArray (VLXArrayInteger *arr)
 
bool needsDoublePrecision (const double *in, size_t count)
 
virtual void visitArray (VLXArrayReal *arr)
 
void writeHeader ()
 
void writeString (const char *str)
 
void writeInteger (long long n)
 
void encodeIntegers (long long *val, int count, std::vector< unsigned char > &out)
 
void setIDSet (std::map< std::string, int > *uids)
 
std::map< std::string, int > * uidSet ()
 
const std::map< std::string, int > * uidSet () const
 
void setOutputFile (VirtualFile *file)
 
VirtualFileoutputFile ()
 
const VirtualFileoutputFile () const
 
- Public Member Functions inherited from vl::VLXVisitor
virtual void visitRawtextBlock (VLXRawtextBlock *)
 
bool isVisited (void *node)
 
void resetVisitedNodes ()
 
- 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 vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

Translates a VLX hierarchy into VLB format writing to the provided VirtualFile.

Definition at line 43 of file VLXVisitorExportToVLB.hpp.

Constructor & Destructor Documentation

◆ VLXVisitorExportToVLB()

vl::VLXVisitorExportToVLB::VLXVisitorExportToVLB ( VirtualFile file = NULL)
inline

Definition at line 48 of file VLXVisitorExportToVLB.hpp.

References NULL, and setOutputFile().

Member Function Documentation

◆ encodeIntegers()

void vl::VLXVisitorExportToVLB::encodeIntegers ( long long *  val,
int  count,
std::vector< unsigned char > &  out 
)
inline

Definition at line 342 of file VLXVisitorExportToVLB.hpp.

Referenced by visitArray().

◆ isUsed()

bool vl::VLXVisitorExportToVLB::isUsed ( const std::string &  uid)
inline

Definition at line 54 of file VLXVisitorExportToVLB.hpp.

References VL_TRAP.

◆ needsDoublePrecision()

bool vl::VLXVisitorExportToVLB::needsDoublePrecision ( const double *  in,
size_t  count 
)
inline

Definition at line 236 of file VLXVisitorExportToVLB.hpp.

Referenced by visitArray().

◆ outputFile() [1/2]

VirtualFile* vl::VLXVisitorExportToVLB::outputFile ( )
inline

Definition at line 386 of file VLXVisitorExportToVLB.hpp.

◆ outputFile() [2/2]

const VirtualFile* vl::VLXVisitorExportToVLB::outputFile ( ) const
inline

Definition at line 388 of file VLXVisitorExportToVLB.hpp.

◆ setIDSet()

void vl::VLXVisitorExportToVLB::setIDSet ( std::map< std::string, int > *  uids)
inline

Definition at line 370 of file VLXVisitorExportToVLB.hpp.

Referenced by vl::VLXSerializer::saveVLB().

◆ setOutputFile()

void vl::VLXVisitorExportToVLB::setOutputFile ( VirtualFile file)
inline

◆ uidSet() [1/2]

std::map< std::string, int >* vl::VLXVisitorExportToVLB::uidSet ( )
inline

Definition at line 372 of file VLXVisitorExportToVLB.hpp.

◆ uidSet() [2/2]

const std::map< std::string, int >* vl::VLXVisitorExportToVLB::uidSet ( ) const
inline

Definition at line 374 of file VLXVisitorExportToVLB.hpp.

◆ visitArray() [1/2]

virtual void vl::VLXVisitorExportToVLB::visitArray ( VLXArrayInteger arr)
inlinevirtual

◆ visitArray() [2/2]

virtual void vl::VLXVisitorExportToVLB::visitArray ( VLXArrayReal arr)
inlinevirtual

◆ visitList()

virtual void vl::VLXVisitorExportToVLB::visitList ( VLXList list)
inlinevirtual

◆ visitStructure()

virtual void vl::VLXVisitorExportToVLB::visitStructure ( VLXStructure obj)
inlinevirtual

◆ writeHeader()

void vl::VLXVisitorExportToVLB::writeHeader ( )
inline

Definition at line 295 of file VLXVisitorExportToVLB.hpp.

Referenced by vl::VLXSerializer::saveVLB().

◆ writeInteger()

void vl::VLXVisitorExportToVLB::writeInteger ( long long  n)
inline

◆ writeString()

void vl::VLXVisitorExportToVLB::writeString ( const char *  str)
inline

Definition at line 306 of file VLXVisitorExportToVLB.hpp.

References writeInteger().

Referenced by visitArray(), visitList(), visitStructure(), and writeValue().

◆ writeValue()

void vl::VLXVisitorExportToVLB::writeValue ( VLXValue value)
inline

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