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::VisitorExportToVLB Class Reference

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

#include <VisitorExportToVLB.hpp>

+ Inheritance diagram for vlX::VisitorExportToVLB:

Public Member Functions

 VisitorExportToVLB (vl::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 (vl::VirtualFile *file)
 
vl::VirtualFileoutputFile ()
 
const vl::VirtualFileoutputFile () const
 
- Public Member Functions inherited from vlX::Visitor
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 VisitorExportToVLB.hpp.

Constructor & Destructor Documentation

◆ VisitorExportToVLB()

vlX::VisitorExportToVLB::VisitorExportToVLB ( vl::VirtualFile file = NULL)
inline

Definition at line 48 of file VisitorExportToVLB.hpp.

References NULL, and setOutputFile().

Member Function Documentation

◆ encodeIntegers()

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

Definition at line 342 of file VisitorExportToVLB.hpp.

Referenced by visitArray().

◆ isUsed()

bool vlX::VisitorExportToVLB::isUsed ( const std::string &  uid)
inline

Definition at line 54 of file VisitorExportToVLB.hpp.

References VL_TRAP.

◆ needsDoublePrecision()

bool vlX::VisitorExportToVLB::needsDoublePrecision ( const double *  in,
size_t  count 
)
inline

Definition at line 236 of file VisitorExportToVLB.hpp.

Referenced by visitArray().

◆ outputFile() [1/2]

vl::VirtualFile* vlX::VisitorExportToVLB::outputFile ( )
inline

Definition at line 386 of file VisitorExportToVLB.hpp.

References vl::ref< T >::get().

◆ outputFile() [2/2]

const vl::VirtualFile* vlX::VisitorExportToVLB::outputFile ( ) const
inline

Definition at line 388 of file VisitorExportToVLB.hpp.

References vl::ref< T >::get().

◆ setIDSet()

void vlX::VisitorExportToVLB::setIDSet ( std::map< std::string, int > *  uids)
inline

Definition at line 370 of file VisitorExportToVLB.hpp.

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

◆ setOutputFile()

void vlX::VisitorExportToVLB::setOutputFile ( vl::VirtualFile file)
inline

◆ uidSet() [1/2]

std::map< std::string, int >* vlX::VisitorExportToVLB::uidSet ( )
inline

Definition at line 372 of file VisitorExportToVLB.hpp.

◆ uidSet() [2/2]

const std::map< std::string, int >* vlX::VisitorExportToVLB::uidSet ( ) const
inline

Definition at line 374 of file VisitorExportToVLB.hpp.

◆ visitArray() [1/2]

virtual void vlX::VisitorExportToVLB::visitArray ( VLXArrayInteger arr)
inlinevirtual

◆ visitArray() [2/2]

virtual void vlX::VisitorExportToVLB::visitArray ( VLXArrayReal arr)
inlinevirtual

◆ visitList()

virtual void vlX::VisitorExportToVLB::visitList ( VLXList list)
inlinevirtual

◆ visitStructure()

virtual void vlX::VisitorExportToVLB::visitStructure ( VLXStructure obj)
inlinevirtual

◆ writeHeader()

void vlX::VisitorExportToVLB::writeHeader ( )
inline

◆ writeInteger()

void vlX::VisitorExportToVLB::writeInteger ( long long  n)
inline

◆ writeString()

void vlX::VisitorExportToVLB::writeString ( const char *  str)
inline

Definition at line 306 of file VisitorExportToVLB.hpp.

References vl::VirtualFile::write(), and writeInteger().

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

◆ writeValue()

void vlX::VisitorExportToVLB::writeValue ( VLXValue value)
inline

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