22#define _MAKE_TRAIT(_type, _name) \
24 class TypeTraits<_type> { \
26 static std::string getName() { return _name; } \
44 Data(std::string
const &name_);
52 return (iterator !=
dataMap.end()) ? iterator->second :
nullptr;
59 Data(std::string
const &name_, std::string
const &typeName_)
68 LOG(1,
"Data") <<
"overwriting existing data: " << name_ << std::endl;
78 static std::map<std::string, Data *>
dataMap;
92 TypedData(std::string
const &name_, std::string
const &typeName_)
93 :
Data(name_, typeName_) {}
96 std::stringstream sStream;
97 sStream <<
"Constant" <<
nextId++;
114 TextData(std::string
const &name_, std::string
const &value_)
135 NumericData(std::string
const &name_, std::string
const &typeName_)
144 RealData(std::string
const &name_,
const real value_)
161template <
typename F =
double,
typename C = std::vector<F>>
175template <
typename F =
double,
typename T = sisi4s::Tensor<F>>
#define _MAKE_TRAIT(_type, _name)
Definition Data.hpp:22
#define LOG(...)
Definition Log.hpp:119
BooleanData(std::string const &name_, bool const value_)
Definition Data.hpp:125
bool value
Definition Data.hpp:128
BooleanData(bool const value_)
Definition Data.hpp:122
std::string getTypeName() const
Definition Data.hpp:47
std::string getName() const
Definition Data.hpp:46
Data(std::string const &name_, std::string const &typeName_)
protected constructor for typed data.
Definition Data.hpp:59
static Data * get(std::string const &name)
Definition Data.hpp:50
Stage getStage() const
Definition Data.hpp:48
static std::map< std::string, Data * > dataMap
Definition Data.hpp:78
std::string name
Definition Data.hpp:75
Stage stage
Definition Data.hpp:76
Stage
Definition Data.hpp:36
@ MENTIONED
Definition Data.hpp:37
@ LINGERING
Definition Data.hpp:42
@ UNUSED
Definition Data.hpp:41
@ TYPED
Definition Data.hpp:38
@ READY
Definition Data.hpp:40
@ ALLOCATED
Definition Data.hpp:39
std::string typeName
Definition Data.hpp:75
virtual ~Data()
Definition Data.hpp:45
static int64_t nextAnynomousDataId
Definition Data.hpp:79
IntegerData(int64_t value_)
Definition Data.hpp:152
int64_t value
Definition Data.hpp:158
IntegerData(std::string const &name_, int64_t const value_)
Definition Data.hpp:155
NumericData(std::string const &name_, std::string const &typeName_)
Definition Data.hpp:135
NumericData(std::string const &typeName_)
Definition Data.hpp:133
RealData(std::string const &name_, const real value_)
Definition Data.hpp:144
RealData(real value_)
Definition Data.hpp:141
real value
Definition Data.hpp:147
TensorData(T *value_)
Definition Data.hpp:178
virtual ~TensorData()
Definition Data.hpp:184
T * value
Definition Data.hpp:187
TensorData(std::string const &name_, T *value_)
Definition Data.hpp:181
TextData(std::string const &value_)
Definition Data.hpp:111
TextData(std::string const &name_, std::string const &value_)
Definition Data.hpp:114
std::string value
Definition Data.hpp:117
static std::string nextName()
Definition Data.hpp:95
static int nextId
next id number to be given anonymous constant data. They will be named "Constant0",...
Definition Data.hpp:106
TypedData(std::string const &typeName_)
Protected constructor for anonymous constant data.
Definition Data.hpp:87
TypedData(std::string const &name_, std::string const &typeName_)
Protected constructor for named data.
Definition Data.hpp:92
Definition Algorithm.hpp:10
Complex< Float64 > Complex64
Definition Complex.hpp:14
FloatTypes< 64 >::type Float64
Definition Float.hpp:30
Complex< real > complex
Definition Complex.hpp:17
ContainerData(C *value_)
Definition Data.hpp:163
virtual ~ContainerData()
Definition Data.hpp:169
ContainerData(std::string const &name_, C *value_)
Definition Data.hpp:166
C * value
Definition Data.hpp:172