Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TaggedObjectStorage Class Reference

#include <TaggedObjectStorage.h>

Inheritance diagram for TaggedObjectStorage::

ArrayOfTaggedObjects List of all members.

Public Methods

 TaggedObjectStorage ()
virtual ~TaggedObjectStorage ()
virtual int setSize (int newSize)=0
 public methods to populate the container. More...

virtual bool addComponent (TaggedObject *newComponent)=0
virtual TaggedObjectremoveComponent (int tag)=0
 bool allowMultipleTags = false) =0;. More...

virtual int getNumComponents (void) const=0
virtual TaggedObjectgetComponentPtr (int tag)=0
virtual TaggedObjectIter& getComponents (void)=0
virtual TaggedObjectStorage* getEmptyCopy (void)=0
virtual void clearAll (bool invokeDestructors=true)=0
virtual void Print (ostream &s, int flag=0)=0

Detailed Description

TaggedObjectStorage is used as a container object to store and provide access to objects of type TaggedObject. Each TaggedObject object stored in a TaggedObjectStorage object must have a unique integer tag to distinguish it from other the other objects stored. The TaggedObjectStorage class is an abstract base class, it just defines the interface all concrete subclasses must provide. The interface defines methods to add and to remove the components, and methods to obtain access to the components. \

}

Definition at line 61 of file TaggedObjectStorage.h.


Constructor & Destructor Documentation

TaggedObjectStorage::TaggedObjectStorage ( ) [inline]
 

Does nothing.

Definition at line 67 of file TaggedObjectStorage.h.

TaggedObjectStorage::~TaggedObjectStorage ( ) [inline, virtual]
 

Does nothing. Provided so that the concrete subclasses destructor will be invoked. The subclasses destructor is NOT to delete the objects stored in the object. {clearAll()} can be invoked by the programmer if this is required.

Definition at line 75 of file TaggedObjectStorage.h.


Member Function Documentation

void TaggedObjectStorage::Print ( ostream & s,
int flag = 0 ) [pure virtual]
 

To invoke {Print(s,flag)} on all objects which have been added to the container.

Reimplemented in ArrayOfTaggedObjects.

Referenced by LoadPattern::Print(), Graph::Print(), and Domain::Print().

bool TaggedObjectStorage::addComponent ( TaggedObject * newComponent ) [pure virtual]
 

To add the object {newComponent} to the container. To return {true} if the object was added to the container, {false} otherwise. The object should not be added if another object with a similar tag already exists in the container.

Reimplemented in ArrayOfTaggedObjects.

Referenced by Domain::addElement(), LoadPattern::addElementalLoad(), Domain::addLoadPattern(), Domain::addMP_Constraint(), LoadPattern::addNodalLoad(), Domain::addNode(), LoadPattern::addSP_Constraint(), Domain::addSP_Constraint(), and Graph::addVertex().

void TaggedObjectStorage::clearAll ( bool invokeDestructor = true ) [pure virtual]
 

To remove all objects from the container and {\bf to invoke the destructor on these objects} if {invokeDestructor} is {true}.

Reimplemented in ArrayOfTaggedObjects.

Referenced by LoadPattern::clearAll(), Domain::clearAll(), and Graph::~Graph().

TaggedObject * TaggedObjectStorage::getComponentPtr ( int tag ) [pure virtual]
 

To return a pointer to the TaggedObject whose identifier is given by {tag}. If the object has not been added to the container is to be returned.

Reimplemented in ArrayOfTaggedObjects.

Referenced by Domain::addElement(), Domain::addElementalLoad(), Domain::addLoadPattern(), Domain::addMP_Constraint(), Domain::addNodalLoad(), Domain::addNode(), Domain::addSP_Constraint(), Domain::getElement(), Domain::getLoadPattern(), Domain::getMP_Constraint(), Domain::getNode(), Domain::getSP_Constraint(), and Graph::getVertexPtr().

TaggedObjectIter & TaggedObjectStorage::getComponents ( void ) [pure virtual]
 

To return an iter for iterating through the objects that have been added to the container.

Reimplemented in ArrayOfTaggedObjects.

TaggedObjectStorage * TaggedObjectStorage::getEmptyCopy ( void ) [pure virtual]
 

To return an empty copy of the container.

Reimplemented in ArrayOfTaggedObjects.

int TaggedObjectStorage::getNumComponents ( void ) const [pure virtual]
 

To return the number of components currently stored in the container.

Reimplemented in ArrayOfTaggedObjects.

Referenced by Domain::Domain(), Domain::Print(), Domain::getNumElements(), Domain::getNumLoadPatterns(), Domain::getNumMPs(), Domain::getNumNodes(), Domain::getNumSPs(), Graph::getNumVertex(), LoadPattern::sendSelf(), and Domain::sendSelf().

TaggedObject * TaggedObjectStorage::removeComponent ( int tag ) [pure virtual]
 

bool allowMultipleTags = false) =0;.

Reimplemented in ArrayOfTaggedObjects.

Referenced by Domain::addElement(), Domain::removeElement(), LoadPattern::removeElementalLoad(), Domain::removeLoadPattern(), Domain::removeMP_Constraint(), LoadPattern::removeNodalLoad(), Domain::removeNode(), LoadPattern::removeSP_Constraint(), Domain::removeSP_Constraint(), and Graph::removeVertex().

int TaggedObjectStorage::setSize ( int newSize ) [pure virtual]
 

public methods to populate the container.

Reimplemented in ArrayOfTaggedObjects.


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