EventAnalysis  1.0.0
Info.h
Go to the documentation of this file.
1 /*
2  * Info.h
3  *
4  * Created on: 02 Feb 2017
5  * Author: Nicola Mori
6  */
7 
10 #ifndef INFO_H_
11 #define INFO_H_
12 
13 #include <memory>
14 #include <string>
15 namespace EA {
16 
18 class Info {
19 public:
24  Info(const std::string &name);
25 
27  virtual ~Info();
28 
29  virtual const std::string GetType() const;
30  virtual const std::string GetName() const;
31  virtual const std::string GetVersion() const;
32 
33 protected:
35  friend class Info;
36  std::string name;
37  };
38 
39  Info(const std::shared_ptr<Representation> &impl) : _repr{impl} {}
40  std::shared_ptr<Representation> &GetRepresentation() { return _repr; }
41 
42 private:
43  std::shared_ptr<Representation> _repr;
44 };
45 
46 } // namespace EA
47 
48 #endif /* INFO_H_ */
std::shared_ptr< Representation > & GetRepresentation()
Definition: Info.h:40
Object version, e.g., "1.1" or "alpha1".
Definition: Info.h:34
Interface for retrieving informations about an object.
Definition: Info.h:18
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
Info(const std::string &name)
Constructor.
Definition: Info.cpp:17
virtual const std::string GetName() const
The type (i.e. class) of the object.
Definition: Info.cpp:26
virtual const std::string GetVersion() const
The name of the object.
Definition: Info.cpp:29
virtual const std::string GetType() const
Definition: Info.cpp:23
std::shared_ptr< Representation > _repr
Definition: Info.h:43
std::string name
Definition: Info.h:36
virtual ~Info()
Destructor.
Definition: Info.cpp:20
Info(const std::shared_ptr< Representation > &impl)
Definition: Info.h:39