1#ifndef __wmunstructuredapp__h__
2#define __wmunstructuredapp__h__
16#define STRINGIFY_CL_CODE(src) ("\n" + std::string(#src) + "\n")
41 unsigned int callType)
const = 0;
55 const WmKernelVariable* kVars[],
58 const std::string& allocationName =
"pPVS->rA")
const;
62 return wxc.
get<T>(name);
68 return wxc.
getVec<T>(name);
76 return wxc.
get<T>(name);
84 static void indent(std::string& indentation)
89 static void outdent(std::string& indentation)
91 unsigned found = indentation.find_last_of(
"\t");
92 indentation = indentation.substr(0, found);
95 template<
typename T>
static std::string
toStr(
const T& val)
Definition: wmunstructuredapp.h:31
variableList_t _fluxVariables
Definition: wmunstructuredapp.h:103
T readVal(const WxCryptSet &wxc, const std::string &name) const
Definition: wmunstructuredapp.h:60
std::string fillAllocationAtIndex(const std::string &indentation, const WmKernelVariable *kVars[], int numKVars, int startIndex=0, const std::string &allocationName="pPVS->rA") const
variableList_t _sourceVariables
Definition: wmunstructuredapp.h:106
virtual void setup(const WxCryptSet &wxc)
virtual void consolidateVariables(variableList_t &varList, unsigned int callType)
std::map< std::string, std::string > replaceMap_t
Definition: wmunstructuredapp.h:49
static void replaceKeys(std::string &string, const replaceMap_t &map)
std::vector< T > readVec(const WxCryptSet &wxc, const std::string &name) const
Definition: wmunstructuredapp.h:66
static std::string toStr(const T &val)
Definition: wmunstructuredapp.h:95
virtual std::string generateSourceCall(const WmUnstructuredEquationSet &eqSet, unsigned int callType) const =0
variableList_t _privateVariables
Definition: wmunstructuredapp.h:112
virtual std::string generateSource(const WmUnstructuredEquationSet &eqSet) const =0
static void indent(std::string &indentation)
Definition: wmunstructuredapp.h:84
variableList_t _externalVariables
Definition: wmunstructuredapp.h:109
virtual ~WmUnstructuredApp()
T readVal(const WxCryptSet &wxc, const std::string &name, const T &defaultValue) const
Definition: wmunstructuredapp.h:72
static void outdent(std::string &indentation)
Definition: wmunstructuredapp.h:89
Definition: wmunstructuredequationset.h:19
Definition: wmvariableparser.h:77
bool has(const std::string &name) const
Returns true if the 'name' exists in the crypt.
std::vector< VALUETYPE > getVec(const std::string &name) const
Retrieve list of values associated with name.
Definition: wxcrypt.h:162
VALUETYPE get(const std::string &name) const
Retrieve the value associated with name.
Definition: wxcrypt.h:80
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
@ WMCALLTYPE_INVALID
Definition: wmunstructuredapp.h:21
@ WMCALLTYPE_EXTERNAL
Definition: wmunstructuredapp.h:25
@ WMCALLTYPE_PRIVATE
Definition: wmunstructuredapp.h:22
@ WMCALLTYPE_FLUX
Definition: wmunstructuredapp.h:23
@ WMCALLTYPE_SOURCE
Definition: wmunstructuredapp.h:24