VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtArchiver Class Reference
Inheritance diagram for DtArchiver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtArchiver (QString name)
virtual ~DtArchiver ()
virtual void add (QString value, int *toWrite)
 Use these routines to schedule a variable to be archived.
virtual void add (QString value, short *toWrite)
virtual void add (QString value, DtArchivableObject *toWrite)
virtual void add (QString value, QPen *toWrite)
virtual void add (QString value, QColor *toWrite)
virtual void add (QString value, double *toWrite)
virtual void add (QString value, bool *toWrite)
virtual void add (QString value, float *toWrite)
virtual void add (QString value, QString *toWrite)
virtual void add (QString value, char *toWrite)
virtual void add (QString value, QPoint *toWrite)
virtual void add (QString value, QPointF *toWrite)
virtual void add (QString value, QRect *toWrite)
virtual void add (QString value, QStringList *toWrite)
virtual void add (QString value, void *toWrite, DtArchiverFunction write, DtArchiverFunction read, bool writeLevel=false)
template<typename Key , typename Value >
void add (QString value, QHash< Key, Value > *toWrite)
 Currently only supports QDict.
template<typename T >
void add (QString value, QList< T > *toWrite)
template<typename T >
void add (QString value, QLinkedList< T > *toWrite)
template<typename T >
void add (QString value, QVector< T > *toWrite)
virtual void remove (void *toWrite)
 Removes the specified item from the archiver.
virtual void setLevel (int iLevel)
virtual int level () const
virtual void setName (QString name)
virtual QString name () const
virtual void read (QTextStream &ts)
 archival operators
virtual void write (QTextStream &ts)
virtual void writeObject (QTextStream &ts, int level, DtArchiveObject *obj)
virtual void readObject (DtArchiveObject *obj)

Static Public Member Functions

static void addCreator (const QString &name, DtArchivableObjectCreator fnc)
static bool hasCreatorFor (DtArchivableObject *obj)
static DtArchivableCreatorInfocreatorFor (const QString &name)
static DtArchivableObjectcreateObject (const QString &name)
static void cleanupCreators ()
 Call to cleanup memory owned by myObjectCreators member.

Protected Member Functions

virtual void writeLevel (QTextStream &ts, int iLevel)
virtual void parseBlock (QTextStream &ts)
 This call will read a block of code that can be used to parse out other object information.
virtual QString readBlock (QTextStream &ts)
 Reads a balanced block (parens) of text.
virtual QString readNamedBlock (QString &name, QTextStream &ts)
 Reads a block and strips out the main name.
virtual void buildArchiveDictionary (QTextStream &block)
 Builds the dictionary for object/name pairs from the stream supplied.

Protected Attributes

DtPtrQList< DtArchiveObject * > myArchivableObjects
QHash< QString, QString > myArchiveBlocks
int myLevel
QString myName

Static Protected Attributes

static QHash< QString,
DtArchivableCreatorInfo > * 
myObjectCreators

Constructor & Destructor Documentation

DtArchiver::DtArchiver ( QString  name)
virtual DtArchiver::~DtArchiver ( ) [virtual]

Member Function Documentation

virtual void DtArchiver::add ( QString  value,
int *  toWrite 
) [virtual]

Use these routines to schedule a variable to be archived.

virtual void DtArchiver::add ( QString  value,
short *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
DtArchivableObject toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QPen *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QColor *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
double *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
bool toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
float *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QString *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
char *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QPoint *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QPointF *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QRect *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
QStringList *  toWrite 
) [virtual]
virtual void DtArchiver::add ( QString  value,
void *  toWrite,
DtArchiverFunction  write,
DtArchiverFunction  read,
bool  writeLevel = false 
) [virtual]
template<typename Key , typename Value >
void DtArchiver::add ( QString  value,
QHash< Key, Value > *  toWrite 
)

Currently only supports QDict.

template<typename T >
void DtArchiver::add ( QString  value,
QList< T > *  toWrite 
)
template<typename T >
void DtArchiver::add ( QString  value,
QLinkedList< T > *  toWrite 
)
template<typename T >
void DtArchiver::add ( QString  value,
QVector< T > *  toWrite 
)
virtual void DtArchiver::remove ( void *  toWrite) [virtual]

Removes the specified item from the archiver.

virtual void DtArchiver::setLevel ( int  iLevel) [virtual]
virtual int DtArchiver::level ( ) const [virtual]
virtual void DtArchiver::setName ( QString  name) [virtual]
virtual QString DtArchiver::name ( ) const [virtual]
static void DtArchiver::addCreator ( const QString &  name,
DtArchivableObjectCreator  fnc 
) [static]
static DtArchivableCreatorInfo* DtArchiver::creatorFor ( const QString &  name) [static]
static DtArchivableObject* DtArchiver::createObject ( const QString &  name) [static]
static void DtArchiver::cleanupCreators ( ) [static]

Call to cleanup memory owned by myObjectCreators member.

Current called as part of application cleanup

virtual void DtArchiver::read ( QTextStream &  ts) [virtual]

archival operators

virtual void DtArchiver::write ( QTextStream &  ts) [virtual]
virtual void DtArchiver::writeObject ( QTextStream &  ts,
int  level,
DtArchiveObject obj 
) [virtual]
virtual void DtArchiver::readObject ( DtArchiveObject obj) [virtual]
virtual void DtArchiver::writeLevel ( QTextStream &  ts,
int  iLevel 
) [protected, virtual]
virtual void DtArchiver::parseBlock ( QTextStream &  ts) [protected, virtual]

This call will read a block of code that can be used to parse out other object information.

The block of code will be defined by the name of this object. This is object does not have a name, the block of code will be read until an unbalanced close paren is seen.

virtual QString DtArchiver::readBlock ( QTextStream &  ts) [protected, virtual]

Reads a balanced block (parens) of text.

virtual QString DtArchiver::readNamedBlock ( QString &  name,
QTextStream &  ts 
) [protected, virtual]

Reads a block and strips out the main name.

virtual void DtArchiver::buildArchiveDictionary ( QTextStream &  block) [protected, virtual]

Builds the dictionary for object/name pairs from the stream supplied.


Member Data Documentation

QHash<QString, QString> DtArchiver::myArchiveBlocks [protected]
QHash<QString, DtArchivableCreatorInfo>* DtArchiver::myObjectCreators [static, protected]
int DtArchiver::myLevel [protected]
QString DtArchiver::myName [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)