StringExpressions.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. #ifndef STRINGEXPRESSIONS_H_
  2. #define STRINGEXPRESSIONS_H_
  3. #include "sc_types.h"
  4. #include "StatemachineInterface.h"
  5. /*! \file Header of the state machine 'StringExpressions'.
  6. */
  7. class StringExpressions : public StatemachineInterface
  8. {
  9. public:
  10. StringExpressions();
  11. ~StringExpressions();
  12. /*! Enumeration of all states */
  13. typedef enum
  14. {
  15. main_region_AssignmentChecked,
  16. main_region_Failed,
  17. main_region_VarToVarCompareSucceeded,
  18. main_region_VarToConstCompareSucceeded,
  19. main_region_ConstToVarCompareSucceeded,
  20. main_region_ConstToConstCompareSucceeded,
  21. StringExpressions_last_state
  22. } StringExpressionsStates;
  23. //! Inner class for default interface scope.
  24. class DefaultSCI
  25. {
  26. public:
  27. /*! Gets the value of the variable 'stringA' that is defined in the default interface scope. */
  28. sc_string get_stringA() const;
  29. /*! Sets the value of the variable 'stringA' that is defined in the default interface scope. */
  30. void set_stringA(sc_string value);
  31. /*! Gets the value of the variable 'stringA2' that is defined in the default interface scope. */
  32. sc_string get_stringA2() const;
  33. /*! Sets the value of the variable 'stringA2' that is defined in the default interface scope. */
  34. void set_stringA2(sc_string value);
  35. /*! Gets the value of the variable 'stringB' that is defined in the default interface scope. */
  36. sc_string get_stringB() const;
  37. /*! Sets the value of the variable 'stringB' that is defined in the default interface scope. */
  38. void set_stringB(sc_string value);
  39. /*! Gets the value of the variable 'quotedStringX' that is defined in the default interface scope. */
  40. sc_string get_quotedStringX() const;
  41. /*! Sets the value of the variable 'quotedStringX' that is defined in the default interface scope. */
  42. void set_quotedStringX(sc_string value);
  43. /*! Gets the value of the variable 'quotedStringY' that is defined in the default interface scope. */
  44. sc_string get_quotedStringY() const;
  45. /*! Sets the value of the variable 'quotedStringY' that is defined in the default interface scope. */
  46. void set_quotedStringY(sc_string value);
  47. /*! Gets the value of the variable 'stringVarEqual' that is defined in the default interface scope. */
  48. sc_boolean get_stringVarEqual() const;
  49. /*! Sets the value of the variable 'stringVarEqual' that is defined in the default interface scope. */
  50. void set_stringVarEqual(sc_boolean value);
  51. /*! Gets the value of the variable 'stringVarNotEqual' that is defined in the default interface scope. */
  52. sc_boolean get_stringVarNotEqual() const;
  53. /*! Sets the value of the variable 'stringVarNotEqual' that is defined in the default interface scope. */
  54. void set_stringVarNotEqual(sc_boolean value);
  55. /*! Gets the value of the variable 'guardStringNotEqual' that is defined in the default interface scope. */
  56. sc_boolean get_guardStringNotEqual() const;
  57. /*! Sets the value of the variable 'guardStringNotEqual' that is defined in the default interface scope. */
  58. void set_guardStringNotEqual(sc_boolean value);
  59. /*! Gets the value of the variable 'guardStringEqual' that is defined in the default interface scope. */
  60. sc_boolean get_guardStringEqual() const;
  61. /*! Sets the value of the variable 'guardStringEqual' that is defined in the default interface scope. */
  62. void set_guardStringEqual(sc_boolean value);
  63. /*! Raises the in event 'e' that is defined in the default interface scope. */
  64. void raise_e();
  65. private:
  66. friend class StringExpressions;
  67. sc_string stringA;
  68. sc_string stringA2;
  69. sc_string stringB;
  70. sc_string quotedStringX;
  71. sc_string quotedStringY;
  72. sc_boolean stringVarEqual;
  73. sc_boolean stringVarNotEqual;
  74. sc_boolean guardStringNotEqual;
  75. sc_boolean guardStringEqual;
  76. sc_boolean e_raised;
  77. };
  78. /*! Returns an instance of the interface class 'DefaultSCI'. */
  79. DefaultSCI* getDefaultSCI();
  80. /*! Gets the value of the variable 'stringA' that is defined in the default interface scope. */
  81. sc_string get_stringA() const;
  82. /*! Sets the value of the variable 'stringA' that is defined in the default interface scope. */
  83. void set_stringA(sc_string value);
  84. /*! Gets the value of the variable 'stringA2' that is defined in the default interface scope. */
  85. sc_string get_stringA2() const;
  86. /*! Sets the value of the variable 'stringA2' that is defined in the default interface scope. */
  87. void set_stringA2(sc_string value);
  88. /*! Gets the value of the variable 'stringB' that is defined in the default interface scope. */
  89. sc_string get_stringB() const;
  90. /*! Sets the value of the variable 'stringB' that is defined in the default interface scope. */
  91. void set_stringB(sc_string value);
  92. /*! Gets the value of the variable 'quotedStringX' that is defined in the default interface scope. */
  93. sc_string get_quotedStringX() const;
  94. /*! Sets the value of the variable 'quotedStringX' that is defined in the default interface scope. */
  95. void set_quotedStringX(sc_string value);
  96. /*! Gets the value of the variable 'quotedStringY' that is defined in the default interface scope. */
  97. sc_string get_quotedStringY() const;
  98. /*! Sets the value of the variable 'quotedStringY' that is defined in the default interface scope. */
  99. void set_quotedStringY(sc_string value);
  100. /*! Gets the value of the variable 'stringVarEqual' that is defined in the default interface scope. */
  101. sc_boolean get_stringVarEqual() const;
  102. /*! Sets the value of the variable 'stringVarEqual' that is defined in the default interface scope. */
  103. void set_stringVarEqual(sc_boolean value);
  104. /*! Gets the value of the variable 'stringVarNotEqual' that is defined in the default interface scope. */
  105. sc_boolean get_stringVarNotEqual() const;
  106. /*! Sets the value of the variable 'stringVarNotEqual' that is defined in the default interface scope. */
  107. void set_stringVarNotEqual(sc_boolean value);
  108. /*! Gets the value of the variable 'guardStringNotEqual' that is defined in the default interface scope. */
  109. sc_boolean get_guardStringNotEqual() const;
  110. /*! Sets the value of the variable 'guardStringNotEqual' that is defined in the default interface scope. */
  111. void set_guardStringNotEqual(sc_boolean value);
  112. /*! Gets the value of the variable 'guardStringEqual' that is defined in the default interface scope. */
  113. sc_boolean get_guardStringEqual() const;
  114. /*! Sets the value of the variable 'guardStringEqual' that is defined in the default interface scope. */
  115. void set_guardStringEqual(sc_boolean value);
  116. /*! Raises the in event 'e' that is defined in the default interface scope. */
  117. void raise_e();
  118. /*
  119. * Functions inherited from StatemachineInterface
  120. */
  121. virtual void init();
  122. virtual void enter();
  123. virtual void exit();
  124. virtual void runCycle();
  125. /*!
  126. * Checks if the state machine is active (until 2.4.1 this method was used for states).
  127. * A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
  128. */
  129. virtual sc_boolean isActive() const;
  130. /*!
  131. * Checks if all active states are final.
  132. * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
  133. */
  134. virtual sc_boolean isFinal() const;
  135. /*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
  136. sc_boolean isStateActive(StringExpressionsStates state) const;
  137. private:
  138. //! the maximum number of orthogonal states defines the dimension of the state configuration vector.
  139. static const sc_integer maxOrthogonalStates = 1;
  140. StringExpressionsStates stateConfVector[maxOrthogonalStates];
  141. sc_ushort stateConfVectorPosition;
  142. DefaultSCI iface;
  143. // prototypes of all internal functions
  144. sc_boolean check_main_region_AssignmentChecked_tr0_tr0();
  145. sc_boolean check_main_region_VarToVarCompareSucceeded_tr0_tr0();
  146. sc_boolean check_main_region_VarToConstCompareSucceeded_tr0_tr0();
  147. sc_boolean check_main_region_ConstToVarCompareSucceeded_tr0_tr0();
  148. sc_boolean check_main_region__choice_0_tr1_tr1();
  149. sc_boolean check_main_region__choice_0_tr0();
  150. sc_boolean check_main_region__choice_1_tr1_tr1();
  151. sc_boolean check_main_region__choice_1_tr0();
  152. sc_boolean check_main_region__choice_2_tr1_tr1();
  153. sc_boolean check_main_region__choice_2_tr0();
  154. sc_boolean check_main_region__choice_3_tr0_tr0();
  155. sc_boolean check_main_region__choice_3_tr1();
  156. sc_boolean check_main_region__choice_4_tr1_tr1();
  157. sc_boolean check_main_region__choice_4_tr0();
  158. sc_boolean check_main_region__choice_5_tr1_tr1();
  159. sc_boolean check_main_region__choice_5_tr0();
  160. sc_boolean check_main_region__choice_6_tr0();
  161. sc_boolean check_main_region__choice_7_tr0_tr0();
  162. sc_boolean check_main_region__choice_7_tr1();
  163. sc_boolean check_main_region__choice_8_tr1_tr1();
  164. sc_boolean check_main_region__choice_8_tr0();
  165. sc_boolean check_main_region__choice_9_tr1_tr1();
  166. sc_boolean check_main_region__choice_9_tr0();
  167. sc_boolean check_main_region__choice_10_tr0();
  168. sc_boolean check_main_region__choice_11_tr0_tr0();
  169. sc_boolean check_main_region__choice_11_tr1();
  170. sc_boolean check_main_region__choice_12_tr1_tr1();
  171. sc_boolean check_main_region__choice_12_tr0();
  172. sc_boolean check_main_region__choice_13_tr1_tr1();
  173. sc_boolean check_main_region__choice_13_tr0();
  174. sc_boolean check_main_region__choice_14_tr0();
  175. void effect_main_region_AssignmentChecked_tr0();
  176. void effect_main_region_VarToVarCompareSucceeded_tr0();
  177. void effect_main_region_VarToConstCompareSucceeded_tr0();
  178. void effect_main_region_ConstToVarCompareSucceeded_tr0();
  179. void effect_main_region__choice_0_tr1();
  180. void effect_main_region__choice_0_tr0();
  181. void effect_main_region__choice_1_tr1();
  182. void effect_main_region__choice_1_tr0();
  183. void effect_main_region__choice_2_tr1();
  184. void effect_main_region__choice_2_tr0();
  185. void effect_main_region__choice_3_tr0();
  186. void effect_main_region__choice_3_tr1();
  187. void effect_main_region__choice_4_tr1();
  188. void effect_main_region__choice_4_tr0();
  189. void effect_main_region__choice_5_tr1();
  190. void effect_main_region__choice_5_tr0();
  191. void effect_main_region__choice_6_tr0();
  192. void effect_main_region__choice_7_tr0();
  193. void effect_main_region__choice_7_tr1();
  194. void effect_main_region__choice_8_tr1();
  195. void effect_main_region__choice_8_tr0();
  196. void effect_main_region__choice_9_tr1();
  197. void effect_main_region__choice_9_tr0();
  198. void effect_main_region__choice_10_tr0();
  199. void effect_main_region__choice_11_tr0();
  200. void effect_main_region__choice_11_tr1();
  201. void effect_main_region__choice_12_tr1();
  202. void effect_main_region__choice_12_tr0();
  203. void effect_main_region__choice_13_tr1();
  204. void effect_main_region__choice_13_tr0();
  205. void effect_main_region__choice_14_tr0();
  206. void enact_main_region_AssignmentChecked();
  207. void enseq_main_region_AssignmentChecked_default();
  208. void enseq_main_region_Failed_default();
  209. void enseq_main_region_VarToVarCompareSucceeded_default();
  210. void enseq_main_region_VarToConstCompareSucceeded_default();
  211. void enseq_main_region_ConstToVarCompareSucceeded_default();
  212. void enseq_main_region_ConstToConstCompareSucceeded_default();
  213. void enseq_main_region_default();
  214. void exseq_main_region_AssignmentChecked();
  215. void exseq_main_region_Failed();
  216. void exseq_main_region_VarToVarCompareSucceeded();
  217. void exseq_main_region_VarToConstCompareSucceeded();
  218. void exseq_main_region_ConstToVarCompareSucceeded();
  219. void exseq_main_region_ConstToConstCompareSucceeded();
  220. void exseq_main_region();
  221. void react_main_region_AssignmentChecked();
  222. void react_main_region_Failed();
  223. void react_main_region_VarToVarCompareSucceeded();
  224. void react_main_region_VarToConstCompareSucceeded();
  225. void react_main_region_ConstToVarCompareSucceeded();
  226. void react_main_region_ConstToConstCompareSucceeded();
  227. void react_main_region__choice_0();
  228. void react_main_region__choice_1();
  229. void react_main_region__choice_2();
  230. void react_main_region__choice_3();
  231. void react_main_region__choice_4();
  232. void react_main_region__choice_5();
  233. void react_main_region__choice_6();
  234. void react_main_region__choice_7();
  235. void react_main_region__choice_8();
  236. void react_main_region__choice_9();
  237. void react_main_region__choice_10();
  238. void react_main_region__choice_11();
  239. void react_main_region__choice_12();
  240. void react_main_region__choice_13();
  241. void react_main_region__choice_14();
  242. void react_main_region__entry_Default();
  243. void clearInEvents();
  244. void clearOutEvents();
  245. };
  246. #endif /* STRINGEXPRESSIONS_H_ */