SemOpt
0.2alpha2-SCC
Main Page
Classes
Files
File List
File Members
Argument.cpp
Go to the documentation of this file.
1
9
#include "Argument.h"
10
17
Argument::Argument
(
string
name,
int
num,
AF
*theaf)
18
{
19
this->name = name;
20
this->number = num;
21
this->af = theaf;
22
this->attackers =
new
SetArguments
();
23
this->attacks =
new
SetArguments
();
24
}
25
26
Argument::~Argument()
27
{
28
// TODO Auto-generated destructor stub
29
}
30
35
string
Argument::getName
()
const
36
{
37
return
this->name;
38
}
39
44
int
Argument::getNumber
()
const
45
{
46
return
this->number;
47
}
48
54
Variable
Argument::InVar
()
55
{
56
return
this->number + 1;
57
}
58
64
Variable
Argument::OutVar
()
65
{
66
return
this->number + 1 + this->af->
numArgs
();
67
}
68
74
Variable
Argument::UndecVar
()
75
{
76
return
this->number + 1 + 2 * this->af->
numArgs
();
77
}
78
84
Variable
Argument::NotInVar
()
85
{
86
return
NOT(this->
InVar
());
87
}
88
94
Variable
Argument::NotOutVar
()
95
{
96
return
NOT(this->
OutVar
());
97
}
98
104
Variable
Argument::NotUndecVar
()
105
{
106
return
NOT(this->
UndecVar
());
107
}
108
114
bool
Argument::operator==
(
const
Argument
&other)
const
115
{
116
if
(this->name == other.
getName
() &&
117
this->number == other.
getNumber
())
118
return
true
;
119
else
120
return
false
;
121
}
122
128
bool
Argument::operator!=
(
const
Argument
&other)
const
129
{
130
if
(this->name == other.
getName
() &&
131
this->number == other.
getNumber
())
132
return
false
;
133
else
134
return
true
;
135
}
136
142
void
Argument::add_attacks
(
Argument
*arg)
143
{
144
this->attacks->
add_Argument
(arg);
145
}
146
152
void
Argument::add_attackers
(
Argument
*arg)
153
{
154
this->attackers->
add_Argument
(arg);
155
}
156
161
SetArguments
*
Argument::get_attacks
()
162
{
163
return
this->attacks;
164
}
165
170
SetArguments
*
Argument::get_attackers
()
171
{
172
return
this->attackers;
173
}
174
179
AF
*
Argument::get_af
()
180
{
181
return
this->af;
182
}
src
Argument.cpp
Generated on Thu Jun 13 2013 11:23:15 for SemOpt by
1.8.1.2