1 #ifndef __DIADES__UTILS__BOX_HH_ 2 #define __DIADES__UTILS__BOX_HH_ 26 template<
typename Object>
42 std::vector<Reference>
_box;
61 Box(Object &
object):_box()
64 _box.push_back(
object);
78 _box.push_back(box.
obj());
130 _box.push_back(
object);
148 return (!box.
empty());
197 template<
typename Object>
232 CBox(
const Object &
object):_box()
235 _box.push_back(
object);
249 _box.push_back(box.
obj());
262 const Object &
obj()
const 290 _box.push_back(
object);
319 return (!box.
empty());
363 template<
typename Object>
struct hash<
Diades::Utils::Box<Object> >
380 template<
typename Object>
struct hash<
Diades::Utils::CBox<Object> >
std::reference_wrapper< Object const > Reference
std::reference_wrapper< Object > Reference
const Object & operator=(const Object &object)
const Object & obj() const
const Object & cObj() const
Namespace of the Diades project.
size_t operator()(const Diades::Utils::Box< Object > &box) const
size_t operator()(const Diades::Utils::CBox< Object > &box) const
A CBox is a container that contains at most a constant reference to an object.
bool operator==(const Box &box) const
CBox(const Object &object)
Object & operator=(Object &object)
bool operator<(const Box &box) const
A Box is a container that contains at most a reference to an object.
std::vector< Reference > _box
std::vector< Reference > _box