1 #ifndef _utl_MultiObject_imp_h_
2 #define _utl_MultiObject_imp_h_
4 #include <utl/MultiObject.h>
5 #include <utl/AugerException.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/TypeId.h>
13 #define MULTIOBJECT_INST(Type, LabeledType) \
14 template class MultiObject<Type, LabeledType >
17 template<
typename T,
typename LabeledObjectType>
27 fObjects.emplace(lp.first,
new T(*lp.second));
33 template<
typename T,
typename LabeledObjectType>
39 if (it != fObjects.end())
43 err <<
"No object '" << TypeId::Name<T>()
44 <<
"' with label " << label <<
" found";
50 template<
typename T,
typename LabeledObjectType>
57 if (it != fObjects.end())
61 err <<
"No object '" << TypeId::Name<T>()
62 <<
"' with label " << label <<
" found";
68 template<
typename T,
typename LabeledObjectType>
74 if (it != fObjects.end()) {
76 info <<
"Replacing object '" << TypeId::Name<T>() <<
'\'';
81 fObjects.insert(make_pair(label, obj));
85 template<
typename T,
typename LabeledObjectType>
91 if (it == fObjects.end()) {
93 err <<
"Object '" << TypeId::Name<T>() <<
"' with label "
94 << label <<
" not found";
103 template<
typename T,
typename LabeledObjectType>
106 for (
const auto& lp : fObjects)
111 template<
typename T,
typename LabeledObjectType>
116 if (fObjects.size() != mobj.
fObjects.size())
120 it1 != fObjects.end() && it2 != mobj.
fObjects.end(); ++it1, ++it2)
121 if (it1->first != it2->first || *it1->second != *it2->second)
128 template<
typename T,
typename LabeledObjectType>
132 for (
const auto& lp : fObjects)
#define INFO(message)
Macro for logging informational messages.
MultiObjectContainer::const_iterator InternalConstIterator
Base class for exceptions trying to access non-existing components.
MultiObjectContainer::iterator InternalIterator
bool operator==(const TimeStamp &ts, const TimeRange &tr)
container for object and associated labels
#define ERROR(message)
Macro for logging error messages.
MultiObjectContainer fObjects