29 #ifndef ModelComponentContainer_H 30 #define ModelComponentContainer_H 32 #include "preprocessor/multi_block_topology/ModelComponentContainerBase.h" 34 #include "boost/python/list.hpp" 45 typedef typename std::map<Indice,T *> map_base;
46 typedef typename std::pair<Indice,T *> pair;
47 typedef typename map_base::iterator iterator;
48 typedef typename map_base::const_iterator const_iterator;
52 T *
busca(
const Indice &);
53 const T *
busca(
const Indice &)
const;
54 bool exists(
const Indice &)
const;
55 T *
get(
const Indice &);
56 boost::python::list
getKeys(
void)
const;
70 { T * retval=
nullptr;
71 iterator i= this->find(
id);
81 const T * retval=
nullptr;
82 const_iterator i= this->find(
id);
91 {
return (busca(
id)!=
nullptr); }
98 T *retval= busca(iEnt);
100 std::cerr << getClassName() <<
"::" << __FUNCTION__
102 << iEnt <<
"' not found.\n";
110 for(iterator i=this->begin();i!=this->end();i++)
112 T * tmp= (*i).second;
124 boost::python::list retval;
125 for(const_iterator i=this->begin();i!=this->end();i++)
126 retval.append((*i).first);
virtual ~ModelComponentContainer(void)
Destructor.
Definition: ModelComponentContainer.h:132
Model geometry manager.
Definition: MultiBlockTopology.h:68
boost::python::list getKeys(void) const
Return the container's keys.
Definition: ModelComponentContainer.h:122
void clearAll(void)
Erase all the entities.
Definition: ModelComponentContainer.h:108
Base class for model component containers.
Definition: ModelComponentContainerBase.h:42
bool exists(const Indice &) const
Return true if the entity already exists.
Definition: ModelComponentContainer.h:90
ModelComponentContainer(MultiBlockTopology *mbt=nullptr)
Constructor.
Definition: ModelComponentContainer.h:64
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Container for model entities.
Definition: ModelComponentContainer.h:42
T * busca(const Indice &)
Return a pointer to the geometry entity whose identifier is passed as parameter.
Definition: ModelComponentContainer.h:69