MFEM v4.7.0
Finite element discretization library
|
Lightweight adaptor over an std::map from strings to pointer to T. More...
#include <datacollection.hpp>
Public Types | |
typedef std::map< std::string, T * > | MapType |
typedef MapType::iterator | iterator |
typedef MapType::const_iterator | const_iterator |
Public Member Functions | |
void | Register (const std::string &fname, T *field, bool own_data) |
Register field field with name fname. | |
void | Deregister (const std::string &fname, bool own_data) |
Unregister association between field field and name fname. | |
void | DeleteData (bool own_data) |
Clear all associations between names and fields. | |
bool | Has (const std::string &fname) const |
Predicate to check if a field is associated with name fname. | |
T * | Get (const std::string &fname) const |
Get a pointer to the field associated with name fname. | |
const MapType & | GetMap () const |
Returns a const reference to the underlying map. | |
int | NumFields () const |
Returns the number of registered fields. | |
iterator | begin () |
Returns a begin iterator to the registered fields. | |
const_iterator | begin () const |
Returns a begin const iterator to the registered fields. | |
iterator | end () |
Returns an end iterator to the registered fields. | |
const_iterator | end () const |
Returns an end const iterator to the registered fields. | |
iterator | find (const std::string &fname) |
Returns an iterator to the field fname. | |
const_iterator | find (const std::string &fname) const |
Returns a const iterator to the field fname. | |
void | clear () |
Clears the map of registered fields without reclaiming memory. | |
Protected Attributes | |
MapType | field_map |
Lightweight adaptor over an std::map from strings to pointer to T.
Definition at line 30 of file datacollection.hpp.
typedef MapType::const_iterator mfem::NamedFieldsMap< T >::const_iterator |
Definition at line 35 of file datacollection.hpp.
typedef MapType::iterator mfem::NamedFieldsMap< T >::iterator |
Definition at line 34 of file datacollection.hpp.
typedef std::map<std::string, T*> mfem::NamedFieldsMap< T >::MapType |
Definition at line 33 of file datacollection.hpp.
|
inline |
Returns a begin iterator to the registered fields.
Definition at line 100 of file datacollection.hpp.
|
inline |
Returns a begin const iterator to the registered fields.
Definition at line 102 of file datacollection.hpp.
|
inline |
Clears the map of registered fields without reclaiming memory.
Definition at line 118 of file datacollection.hpp.
|
inline |
Clear all associations between names and fields.
Delete associated pointers when own_data is true
Definition at line 67 of file datacollection.hpp.
|
inline |
Unregister association between field field and name fname.
Optionally delete associated pointer if own_data is true
Definition at line 52 of file datacollection.hpp.
|
inline |
Returns an end iterator to the registered fields.
Definition at line 105 of file datacollection.hpp.
|
inline |
Returns an end const iterator to the registered fields.
Definition at line 107 of file datacollection.hpp.
|
inline |
Returns an iterator to the field fname.
Definition at line 110 of file datacollection.hpp.
|
inline |
Returns a const iterator to the field fname.
Definition at line 114 of file datacollection.hpp.
|
inline |
Get a pointer to the field associated with name fname.
Definition at line 87 of file datacollection.hpp.
|
inline |
Returns a const reference to the underlying map.
Definition at line 94 of file datacollection.hpp.
|
inline |
Predicate to check if a field is associated with name fname.
Definition at line 80 of file datacollection.hpp.
|
inline |
Returns the number of registered fields.
Definition at line 97 of file datacollection.hpp.
|
inline |
Register field field with name fname.
Replace existing field associated with fname (and optionally delete associated pointer if own_data is true)
Definition at line 40 of file datacollection.hpp.
|
protected |
Definition at line 121 of file datacollection.hpp.