An abstract base class of storage devices, and a vertex in the Devicegraph. More...
#include <Device.h>


Public Member Functions | |
| sid_t | get_sid () const |
| bool | operator== (const Device &rhs) const |
| bool | operator!= (const Device &rhs) const |
| bool | exists_in_devicegraph (const Devicegraph *devicegraph) const |
| Checks if the device exists in the devicegraph. | |
| bool | exists_in_probed () const |
| Checks if the device exists in the probed devicegraph. | |
| bool | exists_in_staging () const |
| Checks if the device exists in the staging devicegraph. | |
| std::string | get_displayname () const |
| virtual ResizeInfo | detect_resize_info () const |
| bool | has_children () const |
| size_t | num_children () const |
| bool | has_parents () const |
| size_t | num_parents () const |
| std::vector< Device * > | get_children () |
| std::vector< const Device * > | get_children () const |
| std::vector< Device * > | get_parents () |
| std::vector< const Device * > | get_parents () const |
| std::vector< Device * > | get_siblings (bool itself) |
| std::vector< const Device * > | get_siblings (bool itself) const |
| std::vector< Device * > | get_descendants (bool itself) |
| std::vector< const Device * > | get_descendants (bool itself) const |
| std::vector< Device * > | get_ancestors (bool itself) |
| std::vector< const Device * > | get_ancestors (bool itself) const |
| std::vector< Device * > | get_leaves (bool itself) |
| std::vector< const Device * > | get_leaves (bool itself) const |
| std::vector< Device * > | get_roots (bool itself) |
| std::vector< const Device * > | get_roots (bool itself) const |
| std::vector< Holder * > | get_in_holders () |
| std::vector< const Holder * > | get_in_holders () const |
| std::vector< Holder * > | get_out_holders () |
| std::vector< const Holder * > | get_out_holders () const |
| void | remove_descendants () |
|
const std::map< std::string, std::string > & | get_userdata () const |
| void | set_userdata (const std::map< std::string, std::string > &userdata) |
| Impl & | get_impl () |
| const Impl & | get_impl () const |
| virtual Device * | clone () const =0 |
| void | save (xmlNode *node) const |
Protected Member Functions | |
| Device (Impl *impl) | |
| void | create (Devicegraph *devicegraph) |
| void | load (Devicegraph *devicegraph) |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Device &device) |
An abstract base class of storage devices, and a vertex in the Devicegraph.
The Device class does not have a device name since some device types do not have a intrinsic device name, e.g. btrfs. Instead most devices are derived from BlkDevice which has a device name, udev path and udev ids.
1.8.8