Last change
on this file since 97dff0 was cf1d82, checked in by Frederik Heber <heber@…>, 12 years ago |
Parameter now contains Value, not inherits.
- added several function to fully wrap all Value member functions.
- this should prevent any vtable clashes between Parameter and Value that both
inherit ValueAsString.
- MpqcParser_Parameters.hpp does not contain any reference to the templated
parts of Parameter or Value. These are only contained in the .cpp module.
|
-
Property mode
set to
100644
|
File size:
770 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * Parameter.hpp
|
---|
3 | *
|
---|
4 | * Created on: Sep 30, 2011
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef PARAMETERINTERFACE_HPP_
|
---|
9 | #define PARAMETERINTERFACE_HPP_
|
---|
10 |
|
---|
11 | // include config.h
|
---|
12 | #ifdef HAVE_CONFIG_H
|
---|
13 | #include <config.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #include <string>
|
---|
17 |
|
---|
18 | #include "CodePatterns/Clone.hpp"
|
---|
19 |
|
---|
20 | #include "Parameters/ValueAsString.hpp"
|
---|
21 |
|
---|
22 | /** This interface represents a named Value.
|
---|
23 | *
|
---|
24 | */
|
---|
25 | class ParameterInterface :
|
---|
26 | public ValueAsString,
|
---|
27 | public Clone<ParameterInterface>
|
---|
28 | {
|
---|
29 | public:
|
---|
30 | ParameterInterface(const std::string &_name) : name(_name) {}
|
---|
31 | virtual ~ParameterInterface() {}
|
---|
32 |
|
---|
33 | const std::string &getName() const { return name; }
|
---|
34 |
|
---|
35 | virtual ParameterInterface* clone() const=0;
|
---|
36 |
|
---|
37 | private:
|
---|
38 | ParameterInterface();
|
---|
39 |
|
---|
40 | private:
|
---|
41 | const std::string name;
|
---|
42 | };
|
---|
43 |
|
---|
44 |
|
---|
45 | #endif /* PARAMETERINTERFACE_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.