DiaDes  0.1
DIAgnosisofDiscrete-EventSystem
CarriedValue.hh
Go to the documentation of this file.
1 
12 #ifndef __DIADES__ALTARICA__CARRIEDVALUE__HH
13 #define __DIADES__ALTARICA__CARRIEDVALUE__HH
14 
15 #include"Sdmdl.hh"
16 #include"Expression.hh"
17 
18 namespace Diades
19 {
20  namespace Altarica
21  {
22 
34  {
35  public:
36  virtual EncVariable operator()(const Variable & variable) = 0;
37  };
38 
39 
40 
41 
46  {
47  private:
48  EncVariableFactory * _factory;
49  string _prefix;
50  public:
51  EncVariableFactoryFunctor(EncVariableFactory & factory, const string & varPrefixName):
53  _factory(&factory),
54  _prefix(varPrefixName){}
55  virtual EncVariable operator()(const Variable & variable)
56  {
57  return _factory->newVariable(_prefix+ "." + variable.label());
58  }
59  };
60 
61 
62 
67  typedef pair<Value,Formula> CarriedValue;
68 
69 
81  bool getCarriedValues(Expression * expr,
82  EncodingVariableFunctor & functor,
83  const Identifier & varPrefixName,
84  Formula context,
85  vector<CarriedValue> & values);
86 
87 
96  ostream & operator <<(ostream & os, const CarriedValue & value);
97 
98 
99  };
100 };
101 
102 #endif
An Identifier is a reference to a string (IdentifierData) that only contains alpha-numeric characters...
Definition: Identifier.hh:121
EncVariableFactoryFunctor(EncVariableFactory &factory, const string &varPrefixName)
Definition: CarriedValue.hh:51
virtual EncVariable operator()(const Variable &variable)
Definition: CarriedValue.hh:55
Namespace of the Diades project.
pair< Value, Formula > CarriedValue
Definition: CarriedValue.hh:67
ostream & operator<<(ostream &os, const CarriedValue &value)
bool getCarriedValues(Expression *expr, EncodingVariableFunctor &functor, const Identifier &varPrefixName, Formula context, vector< CarriedValue > &values)
virtual EncVariable operator()(const Variable &variable)=0