23 return mData[dofType];
33 return mData.at(dofType);
41 return mData.at(dofType);
49 auto it =
mData.emplace(dofType, t);
52 "Insert failed. Container already contains an entry for " + dofType.
GetName() +
".");
71 std::map<DofType, T, CompareDofType>
mData;
void Insert(DofType dofType, T t)
copies a t into the container, throws, if there already is an entry at dofType
Definition: DofContainer.h:47
Base class for all exceptions thrown in NuTo.
Definition: Exception.h:9
auto begin() const
Definition: DofContainer.h:60
T & operator[](DofType dofType)
nonconst access, similar to map::operator[]()
Definition: DofContainer.h:21
virtual ~DofContainer()=default
T & At(DofType dofType)
nonconst access, similar to map::at()
Definition: DofContainer.h:31
bool Has(DofType dofType) const
Definition: DofContainer.h:55
auto end() const
Definition: DofContainer.h:65
const std::string & GetName() const
Definition: DofType.h:21
std::map< DofType, T, CompareDofType > mData
Definition: DofContainer.h:71
Definition: Exception.h:6
const T & operator[](DofType dofType) const
const access
Definition: DofContainer.h:39
Definition: DofContainer.h:10