MFEM
v4.1.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. 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 29 of file datacollection.hpp.
typedef MapType::const_iterator mfem::NamedFieldsMap< T >::const_iterator |
Definition at line 34 of file datacollection.hpp.
typedef MapType::iterator mfem::NamedFieldsMap< T >::iterator |
Definition at line 33 of file datacollection.hpp.
typedef std::map<std::string, T*> mfem::NamedFieldsMap< T >::MapType |
Definition at line 32 of file datacollection.hpp.
|
inline |
Returns a begin iterator to the registered fields.
Definition at line 99 of file datacollection.hpp.
|
inline |
Returns a begin const iterator to the registered fields.
Definition at line 101 of file datacollection.hpp.
|
inline |
Clears the map of registered fields without reclaiming memory.
Definition at line 117 of file datacollection.hpp.
|
inline |
Clear all associations between names and fields.
Delete associated pointers when own_data is true
Definition at line 66 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 51 of file datacollection.hpp.
|
inline |
Returns an end iterator to the registered fields.
Definition at line 104 of file datacollection.hpp.
|
inline |
Returns an end const iterator to the registered fields.
Definition at line 106 of file datacollection.hpp.
|
inline |
Returns an iterator to the field fname.
Definition at line 109 of file datacollection.hpp.
|
inline |
Returns a const iterator to the field fname.
Definition at line 113 of file datacollection.hpp.
|
inline |
Get a pointer to the field associated with name fname.
Definition at line 86 of file datacollection.hpp.
|
inline |
Returns a const reference to the underlying map.
Definition at line 93 of file datacollection.hpp.
|
inline |
Predicate to check if a field is associated with name fname.
Definition at line 79 of file datacollection.hpp.
|
inline |
Returns the number of registered fields.
Definition at line 96 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 39 of file datacollection.hpp.
|
protected |
Definition at line 120 of file datacollection.hpp.