paludis  Version 2.6.0
partitioning.hh
Go to the documentation of this file.
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2013 Saleem Abdulrasool <compnerd@compnerd.org>
5  *
6  * This file is part of the Paludis package manager. Paludis is free software;
7  * you can redistribute it and/or modify it under the terms of the GNU General
8  * Public License version 2, as published by the Free Software Foundation.
9  *
10  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17  * Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef PALUDIS_GUARD_PALUDIS_PARTITIONING_HH
21 #define PALUDIS_GUARD_PALUDIS_PARTITIONING_HH 1
22 
23 #include <paludis/name-fwd.hh>
24 #include <paludis/partitioning-fwd.hh>
26 #include <paludis/util/fs_path.hh>
27 #include <paludis/util/pimp.hh>
28 
29 #include <string>
30 #include <vector>
31 
32 /** \file
33  * Declarations for the Partitioning class.
34  *
35  * \ingroup g_contents
36  */
37 
38 namespace paludis
39 {
40  /**
41  * Package partitioning as defined by the package installation metadata.
42  *
43  * \ingroup g_contents
44  * \since 1.1.0
45  */
47  {
48  private:
49  Pimp<Partitioning> _imp;
50 
51  public:
52  ///\name Basic operations
53  ///\{
54 
55  Partitioning();
56  ~Partitioning();
57 
58  ///\}
59 
60  /**
61  * Mark a set of paths as belonging to a partition.
62  *
63  * \arg [in] paths the paths to partition
64  * \arg [in] name the partition name (or empty to indicate core)
65  *
66  * \since 1.1.0
67  */
68  void mark(const std::vector<FSPath> &, const PartName &);
69 
70  /**
71  * Classify a path into a partition.
72  *
73  * \arg [in] path the path to classify
74  *
75  * \return the partition the path was classified into, empty if none
76  *
77  * \since 1.1.0
78  */
79  PartName classify(const FSPath &) const;
80 
81  /**
82  * Check if a path is partitioned.
83  *
84  * \arg [in] path the path to check
85  *
86  * \return %true if the path contains a partioned image
87  *
88  * \since 1.99.0
89  */
90  bool is_partitioned(const FSPath &) const;
91  };
92 }
93 
94 #endif
Definition: pimp.hh:51
Definition: about_metadata-fwd.hh:23
Definition: partitioning.hh:46
Definition: wrapped_value-fwd.hh:29
Definition: fs_path.hh:33
#define PALUDIS_VISIBLE
Definition: attributes.hh:59