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;
109 Impl& get_impl() {
return *impl; }
110 const Impl& get_impl()
const {
return *impl; }
112 virtual Holder* clone()
const = 0;
114 void save(xmlNode* node)
const;
116 friend std::ostream& operator<<(std::ostream& out,
const Holder& holder);
123 void load(
Devicegraph* devicegraph,
const xmlNode* node);
130 const std::unique_ptr<Impl> impl;
Holder * copy_to_devicegraph(Devicegraph *devicegraph) const
Copies the holder to the devicegraph.
bool exists_in_probed() const
Checks if the holder exists in the probed devicegraph.
bool exists_in_system() const
Checks if the holder exists in the system 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
bool exists_in_devicegraph(const Devicegraph *devicegraph) const
Checks if the holder exists in the devicegraph.
bool exists_in_staging() const
Checks if the holder exists in the staging devicegraph.
The storage namespace.
Definition: Actiongraph.h:37
unsigned int sid_t
An integer storage ID.
Definition: Device.h:66