00001 #ifndef DIVINE_MCRL_SYSTEM_TRANS_HH
00002 #define DIVINE_MCRL_SYSTEM_TRANS_HH
00003
00004 #ifdef HAVE_MCRL2
00005
00006 #ifndef DOXYGEN_PROCESSING
00007 #include "system/system_trans.hh"
00008 #include <aterm2.h>
00009
00010 namespace divine {
00011 #endif //DOXYGEN_PROCESSING
00012
00013 class explicit_system_t;
00014
00016 class mcrl2_system_trans_t : virtual public system_trans_t
00017 {
00018 private:
00019 ATermAppl trans;
00020 state_t succ;
00021 protected:
00022 void copy_from(const system_trans_t & second);
00023 public:
00025 mcrl2_system_trans_t() {
00026 trans = NULL;
00027 ATprotect((ATerm*) &trans);
00028 }
00029 mcrl2_system_trans_t(ATermAppl trans, state_t succ) {
00030 this->trans = trans;
00031 ATprotect((ATerm*) &(this->trans));
00032 this->succ = succ;
00033 }
00035 virtual ~mcrl2_system_trans_t() {
00036 ATunprotect((ATerm*) &trans);
00037 }
00039
00040 virtual system_trans_t & operator=(const system_trans_t & second);
00042 virtual std::string to_string() const;
00045 virtual void write(std::ostream & ostr) const;
00046
00051
00052 virtual void set_count(const size_int_t new_count) { UNIMPLEMENTED(void); }
00054 virtual size_int_t get_count() const { return 0; }
00056 virtual transition_t *& operator[](const int i) { UNIMPLEMENTED(transition_t *&); }
00058 virtual transition_t * const & operator[](const int i) const { UNIMPLEMENTED(transition_t *&); }
00061 const ATermAppl & get_trans() const { return trans; }
00062 const state_t & get_succ() const { return succ; }
00063 };
00064
00066
00074 class mcrl2_enabled_trans_t: public enabled_trans_t, public mcrl2_system_trans_t
00075 {
00076 public:
00078 mcrl2_enabled_trans_t() {}
00079 mcrl2_enabled_trans_t(ATermAppl trans, state_t succ) :
00080 mcrl2_system_trans_t(trans, succ) {}
00082 virtual enabled_trans_t & operator=(const enabled_trans_t & second);
00083 };
00084
00085 #ifndef DOXYGEN_PROCESSING
00086 }
00087
00088 #endif //DOXYGEN_PROCESSING
00089
00090 #endif
00091 #endif
00092