53 #ifndef MapOfTaggedObjects_h 54 #define MapOfTaggedObjects_h 68 #include <utility/tagged/storage/TaggedObjectStorage.h> 69 #include <utility/tagged/storage/MapOfTaggedObjectsIter.h> 88 typedef std::map<int, TaggedObject *> tagged_map;
89 typedef tagged_map::iterator iterator;
90 typedef tagged_map::const_iterator const_iterator;
91 typedef tagged_map::reference reference;
92 typedef tagged_map::const_reference const_reference;
93 typedef tagged_map::value_type value_type;
95 std::map<int, TaggedObject *> theMap;
98 inline iterator begin(
void)
99 {
return theMap.begin(); }
100 inline iterator end(
void)
101 {
return theMap.end(); }
110 inline const_iterator begin(
void)
const 111 {
return theMap.begin(); }
112 inline const_iterator end(
void)
const 113 {
return theMap.end(); }
129 void clearAll(
bool invokeDestructor =
true);
131 void Print(std::ostream &s,
int flag =0)
const;
void clearAll(bool invokeDestructor=true)
Remove all objects from the container.
Definition: MapOfTaggedObjects.cpp:261
MapOfTaggedObjects & operator=(const MapOfTaggedObjects &)
Assignment operator.
Definition: MapOfTaggedObjects.cpp:85
int setSize(int newSize)
Set the container size.
Definition: MapOfTaggedObjects.cpp:101
An TaggedObjectIter is an iter for returning the Components of an object of class TaggedObjectStorage...
Definition: TaggedObjectIter.h:74
bool removeComponent(int tag)
Adds a component to the container.
Definition: MapOfTaggedObjects.cpp:158
MapOfTaggedObjectsIter is an iter for returning the TaggedObjects of a storage objects of type MapOfT...
Definition: MapOfTaggedObjectsIter.h:78
TaggedObjectStorage * getEmptyCopy(void)
Get an empty copy of the method.
Definition: MapOfTaggedObjects.cpp:234
int getNumComponents(void) const
Returns the number of components currently stored in the container.
Definition: MapOfTaggedObjects.cpp:183
MapOfTaggedObjectsIter getIter()
To return an iter for iterating through the objects that have been added to the container.
Definition: MapOfTaggedObjects.cpp:224
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: MapOfTaggedObjects.cpp:272
Objet that can execute python scripts.
Definition: CommandEntity.h:40
TaggedObject * getComponentPtr(int tag)
To return a pointer to the TaggedObject whose identifier is given by tag.
Definition: MapOfTaggedObjects.cpp:194
bool addComponent(TaggedObject *newComponent)
Adds a component to the container.
Definition: MapOfTaggedObjects.cpp:125
MapOfTaggedObjects(CommandEntity *owr, const std::string &containerName)
Creates the map object and an iter for iterating through the objects that are added to the map...
Definition: MapOfTaggedObjects.cpp:74
The class is responsible for holding and providing access to objects of type TaggedObject.
Definition: MapOfTaggedObjects.h:86
Object idenfied by an integer (tag).
Definition: TaggedObject.h:92
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void clearComponents(void)
Free memory reserved for components.
Definition: MapOfTaggedObjects.cpp:244