52 #ifndef MapOfTaggedObjects_h 53 #define MapOfTaggedObjects_h 67 #include <utility/tagged/storage/TaggedObjectStorage.h> 68 #include <utility/tagged/storage/MapOfTaggedObjectsIter.h> 87 typedef std::map<int, TaggedObject *> tagged_map;
88 typedef tagged_map::iterator iterator;
89 typedef tagged_map::const_iterator const_iterator;
90 typedef tagged_map::reference reference;
91 typedef tagged_map::const_reference const_reference;
92 typedef tagged_map::value_type value_type;
94 std::map<int, TaggedObject *> theMap;
97 inline iterator begin(
void)
98 {
return theMap.begin(); }
99 inline iterator end(
void)
100 {
return theMap.end(); }
109 inline const_iterator begin(
void)
const 110 {
return theMap.begin(); }
111 inline const_iterator end(
void)
const 112 {
return theMap.end(); }
128 void clearAll(
bool invokeDestructor =
true);
130 void Print(std::ostream &s,
int flag =0);
void clearAll(bool invokeDestructor=true)
Remove all objects from the container.
Definition: MapOfTaggedObjects.cpp:270
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:73
bool removeComponent(int tag)
Adds a component to the container.
Definition: MapOfTaggedObjects.cpp:167
MapOfTaggedObjectsIter is an iter for returning the TaggedObjects of a storage objects of type MapOfT...
Definition: MapOfTaggedObjectsIter.h:77
TaggedObjectStorage * getEmptyCopy(void)
Get an empty copy of the method.
Definition: MapOfTaggedObjects.cpp:243
int getNumComponents(void) const
Returns the number of components currently stored in the container.
Definition: MapOfTaggedObjects.cpp:192
MapOfTaggedObjectsIter getIter()
To return an iter for iterating through the objects that have been added to the container.
Definition: MapOfTaggedObjects.cpp:233
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: MapOfTaggedObjects.cpp:281
TaggedObject * getComponentPtr(int tag)
To return a pointer to the TaggedObject whose identifier is given by tag.
Definition: MapOfTaggedObjects.cpp:203
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:85
Object idenfied by an integer (tag).
Definition: TaggedObject.h:91
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
void clearComponents(void)
Libera la memoria ocupada por los componentes.
Definition: MapOfTaggedObjects.cpp:253