libstorage-ng
Toggle main menu visibility
Loading...
Searching...
No Matches
Subdevice.h
1
/*
2
* Copyright (c) [2014-2015] Novell, Inc.
3
* Copyright (c) 2020 SUSE LLC
4
*
5
* All Rights Reserved.
6
*
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms of version 2 of the GNU General Public License as published
9
* by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program; if not, contact Novell, Inc.
18
*
19
* To contact Novell about this file by physical or electronic mail, you may
20
* find current contact information at www.novell.com.
21
*/
22
23
24
#ifndef STORAGE_SUBDEVICE_H
25
#define STORAGE_SUBDEVICE_H
26
27
28
#include "storage/Holders/Holder.h"
29
30
31
namespace
storage
32
{
33
40
class
Subdevice :
public
Holder
41
{
42
public
:
43
53
static
Subdevice*
create
(
Devicegraph
* devicegraph,
const
Device
* source,
const
Device
* target);
54
55
static
Subdevice* load(
Devicegraph
* devicegraph,
const
xmlNode* node);
56
57
virtual
Subdevice* clone()
const override
;
58
virtual
std::unique_ptr<Holder> clone_v2()
const override
;
59
60
public
:
61
62
class
Impl;
63
64
Impl& get_impl();
65
const
Impl& get_impl()
const
;
66
67
Subdevice(Impl* impl);
68
ST_NO_SWIG Subdevice(std::unique_ptr<Holder::Impl>&& impl);
69
70
};
71
72
78
bool
is_subdevice
(
const
Holder
* holder);
79
86
Subdevice
*
to_subdevice
(
Holder
* holder);
87
91
const
Subdevice
*
to_subdevice
(
const
Holder
* holder);
92
93
}
94
95
#endif
storage::Device
An abstract base class for storage devices.
Definition
Device.h:82
storage::Devicegraph
The main container of the libstorage-ng.
Definition
Devicegraph.h:170
storage::Holder
An abstract base class for storage holders.
Definition
Holder.h:57
storage::Subdevice
Generic holder from one device to a subdevice, e.g.
Definition
Subdevice.h:41
storage::Subdevice::create
static Subdevice * create(Devicegraph *devicegraph, const Device *source, const Device *target)
Create a holder of type Subdevice.
storage
The storage namespace.
Definition
Actiongraph.h:40
storage::is_subdevice
bool is_subdevice(const Holder *holder)
Checks whether holder points to a Subdevice.
storage::to_subdevice
Subdevice * to_subdevice(Holder *holder)
Converts pointer to Holder to pointer to Subdevice.
storage
Holders
Subdevice.h
Generated by
1.17.0