#include <transition.hh>
Public Member Functions | |
bool | can_be_modified () const |
Tells, whether this transition can be modified. | |
bool | can_read () const |
Tells, whether this transition can be modified. | |
size_int_t | get_gid () const |
Returns transition GID of this transition. | |
size_int_t | get_lid () const |
Returns transition LID of this transition. | |
system_t * | get_parent_system () const |
Returns a "parent" system of this transition. | |
virtual void | set_parent_system (system_t &system) |
Sets a "parent" system of this transition. | |
transition_t (system_t *const system) | |
A constructor. | |
transition_t () | |
A constructor. | |
virtual | ~transition_t () |
A destructor. | |
Methods for reading a transition from a string representation | |
virtual int | from_string (std::string &trans_str, const size_int_t process_gid=NO_ID)=0 |
Reads in the transition from a string representation. | |
virtual int | read (std::istream &istr, size_int_t process_gid=NO_ID)=0 |
Reads in the transition from a string representation in stream. | |
Methods for modifying a transition | |
virtual void | set_gid (const size_int_t gid) |
Sets a GID of this transition. | |
virtual void | set_lid (const size_int_t id) |
Sets a LID of this transition. | |
Obligatory part of abstact interface | |
These methods have to implemented in each implementation of transition_t (if transitions are supported by the system). | |
virtual std::string | to_string () const =0 |
Returns a string representation of the transition. | |
virtual void | write (std::ostream &ostr) const =0 |
Writes a string representation of the transition to stream. | |
Static Protected Member Functions | |
static error_vector_t & | get_error_vector () |
static void | set_error_vector (error_vector_t &evect) |
Protected Attributes | |
size_int_t | global_id |
Protected data item containing GID. | |
size_int_t | local_id |
Protected data item containing LID. | |
system_t * | parent_system |
Protected data item containing "parent" system. | |
Static Protected Attributes | |
static error_vector_t * | ptrans_terr = &gerr |
This class represents a transition. It is a part of the model of a system. The corresponding system is given as a parameter of constructor transition_t(system_t * const system) or by method set_parent_system(). Developer is reponsible for correct setting of this "parent" system (but developer rarely creates new transitions - they are automatically created by system during source file reading).
transition_t | ( | system_t *const | system | ) | [inline] |
bool can_be_modified | ( | ) | const |
Tells, whether this transition can be modified.
This method uses "parent" system given in a constructor or a method set_parent_system(). Therefore "parent" system has to be set before the first call of this method.
References system_t::get_abilities(), parent_system, and system_abilities_t::transition_can_be_modified.
bool can_read | ( | ) | const |
Tells, whether this transition can be modified.
This method uses "parent" system given in a constructor or a method set_parent_system(). Therefore "parent" system has to be set before the first call of this method.
References system_t::get_abilities(), parent_system, and system_abilities_t::transition_can_read.
virtual int from_string | ( | std::string & | trans_str, | |
const size_int_t | process_gid = NO_ID | |||
) | [pure virtual] |
Reads in the transition from a string representation.
trans_str | = string containing a source of a transition | |
process_gid | = context of a process (default value NO_ID = global context) |
Implemented in bymoc_transition_t, dve_prob_transition_t, and dve_transition_t.
static error_vector_t& get_error_vector | ( | ) | [inline, static, protected] |
Protected static method returning , which will be used in case of any error message
size_int_t get_gid | ( | ) | const [inline] |
Returns transition GID of this transition.
Referenced by prob_system_t::consolidate(), por_t::generate_ample_sets(), por_t::generate_composed_ample_sets(), dve_prob_explicit_system_t::get_succs(), and por_t::init().
size_int_t get_lid | ( | ) | const [inline] |
Returns transition LID of this transition.
Referenced by por_t::init(), dve_system_trans_t::write(), and dve_prob_process_t::write().
virtual int read | ( | std::istream & | istr, | |
size_int_t | process_gid = NO_ID | |||
) | [pure virtual] |
Reads in the transition from a string representation in stream.
istr | = input stream containing a source of transition | |
process_gid | = context of process (default value NO_ID = global context) |
Implemented in bymoc_transition_t, dve_prob_transition_t, and dve_transition_t.
static void set_error_vector | ( | error_vector_t & | evect | ) | [inline, static, protected] |
Protected static method setting , which will be used in case of any error message
virtual void set_gid | ( | const size_int_t | gid | ) | [inline, virtual] |
Sets a GID of this transition.
Referenced by prob_system_t::consolidate().
virtual void set_lid | ( | const size_int_t | id | ) | [inline, virtual] |
Sets a LID of this transition.
Referenced by dve_prob_process_t::add_prob_transition(), and dve_process_t::add_transition().
virtual std::string to_string | ( | ) | const [pure virtual] |
Returns a string representation of the transition.
If system can work with transitions (according to system_t::can_transitions()), this method is obligatory to implement.
Implemented in bymoc_transition_t, dve_prob_transition_t, and dve_transition_t.
virtual void write | ( | std::ostream & | ostr | ) | const [pure virtual] |
Writes a string representation of the transition to stream.
If system can work with transitions (according to system_t::can_transitions()), this method is obligatory to implement.
Implemented in bymoc_transition_t, dve_prob_transition_t, and dve_transition_t.
Referenced by dve_prob_process_t::write().
error_vector_t * ptrans_terr = &gerr [static, protected] |
Protected static data item containing , which will be used in case of any error message
Referenced by dve_transition_t::read(), dve_prob_transition_t::read(), and dve_prob_transition_t::write().