VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
DtRwVariableBindings Class Reference

ReaderWriter object that maintains a list of reader-writer variable bindings. More...

Inheritance diagram for DtRwVariableBindings:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtRwVariableBindings (const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
 DtRwVariableBindings (const DtString &name, const DtRwVariableBindings &orig, DtReaderWriterRegistry *parentRegistry=0)
DtRwVariableBindingsoperator= (const DtRwVariableBindings &orig)
virtual ~DtRwVariableBindings ()
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Reads in items, using the factory to read the correct types.
virtual void writeSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Writes out registry data, but includes the type strings when writing.
virtual DtReaderWriteraddVariableBinding (const DtSymbolString &name, const char *type)
 Adds new variable binding to registry.
virtual const char * readerWriterType () const
 Used to supply a string type that this reader writer type is.
virtual const DtReaderWriterfindVariableBinding (const DtString &rwTypeString, const DtString &variableName) const
 Looks for the specified name/type combination in the registry, and returns a pointer to that RW object if it is found.
virtual DtReaderWriterfindVariableBinding (const DtString &rwTypeString, const DtString &variableName)
 Looks for the specified name/type combination in the registry, and returns a pointer to that RW object if it is found.

Static Public Member Functions

static DtRwVariableBindingscreateBinding (const std::list< DtReaderWriter::DtVariableNameType > &)
 Creates a new instance of this class and creates all elements found in the list and adds it to this variables registry.

Protected Member Functions

void clearVariables ()
 Removes and deletes all variable items.
void copyVariables (const DtRwVariableBindings &other)
 Copies all variable items from another bindings list and adds them to the local one.

Private Member Functions

 DtRwVariableBindings ()
 Not implemented.

Detailed Description

ReaderWriter object that maintains a list of reader-writer variable bindings.

It keeps a list of names and reader-writer types that are associated with the name. This object differs from most other RW objects in that it writes out the RW type string for the object along with its name and type, and dynamically types the objects being read in based on the type string in the file. It uses the static DtReaderWriter::factory to do this.


Constructor & Destructor Documentation

Not implemented.

DtRwVariableBindings::DtRwVariableBindings ( const DtString name,
DtReaderWriterRegistry parentRegistry = 0 
)
DtRwVariableBindings::DtRwVariableBindings ( const DtString name,
const DtRwVariableBindings orig,
DtReaderWriterRegistry parentRegistry = 0 
)

Member Function Documentation

DtRwVariableBindings& DtRwVariableBindings::operator= ( const DtRwVariableBindings orig)
virtual void DtRwVariableBindings::getSelf ( DtlObjPtr  args,
const DtFilename &  searchPath = DtFilename::nullFilename(),
const DtVariableBindingsList variableBindings = nullVariableReference() 
) [virtual]

Reads in items, using the factory to read the correct types.

virtual void DtRwVariableBindings::writeSelf ( FILE *  fp,
int  indentLevel = 0,
bool  writeUnspecified = false,
const DtFilename &  path = DtFilename::nullFilename() 
) [virtual]

Writes out registry data, but includes the type strings when writing.

Reimplemented from DtReaderWriter.

virtual const DtReaderWriter* DtRwVariableBindings::findVariableBinding ( const DtString rwTypeString,
const DtString variableName 
) const [virtual]

Looks for the specified name/type combination in the registry, and returns a pointer to that RW object if it is found.

virtual DtReaderWriter* DtRwVariableBindings::findVariableBinding ( const DtString rwTypeString,
const DtString variableName 
) [virtual]

Looks for the specified name/type combination in the registry, and returns a pointer to that RW object if it is found.

Creates a new instance of this class and creates all elements found in the list and adds it to this variables registry.

Calls addVariableBinding() to add new variable

virtual DtReaderWriter* DtRwVariableBindings::addVariableBinding ( const DtSymbolString name,
const char *  type 
) [virtual]

Adds new variable binding to registry.

The new DtReaderWriter item is created using the DtReaderWriter::factory() by passing the type parameter. The item is added to this variable binding structure, and returned.

virtual const char* DtRwVariableBindings::readerWriterType ( ) const [virtual]

Used to supply a string type that this reader writer type is.

This can be used in place of dynamic-casting. Also used by the opd editor to determine which type of control to create

Reimplemented from DtReaderWriter.

Removes and deletes all variable items.

void DtRwVariableBindings::copyVariables ( const DtRwVariableBindings other) [protected]

Copies all variable items from another bindings list and adds them to the local one.


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)