MFEM
v3.4
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. More... | |
void | Deregister (const std::string &fname, bool own_data) |
Unregister association between field field and name fname. More... | |
void | DeleteData (bool own_data) |
Clear all associations between names and fields. More... | |
bool | Has (const std::string &fname) const |
Predicate to check if a field is associated with name fname. More... | |
T * | Get (const std::string &fname) const |
Get a pointer to the field associated with name fname. More... | |
const MapType & | GetMap () const |
Returns a const reference to the underlying map. More... | |
int | NumFields () const |
Returns the number of registered fields. More... | |
iterator | begin () |
Returns a begin iterator to the registered fields. More... | |
const_iterator | begin () const |
Returns a begin const iterator to the registered fields. More... | |
iterator | end () |
Returns an end iterator to the registered fields. More... | |
const_iterator | end () const |
Returns an end const iterator to the registered fields. More... | |
iterator | find (const std::string &fname) |
Returns an iterator to the field fname. More... | |
const_iterator | find (const std::string &fname) const |
Returns a const iterator to the field fname. More... | |
void | clear () |
Clears the map of registered fields without reclaiming memory. More... | |
Protected Attributes | |
MapType | field_map |
Lightweight adaptor over an std::map from strings to pointer to T.
Definition at line 28 of file datacollection.hpp.
typedef MapType::const_iterator mfem::NamedFieldsMap< T >::const_iterator |
Definition at line 33 of file datacollection.hpp.
typedef MapType::iterator mfem::NamedFieldsMap< T >::iterator |
Definition at line 32 of file datacollection.hpp.
typedef std::map<std::string, T*> mfem::NamedFieldsMap< T >::MapType |
Definition at line 31 of file datacollection.hpp.
|
inline |
Returns a begin iterator to the registered fields.
Definition at line 98 of file datacollection.hpp.
|
inline |
Returns a begin const iterator to the registered fields.
Definition at line 100 of file datacollection.hpp.
|
inline |
Clears the map of registered fields without reclaiming memory.
Definition at line 116 of file datacollection.hpp.
|
inline |
Clear all associations between names and fields.
Delete associated pointers when own_data is true
Definition at line 65 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 50 of file datacollection.hpp.
|
inline |
Returns an end iterator to the registered fields.
Definition at line 103 of file datacollection.hpp.
|
inline |
Returns an end const iterator to the registered fields.
Definition at line 105 of file datacollection.hpp.
|
inline |
Returns an iterator to the field fname.
Definition at line 108 of file datacollection.hpp.
|
inline |
Returns a const iterator to the field fname.
Definition at line 112 of file datacollection.hpp.
|
inline |
Get a pointer to the field associated with name fname.
Definition at line 85 of file datacollection.hpp.
|
inline |
Returns a const reference to the underlying map.
Definition at line 92 of file datacollection.hpp.
|
inline |
Predicate to check if a field is associated with name fname.
Definition at line 78 of file datacollection.hpp.
|
inline |
Returns the number of registered fields.
Definition at line 95 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 38 of file datacollection.hpp.
|
protected |
Definition at line 119 of file datacollection.hpp.