00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef INTEGRATED_EXPRESSION_HPP
00021 #define INTEGRATED_EXPRESSION_HPP
00022
00023 #include <Expression.hpp>
00024
00025 class IntegratedExpression
00026 : public Expression
00027 {
00028 public:
00029 enum IType {
00030 unknownFunction,
00031 testFunction,
00032 function
00033 };
00034
00035 private:
00036 IType __integratedExpressionType;
00037
00038 public:
00039 const IType& integratedExpressionType() const
00040 {
00041 return __integratedExpressionType;
00042 }
00043
00044 IntegratedExpression(IntegratedExpression::IType t)
00045 : Expression(Expression::integrated),
00046 __integratedExpressionType(t)
00047 {
00048 ;
00049 }
00050
00051 IntegratedExpression(const IntegratedExpression& I)
00052 : Expression(I),
00053 __integratedExpressionType(I.__integratedExpressionType)
00054 {
00055 ;
00056 }
00057
00058 ~IntegratedExpression()
00059 {
00060 ;
00061 }
00062 };
00063
00064 class IntegratedExpressionUnknown
00065 : public IntegratedExpression
00066 {
00067 private:
00068 const std::string __unknownName;
00069
00070 std::ostream& put(std::ostream& os) const
00071 {
00072 os << __unknownName;
00073 return os;
00074 }
00075
00076 public:
00077 void execute()
00078 {
00079 ;
00080 }
00081
00082 const std::string& unknownName() const
00083 {
00084 return __unknownName;
00085 }
00086
00087 IntegratedExpressionUnknown(const std::string& unknownName)
00088 : IntegratedExpression(IntegratedExpression::unknownFunction),
00089 __unknownName(unknownName)
00090 {
00091 ;
00092 }
00093
00094 IntegratedExpressionUnknown(const IntegratedExpressionUnknown& I)
00095 : IntegratedExpression(I),
00096 __unknownName(I.__unknownName)
00097 {
00098 ;
00099 }
00100
00101 ~IntegratedExpressionUnknown()
00102 {
00103 ;
00104 }
00105 };
00106
00107
00108 class IntegratedExpressionTest
00109 : public IntegratedExpression
00110 {
00111 private:
00112 const std::string __testFunctionName;
00113
00114 std::ostream& put(std::ostream& os) const
00115 {
00116 os << __testFunctionName;
00117 return os;
00118 }
00119
00120 public:
00121 void execute()
00122 {
00123 ;
00124 }
00125
00126 const std::string& testFunctionName() const
00127 {
00128 return __testFunctionName;
00129 }
00130
00131 IntegratedExpressionTest(const std::string& testFunctionName)
00132 : IntegratedExpression(IntegratedExpression::testFunction),
00133 __testFunctionName(testFunctionName)
00134 {
00135 ;
00136 }
00137
00138 IntegratedExpressionTest(const IntegratedExpressionTest& I)
00139 : IntegratedExpression(I),
00140 __testFunctionName(I.__testFunctionName)
00141 {
00142 ;
00143 }
00144
00145 ~IntegratedExpressionTest()
00146 {
00147 ;
00148 }
00149 };
00150
00151
00152
00153 class IntegratedExpressionFunctionExpression
00154 : public IntegratedExpression
00155 {
00156 private:
00157 ReferenceCounting<FunctionExpression> __function;
00158
00159 std::ostream& put(std::ostream& os) const
00160 {
00161 os << (*__function);
00162 return os;
00163 }
00164
00165 public:
00166 void execute()
00167 {
00168 (*__function).execute();
00169 }
00170
00171 ReferenceCounting<FunctionExpression> function() const
00172 {
00173 return __function;
00174 }
00175
00176 IntegratedExpressionFunctionExpression(ReferenceCounting<FunctionExpression> F)
00177 : IntegratedExpression(IntegratedExpression::function),
00178 __function(F)
00179 {
00180 ;
00181 }
00182
00183 IntegratedExpressionFunctionExpression(const IntegratedExpressionFunctionExpression& I)
00184 : IntegratedExpression(I),
00185 __function(I.__function)
00186 {
00187 ;
00188 }
00189
00190 ~IntegratedExpressionFunctionExpression()
00191 {
00192 ;
00193 }
00194 };
00195
00196 #endif // INTEGRATED_EXPRESSION_HPP
00197