1
//////////////////////////////////////////////////////////////////////////////////
2
// This file is part of Toolkit for Conceptual Modeling (TCM).
3
// (c) copyright 2001, Universiteit Twente.
4
// Author: Rik Eshuis (eshuis@cs.utwente.nl).
6
// TCM is free software; you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 2 of the License, or
9
// (at your option) any later version.
11
// TCM is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
16
// You should have received a copy of the GNU General Public License
17
// along with TCM; if not, write to the Free Software
18
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
////////////////////////////////////////////////////////////////////////////////
21
#include "adsproperty.h"
22
#include "adsvariable.h"
23
#include "outputfile.h"
26
Prop::Prop(const char *str,PropType p){
33
Prop::Prop(const Prop ©){
48
bool Prop::operator==(const Prop &comp) const{
49
if (comp.s==s) return True; else return False;
54
string Prop::GetName(void){
58
PropType Prop::GetType(void) const{
62
void Prop::SetType(PropType p){
67
void Prop::SetVar(ADSVar *var){
71
ADSVar *Prop::GetVar(void) const {
75
bool Prop::isInternal(){
76
return ((stype==::INTERNAL_PROP)||(stype==::INTERNAL_INT)||(stype==::INTERNAL_STRING)||(stype==::SENDEVENT));
80
void Prop::Write(OutputFile *ofile){
83
case ::PROP : d="property" ;break;
84
case ::INT : d="integer" ;break;
85
case ::STRING : d="string" ;break;
86
case ::EVENT : d="event" ;break;
87
case ::SENDEVENT : d="SENDevent" ;break;
88
case ::INTERNAL_PROP : d="internal property" ;break;
89
case ::INTERNAL_INT : d="internal integer" ;break;
90
case ::INTERNAL_STRING : d="internal string" ;break;
93
(* ofile)<< "\t{ Basic proposition : " << s << ": " << d << " }\n";
95
(*ofile) << "NO var referenced\n";
100
(*ofile) << "is referenced \n";
108
case ::PROP : d="property" ;break;
109
case ::INT : d="integer" ;break;
110
case ::STRING : d="string" ;break;
111
case ::EVENT : d="event" ;break;
112
case ::SENDEVENT : d="SENDevent" ;break;
113
case ::INTERNAL_PROP : d="internal property" ;break;
114
case ::INTERNAL_INT : d="internal integer" ;break;
115
case ::INTERNAL_STRING : d="internal string" ;break;
118
std::cout<< "\t{ Basic proposition : " << s << ": " << d << " }\n";
120
std::cout << "NO var referenced\n";
125
std::cout << "is referenced \n";