libstorage-ng
ImplicitPt.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_IMPLICIT_PT_H
25 #define STORAGE_IMPLICIT_PT_H
26 
27 
28 #include "storage/Devices/PartitionTable.h"
29 
30 
31 namespace storage
32 {
33 
42  class ImplicitPt : public PartitionTable
43  {
44  public:
45 
46  static ImplicitPt* create(Devicegraph* devicegraph);
47  static ImplicitPt* load(Devicegraph* devicegraph, const xmlNode* node);
48 
49  public:
50 
51  class Impl;
52 
53  Impl& get_impl();
54  const Impl& get_impl() const;
55 
56  virtual ImplicitPt* clone() const override;
57 
64 
65  protected:
66 
67  ImplicitPt(Impl* impl);
68 
69  };
70 
71 
72  bool is_implicit_pt(const Device* device);
73 
81 
85  const ImplicitPt* to_implicit_pt(const Device* device);
86 
87 }
88 
89 #endif
Class to represent implicit partition table.
Definition: ImplicitPt.h:42
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
void create_implicit_partition()
Create the implicit partition.
The storage namespace.
Definition: Actiongraph.h:37
Definition: PartitionTable.h:81
ImplicitPt * to_implicit_pt(Device *device)
Converts pointer to Device to pointer to ImplicitPt.