SysInfo.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Utils_Console_SysInfo_
18 #define HH_SENF_Utils_Console_SysInfo_ 1
19 
20 // Custom includes
21 #include <map>
22 #include <string>
23 #include <senf/Utils/singleton.hh>
24 
25 //-/////////////////////////////////////////////////////////////////////////////////////////////////
26 namespace senf {
27 namespace console {
28 
29  class SysInfo
30  : public singleton<SysInfo>
31  {
32  public:
33  friend class singleton<SysInfo>;
35 
36  void setEntry(std::string const & name, std::string const & entry, int pos = -1);
37  void dump(std::ostream & os) const;
38 
39  struct Proxy {
40  Proxy(std::string const & name, std::string const & entry, int pos = -1);
41  };
42 
43  private:
44  typedef std::multimap<std::pair<int,std::string>, std::string> Entries;
45  Entries entries_;
46 
47  SysInfo();
48  };
49 
50 }}
51 
52 //-/////////////////////////////////////////////////////////////////////////////////////////////////
53 //#include "SysInfo.cci"
54 //#include "SysInfo.ct"
55 //#include "SysInfo.cti"
56 #endif
void setEntry(std::string const &name, std::string const &entry, int pos=-1)
Definition: SysInfo.cc:37
Definition: Config.hh:28
Proxy(std::string const &name, std::string const &entry, int pos=-1)
Definition: SysInfo.cc:27
unspecified_keyword_type name
Argument name.
void dump(std::ostream &os) const
Definition: SysInfo.cc:49