VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions
DtCommModelDescriptorList Class Reference

List of DtCommModelDescriptor subclasses that can be read from a RW type file. More...

Inheritance diagram for DtCommModelDescriptorList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtCommModelDescriptorList (const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
 constructor
 DtCommModelDescriptorList (const DtCommModelDescriptorList &orig, DtReaderWriterRegistry *parentRegistry=0)
 copy constructor
DtCommModelDescriptorListoperator= (const DtCommModelDescriptorList &orig)
 Assignment operator; removes and deletes all entries on the left hand side - then clones all entries on the right side list, adding them to the left side list.
virtual ~DtCommModelDescriptorList ()
 destructor
virtual DtCommModelDescriptorListclone (DtReaderWriterRegistry *parentRegistry=0)
virtual void addCommModelDescriptor (const DtCommModelDescriptor &descriptor)
 Clones the descriptor and adds it to the list.
virtual const
DtCommModelDescriptor
lookupCommModelDescriptor (const DtString &name) const
 Searches the list for a descriptor of the specified name, and returns a pointer to it if it exists.

Protected Member Functions

 DtCommModelDescriptorList ()
void emptyList ()
 Removes all descriptors from the list, and destroys them.
void copyList (const DtCommModelDescriptorList &orig)
virtual void addCommModelDescriptor (DtCommModelDescriptor *descriptor)
 Adds this descriptor to the list.
virtual DtListItem * lookupCommModelDescriptorItem (const DtString &name) const
 Looks up the descriptor and returns the list item that points to it.
virtual DtlObjPtr getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 This method must be overridden by a subclass.

Detailed Description

List of DtCommModelDescriptor subclasses that can be read from a RW type file.

This class owns all descriptors contained on the list and deletes them when the list is destroyed.


Constructor & Destructor Documentation

constructor

copy constructor

destructor


Member Function Documentation

DtCommModelDescriptorList& DtCommModelDescriptorList::operator= ( const DtCommModelDescriptorList orig)

Assignment operator; removes and deletes all entries on the left hand side - then clones all entries on the right side list, adding them to the left side list.

virtual void DtCommModelDescriptorList::addCommModelDescriptor ( const DtCommModelDescriptor descriptor) [virtual]

Clones the descriptor and adds it to the list.

Note:
Any existing descriptor with the same name will be replaced.

Searches the list for a descriptor of the specified name, and returns a pointer to it if it exists.

Removes all descriptors from the list, and destroys them.

virtual void DtCommModelDescriptorList::addCommModelDescriptor ( DtCommModelDescriptor descriptor) [protected, virtual]

Adds this descriptor to the list.

Does not clone the descriptor.

Note:
Any existing descriptor with the same name will be replaced.
virtual DtListItem* DtCommModelDescriptorList::lookupCommModelDescriptorItem ( const DtString name) const [protected, virtual]

Looks up the descriptor and returns the list item that points to it.

virtual DtlObjPtr DtCommModelDescriptorList::getData ( DtlObjPtr  args,
const DtFilename &  searchPath,
const DtVariableBindingsList variableBindings 
) [protected, virtual]

This method must be overridden by a subclass.

Within this method, new instances of the DtReaderWriter subclass that is being handled by this list must be created, and then retrieved from the mtl stream, using the getSelf member of that item.

Here is some sample code that could be used to implement a override of this class: (This is used in the DtRwIntegerList::getData() method)
 DtlObjPtr nameObj = DtcCar(args);
 DtRwInt* value = new DtRwInt(nameObj->pname());
 value->getSelf(args, searchPath, variableBindings);
 this->add(value);
 return DtcCdr(DtcCdr(args));

Implements DtRwList.


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)