NuTo
Numerics Tool
Public Member Functions | Protected Attributes | List of all members
NuTo::DofContainer< T > Class Template Reference

#include <DofContainer.h>

Public Member Functions

virtual ~DofContainer ()=default
 
T & operator[] (DofType dofType)
 nonconst access, similar to map::operator[]() More...
 
T & At (DofType dofType)
 nonconst access, similar to map::at() More...
 
const T & operator[] (DofType dofType) const
 const access More...
 
void Insert (DofType dofType, T t)
 copies a t into the container, throws, if there already is an entry at dofType More...
 
bool Has (DofType dofType) const
 
auto begin () const
 
auto end () const
 

Protected Attributes

std::map< DofType, T, CompareDofTypemData
 

Constructor & Destructor Documentation

template<typename T>
virtual NuTo::DofContainer< T >::~DofContainer ( )
virtualdefault

Member Function Documentation

template<typename T>
T& NuTo::DofContainer< T >::At ( DofType  dofType)
inline

nonconst access, similar to map::at()

Parameters
dofTypedof type
Returns
reference to an existing value, throws if there is no value
Remarks
This does not default construct a new T and thus does not
template<typename T>
auto NuTo::DofContainer< T >::begin ( ) const
inline
template<typename T>
auto NuTo::DofContainer< T >::end ( ) const
inline
template<typename T>
bool NuTo::DofContainer< T >::Has ( DofType  dofType) const
inline
template<typename T>
void NuTo::DofContainer< T >::Insert ( DofType  dofType,
t 
)
inline

copies a t into the container, throws, if there already is an entry at dofType

Parameters
dofTypedof type
tvalue to insert
template<typename T>
T& NuTo::DofContainer< T >::operator[] ( DofType  dofType)
inline

nonconst access, similar to map::operator[]()

Parameters
dofTypedof type
Returns
reference to either
Remarks
This requires T to be default constructable.
template<typename T>
const T& NuTo::DofContainer< T >::operator[] ( DofType  dofType) const
inline

const access

Parameters
dofTypedof type
Returns
const reference to existing value, throws if there is no value

Member Data Documentation

template<typename T>
std::map<DofType, T, CompareDofType> NuTo::DofContainer< T >::mData
protected

The documentation for this class was generated from the following file: