16 #ifndef TORC_GENERIC_BUNDLE_HPP
17 #define TORC_GENERIC_BUNDLE_HPP
22 #ifdef GENOM_SERIALIZATION
23 #include <boost/bind.hpp>
24 #include <boost/mem_fn.hpp>
25 #include <boost/serialization/access.hpp>
26 #include <boost/serialization/base_object.hpp>
27 #include <boost/serialization/shared_ptr.hpp>
28 #include <boost/serialization/split_member.hpp>
29 #include <boost/serialization/vector.hpp>
30 #endif //GENOM_SERIALIZATION
44 #ifdef GENOM_SERIALIZATION
45 friend class boost::serialization::access;
90 template <typename _Action>
void applyOnAllChildren(const _Action& action) throw (Error);
102 #ifdef GENOM_SERIALIZATION
103 template <
class Archive>
void load(Archive& ar,
unsigned int);
105 template <
class Archive>
void save(Archive& ar,
unsigned int)
const;
107 BOOST_SERIALIZATION_SPLIT_MEMBER()
108 #endif //GENOM_SERIALIZATION
133 size += (*it)->getSize();
147 mChildren.push_back(child);
158 outChildren.insert(outChildren.end(), mChildren.begin(), mChildren.end());
163 const _Action& action)
throw (Error) {
165 std::for_each(mChildren.begin(), mChildren.end(), action);
185 #ifdef GENOM_SERIALIZATION
188 ar & boost::serialization::base_object<BaseType>(*this);
190 for_each(mChildren.begin(), mChildren.end(),
195 template <
typename _Type>
template <
class Archive>
void Bundle<_Type>::save(Archive& ar,
196 unsigned int)
const {
197 ar & boost::serialization::base_object<BaseType>(*this);
201 #endif //GENOM_SERIALIZATION
206 #endif // TORC_GENERIC_BUNDLE_HPP
virtual SizeType getSize() const
BaseType::SizeType SizeType
Interface for objects that can be composed within each other.
boost::shared_ptr< Type > Pointer
virtual void addChild(const boost::shared_ptr< Type > &child)
CompositionType
Defines possible Composition types.
virtual const Pointer get(const std::vector< SizeType > &indices) const
The Error object thrown by different methods of EdifOM.
Composite< _Type > BaseType
Contains definition for CompositionType.
void applyOnAllChildren(const _Action &action)
virtual void getChildren(List &outChildren) const
BaseType::Pointer Pointer
virtual CompositionType getCompositionType() const
Represents a "bundle" in the EDIF sense.
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)
std::vector< Pointer > List