SemOpt
0.2alpha2-SCC
|
Class encompassing a set of arguments. More...
Public Member Functions | |
SetArguments () | |
Simple constructor. | |
void | add_Argument (Argument *) |
Add an argument to the set. | |
Argument * | getArgumentByName (string) |
This method returns the pointer to the Argument whose name is given as parameter. | |
Argument * | getArgumentByNumber (int num) |
This method returns the pointer to the Argument whose identification number is given as parameter. | |
int | cardinality () const |
Retuns the cardinality of this set. | |
bool | empty () |
Check wether or not this set is empty. | |
SetArgumentsIterator | begin () const |
Begin of the iterator for this set of arguments. | |
SetArgumentsIterator | end () const |
End of the iterator for this set of arguments. | |
bool | exists (Argument *) |
Check whether or not an argument exists in this set. | |
bool | is_subset_equal (SetArguments *) |
Check whether this set is a subset of other | |
bool | is_subset (SetArguments *) |
Check whether this set is a proper subset of other | |
void | intersect (SetArguments *, SetArguments *) |
Intersect this set the other set and write the result in res | |
void | setminus (SetArguments *, SetArguments *) |
Setmisun. | |
void | remove (Argument *) |
Remove an argument from this set. | |
void | clone (SetArguments *) |
Clone this set. | |
bool | operator== (const SetArguments &other) const |
Overloading of the == operator. |
Class encompassing a set of arguments.
Definition at line 34 of file SetArguments.h.
void SetArguments::add_Argument | ( | Argument * | arg | ) |
Add an argument to the set.
[in] | arg | Pointer to an Argument |
Definition at line 24 of file SetArguments.cpp.
References Argument::getName(), and Argument::getNumber().
Referenced by Argument::add_attackers(), Argument::add_attacks(), Labelling::add_label(), intersect(), and AF::readFile().
SetArgumentsIterator SetArguments::begin | ( | ) | const |
Begin of the iterator for this set of arguments.
SetArgumentsIterator | An iterator pointing at the first of the elements of this set |
Definition at line 72 of file SetArguments.cpp.
Referenced by AF::begin(), clone(), intersect(), is_subset_equal(), operator==(), and setminus().
int SetArguments::cardinality | ( | ) | const |
Retuns the cardinality of this set.
int |
Definition at line 34 of file SetArguments.cpp.
Referenced by is_subset(), is_subset_equal(), AF::numArgs(), and operator==().
void SetArguments::clone | ( | SetArguments * | set | ) |
Clone this set.
[in] | set | The set that will be the new clone |
void |
Definition at line 164 of file SetArguments.cpp.
References begin(), and end().
Referenced by setminus().
bool SetArguments::empty | ( | ) |
Check wether or not this set is empty.
bool |
Definition at line 63 of file SetArguments.cpp.
Referenced by Labelling::empty(), and is_subset_equal().
SetArgumentsIterator SetArguments::end | ( | ) | const |
End of the iterator for this set of arguments.
SetArgumentsIterator | An iterator pointing at the last of the elements of this set |
Definition at line 81 of file SetArguments.cpp.
Referenced by clone(), AF::end(), intersect(), is_subset_equal(), operator==(), and setminus().
bool SetArguments::exists | ( | Argument * | arg | ) |
Check whether or not an argument exists in this set.
[in] | arg |
bool |
Definition at line 144 of file SetArguments.cpp.
References Argument::getName().
Referenced by is_subset_equal(), and setminus().
Argument * SetArguments::getArgumentByName | ( | string | name | ) |
This method returns the pointer to the Argument whose name is given as parameter.
[in] | name | The name of the argument |
Argument* | The pointer to the Argument object, or NULL if not found |
Definition at line 44 of file SetArguments.cpp.
Referenced by AF::getArgumentByName().
Argument * SetArguments::getArgumentByNumber | ( | int | num | ) |
This method returns the pointer to the Argument whose identification number is given as parameter.
[in] | num | The name of the argument |
Argument* | The pointer to the Argument object, or NULL if not found |
Definition at line 54 of file SetArguments.cpp.
Referenced by AF::getArgumentByNumber().
void SetArguments::intersect | ( | SetArguments * | other, |
SetArguments * | res | ||
) |
Intersect this set the other
set and write the result in res
[in] | other | The other term of the intersection |
[out] | res | The result of the intersection |
void |
Definition at line 178 of file SetArguments.cpp.
References add_Argument(), begin(), and end().
bool SetArguments::is_subset | ( | SetArguments * | other | ) |
Check whether this set is a proper subset of other
[in] | other | The other set to check |
bool |
Definition at line 114 of file SetArguments.cpp.
References cardinality(), and is_subset_equal().
bool SetArguments::is_subset_equal | ( | SetArguments * | other | ) |
Check whether this set is a subset of other
[in] | other | The other set to check |
bool |
Definition at line 91 of file SetArguments.cpp.
References begin(), cardinality(), empty(), end(), and exists().
Referenced by is_subset().
bool SetArguments::operator== | ( | const SetArguments & | other | ) | const |
Overloading of the == operator.
[in] | other | The other term of the comparison |
bool |
Definition at line 198 of file SetArguments.cpp.
References begin(), cardinality(), and end().
void SetArguments::remove | ( | Argument * | arg | ) |
Remove an argument from this set.
[in] | arg |
void |
Definition at line 154 of file SetArguments.cpp.
References Argument::getName().
Referenced by setminus().
void SetArguments::setminus | ( | SetArguments * | other, |
SetArguments * | result | ||
) |