libstorage-ng
Ext2.h
1 /*
2  * Copyright (c) [2014-2015] Novell, Inc.
3  * Copyright (c) 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_EXT2_H
25 #define STORAGE_EXT2_H
26 
27 
28 #include "storage/Filesystems/Ext.h"
29 
30 
31 namespace storage
32 {
33 
38  class Ext2 : public Ext
39  {
40  public:
41 
42  static Ext2* create(Devicegraph* devicegraph);
43  static Ext2* load(Devicegraph* devicegraph, const xmlNode* node);
44 
45  public:
46 
47  class Impl;
48 
49  Impl& get_impl();
50  const Impl& get_impl() const;
51 
52  virtual Ext2* clone() const override;
53 
54  protected:
55 
56  Ext2(Impl* impl);
57 
58  };
59 
60 
61  bool is_ext2(const Device* device);
62 
69  Ext2* to_ext2(Device* device);
70 
74  const Ext2* to_ext2(const Device* device);
75 
76 }
77 
78 #endif
Ext2 * to_ext2(Device *device)
Converts pointer to Device to pointer to Ext2.
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
Abstract base class for Ext2, Ext3 and Ext4.
Definition: Ext.h:37
The storage namespace.
Definition: Actiongraph.h:37
Class to represent an Ext2 filesystem https://en.wikipedia.org/wiki/Ext2 in the devicegraph.
Definition: Ext2.h:38