libzypp  13.10.6
SystemCheck.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_SYSTEMCHECK_H
13 #define ZYPP_TARGET_SYSTEMCHECK_H
14 
15 #include <iosfwd>
16 
17 #include "zypp/base/NonCopyable.h"
18 #include "zypp/Capability.h"
19 
21 namespace zypp
22 {
23  //
25  // CLASS NAME : SystemCheck
26  //
30  {
31  friend std::ostream & operator<<( std::ostream & str, const SystemCheck & obj );
32 
33  public:
34 
36  static const SystemCheck & instance();
37 
39  const Pathname & file();
40 
44  bool setFile(const Pathname & file) const;
45 
48  const CapabilitySet & requiredSystemCap() const;
49 
52  const CapabilitySet & conflictSystemCap() const;
53 
54  private:
56  SystemCheck();
57  bool loadFile() const;
58 
59  };
61 
63  std::ostream & operator<<( std::ostream & str, const SystemCheck & obj );
64 
66 } // namespace zypp
68 #endif // ZYPP_TARGET_SYSTEMCHECK_H
SystemCheck()
Ctor taking the file to read.
Definition: SystemCheck.cc:45
std::tr1::unordered_set< Capability > CapabilitySet
Definition: Capability.h:33
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:120
bool loadFile() const
Definition: SystemCheck.cc:71
bool setFile(const Pathname &file) const
Set configuration file of system requirements Should be used for testcase only.
Definition: SystemCheck.cc:52
static const SystemCheck & instance()
Singleton.
Definition: SystemCheck.cc:38
friend std::ostream & operator<<(std::ostream &str, const SystemCheck &obj)
Definition: SystemCheck.cc:116
const CapabilitySet & conflictSystemCap() const
Returns a list of conflicting system capabilities.
Definition: SystemCheck.cc:67
Save and restore locale set from file.
Definition: SystemCheck.h:29
const CapabilitySet & requiredSystemCap() const
Returns a list of required system capabilities.
Definition: SystemCheck.cc:63
const Pathname & file()
Return the file path.
Definition: SystemCheck.cc:59