libstorage-ng
DasdPt.h
1 /*
2  * Copyright (c) [2014-2015] Novell, Inc.
3  * Copyright (c) [2016-2017] 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_DASD_PT_H
25 #define STORAGE_DASD_PT_H
26 
27 
28 #include "storage/Devices/PartitionTable.h"
29 
30 
31 namespace storage
32 {
33 
34  class DasdPt : public PartitionTable
35  {
36  public:
37 
44  static DasdPt* create(Devicegraph* devicegraph);
45 
46  static DasdPt* load(Devicegraph* devicegraph, const xmlNode* node);
47 
48  public:
49 
50  class Impl;
51 
52  Impl& get_impl();
53  const Impl& get_impl() const;
54 
55  virtual DasdPt* clone() const override;
56 
57  protected:
58 
59  DasdPt(Impl* impl);
60 
61  };
62 
63 
69  bool is_dasd_pt(const Device* device);
70 
77  DasdPt* to_dasd_pt(Device* device);
78 
82  const DasdPt* to_dasd_pt(const Device* device);
83 
84 }
85 
86 #endif
bool is_dasd_pt(const Device *device)
Checks whether device points to a DasdPt.
static DasdPt * create(Devicegraph *devicegraph)
Create a device of type DasdPt.
DasdPt * to_dasd_pt(Device *device)
Converts pointer to Device to pointer to DasdPt.
The main container of the libstorage-ng.
Definition: Devicegraph.h:169
An abstract base class for storage devices.
Definition: Device.h:81
Definition: DasdPt.h:34
The storage namespace.
Definition: Actiongraph.h:38
Definition: PartitionTable.h:87