~ubuntu-branches/ubuntu/utopic/tcm/utopic

« back to all changes in this revision

Viewing changes to src/sd/bv/scdtransitionedge.h

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador
  • Date: 2003-07-03 20:08:21 UTC
  • Revision ID: james.westby@ubuntu.com-20030703200821-se4xtqx25e5miczi
Tags: upstream-2.20
ImportĀ upstreamĀ versionĀ 2.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//------------------------------------------------------------------------------
 
2
//
 
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
 
4
// (c) copyright 1996, Vrije Universiteit Amsterdam.
 
5
// Author: Frank Dehne (frank@cs.vu.nl).
 
6
//
 
7
// TCM is free software; you can redistribute it and/or modify
 
8
// it under the terms of the GNU General Public License as published by
 
9
// the Free Software Foundation; either version 2 of the License, or
 
10
// (at your option) any later version.
 
11
//
 
12
// TCM is distributed in the hope that it will be useful,
 
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
// GNU General Public License for more details.
 
16
//
 
17
// You should have received a copy of the GNU General Public License
 
18
// along with TCM; if not, write to the Free Software
 
19
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
20
// 02111-1307, USA.
 
21
//-----------------------------------------------------------------------------
 
22
#ifndef _SCDTRANSITIONEDGE_H
 
23
#define _SCDTRANSITIONEDGE_H
 
24
 
 
25
#include "edge.h"
 
26
 
 
27
#include "adsclockconstraint.h"
 
28
 
 
29
 
 
30
class SCGraph;
 
31
 
 
32
 
 
33
class Prop;
 
34
class SCNode;
 
35
 
 
36
 
 
37
/// transition (STD) edge class.
 
38
class SCDTransitionEdge: public Edge {
 
39
/*@Doc: {\large {\bf scope:} TSTD} */
 
40
public:
 
41
        ///
 
42
        SCDTransitionEdge(SCGraph *g, Subject *s1, Subject *s2);
 
43
        ///
 
44
        int GetClassType() const {return Code::SCD_TRANSITION_EDGE;}
 
45
        ///
 
46
        Subject *Clone() {return new SCDTransitionEdge(*this);}
 
47
 
 
48
      ///
 
49
        string GetLabel();
 
50
        /// return the event part of the label
 
51
        string GetEvent();
 
52
        /// return the guard part of the label
 
53
        string GetGuard();
 
54
        ///
 
55
        void SetLabel(string);
 
56
        ///
 
57
        bool HasEmptyEvent();
 
58
        ///
 
59
        bool HasEmptyGuard();
 
60
 
 
61
        ///
 
62
        bool AddProp(Prop *p);
 
63
        ///
 
64
        void GetPropList(List <Prop *> &p);
 
65
 
 
66
    ///
 
67
     void SetSendEvent(Prop *p){sendevent=p;}
 
68
     ///
 
69
     Prop *GetSendEvent(){return sendevent;}
 
70
 
 
71
 
 
72
     void SetClockConstraint(ClockConstraint *c);
 
73
 
 
74
 
 
75
     ClockConstraint *GetClockConstraint();
 
76
 
 
77
 
 
78
     bool hasClockConstraint();
 
79
 
 
80
     string GetUniqueName();
 
81
 
 
82
     /// 
 
83
     void AddConflict(SCDTransitionEdge *ah){conflict.add(ah);}
 
84
     ///
 
85
     void GetConflict(List <SCDTransitionEdge *> *al){*al=conflict;}
 
86
     ///
 
87
     SCNode *GetScope();
 
88
 
 
89
 private:
 
90
     ///
 
91
     string label;
 
92
     ///
 
93
     List <Prop *> propl;
 
94
     ///
 
95
     Prop *sendevent;
 
96
     
 
97
     ///
 
98
     ClockConstraint *cc;
 
99
     ///
 
100
     List <SCDTransitionEdge *> conflict;
 
101
 
 
102
 
 
103
 
 
104
};
 
105
#endif