52 #ifndef ArrayOfTaggedObjects_h 53 #define ArrayOfTaggedObjects_h 67 #include <utility/tagged/storage/TaggedObjectStorage.h> 68 #include <utility/tagged/storage/ArrayOfTaggedObjectsIter.h> 93 typedef std::vector<TaggedObject *> tagged_vector;
95 typedef tagged_vector::iterator iterator;
96 typedef tagged_vector::const_iterator const_iterator;
97 typedef tagged_vector::reference reference;
98 typedef tagged_vector::const_reference const_reference;
99 typedef tagged_vector::value_type value_type;
102 int sizeComponentArray;
103 int positionLastEntry;
104 int positionLastNoFitEntry;
107 tagged_vector theComponents;
111 {
return theComponents.begin(); }
113 {
return theComponents.end(); }
134 const_iterator begin(
void)
const 135 {
return theComponents.begin(); }
136 const_iterator end(
void)
const 137 {
return theComponents.end(); }
140 virtual void clearAll(
bool invokeDestructor =
true);
142 void Print(std::ostream &s,
int flag =0);
ArrayOfTaggedObjects & operator=(const ArrayOfTaggedObjects &)
Assignment operator.
Definition: ArrayOfTaggedObjects.cpp:116
virtual TaggedObjectStorage * getEmptyCopy(void)
Return an empty copy of the container.
Definition: ArrayOfTaggedObjects.cpp:421
~ArrayOfTaggedObjects(void)
Destructor. Release memory.
Definition: ArrayOfTaggedObjects.cpp:131
An TaggedObjectIter is an iter for returning the Components of an object of class TaggedObjectStorage...
Definition: TaggedObjectIter.h:73
TaggedObject * getComponentPtr(int tag)
Returns a pointer to the object with the given tag.
Definition: ArrayOfTaggedObjects.cpp:360
int getNumComponents(void) const
Returns the number of components currently stored in the container.
Definition: ArrayOfTaggedObjects.cpp:345
void Print(std::ostream &s, int flag=0)
Method which invokes Print on all components.
Definition: ArrayOfTaggedObjects.cpp:463
void clearComponents(void)
Libera la memoria ocupada por los componentes.
Definition: ArrayOfTaggedObjects.cpp:69
ArrayOfTaggedObjectsIter getIter(void)
Return a new iterator to the components.
Definition: ArrayOfTaggedObjects.cpp:406
TaggedObjectIter & getComponents(void)
Reset the iter to point to first component and then return a reference to the iter.
Definition: ArrayOfTaggedObjects.cpp:399
ArrayOfTaggedObjects(CommandEntity *owr, int size, const std::string &containerName)
Constructor.
Definition: ArrayOfTaggedObjects.cpp:100
ArrayOfTaggedObjects is a storage class.
Definition: ArrayOfTaggedObjects.h:91
Object idenfied by an integer (tag).
Definition: TaggedObject.h:91
bool addComponent(TaggedObject *newComponent)
Adds a component to the container.
Definition: ArrayOfTaggedObjects.cpp:189
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Definition: ArrayOfTaggedObjectsIter.h:72
virtual void clearAll(bool invokeDestructor=true)
Free memory.
Definition: ArrayOfTaggedObjects.cpp:437
int setSize(int newSize)
Set the size of the container.
Definition: ArrayOfTaggedObjects.cpp:146
bool removeComponent(int tag)
Remove the component with the given tag.
Definition: ArrayOfTaggedObjects.cpp:266