24 #ifndef STORAGE_HOLDER_H 25 #define STORAGE_HOLDER_H 28 #include <libxml/tree.h> 30 #include <boost/noncopyable.hpp> 32 #include "storage/Devices/Device.h" 51 class Holder :
private boost::noncopyable
58 const Device* get_source()
const;
60 sid_t get_source_sid()
const;
63 const Device* get_target()
const;
65 sid_t get_target_sid()
const;
67 bool operator==(
const Holder& rhs)
const;
68 bool operator!=(
const Holder& rhs)
const;
89 Impl& get_impl() {
return *impl; }
90 const Impl& get_impl()
const {
return *impl; }
92 virtual Holder* clone()
const = 0;
94 void save(xmlNode* node)
const;
96 friend std::ostream& operator<<(std::ostream& out,
const Holder& holder);
103 void load(
Devicegraph* devicegraph,
const xmlNode* node);
110 const std::unique_ptr<Impl> impl;
Holder * copy_to_devicegraph(Devicegraph *devicegraph) const
Copies the holder to the devicegraph.
The master container of the libstorage.
Definition: Devicegraph.h:153
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:75
Base class for storage exceptions.
Definition: Exception.h:113
The storage namespace.
Definition: Actiongraph.h:37
unsigned int sid_t
An integer storage ID.
Definition: Device.h:66