#include <Set.h>
Some TecUtil functions allocate a Set_pa in which case you will need to use TecUtilSetDealloc to free the memory.
Public Member Functions | |
Set () | |
Create a Set object. | |
Set (SetIndex_t member) | |
Create a Set object. | |
Set (std::string strValue) | |
Create a Set object. | |
Set (std::set< int > const &stdSet) | |
Create a Set object from a std::set<int>. | |
Set (Set_pa set) | |
Create a Set object. | |
Set (const Set &set) | |
Create a Set object. | |
virtual | ~Set () |
virtual bool | operator== (const Set &rhs) const |
Query if the set contains the same members as the specified set. | |
virtual bool | operator!= (const Set &rhs) const |
Query if the set is different from the specified set. | |
virtual Set & | operator= (SetIndex_t rhs) |
Assign a single member to the Set. | |
virtual Set & | operator= (const Set &rhs) |
Copy the members of one set to the set. | |
virtual Set & | operator= (const std::string rhs) |
Assign set members from a string representation of a set. | |
virtual Set & | operator+= (SetIndex_t rhs) |
Add a member to the set. | |
virtual Set & | operator+= (const Set &rhs) |
Add the members of one set to the set. | |
virtual Set & | operator+= (const std::string rhs) |
Add set members from a string representation of a set. | |
virtual Set & | operator-= (SetIndex_t member) |
Remove a member from the set. | |
virtual Set & | operator-= (const Set &rhs) |
Remove the members of one set from the set. | |
virtual Set & | operator-= (const std::string rhs) |
Remove set members from a string representation of a set. | |
virtual void | add (SetIndex_t member) |
Add a member to the set. | |
virtual void | add (const Set &set) |
Add the members of one set to the set. | |
virtual void | remove (SetIndex_t member) |
Remove a member from the set. | |
virtual void | remove (const Set &set) |
Remove the members of one set from the set. | |
virtual void | clear () |
Remove all members from the set. | |
virtual void | assign (const Set &set) |
Copy the members of one set to the set. | |
virtual void | assign (std::string strValue) |
Assign set members from a string representation of a set. | |
virtual void | toStdSet (std::set< int > &stdSet) |
Create a std::set<int> representation of the set contents. | |
virtual std::string | toString () const |
Create a string representation of the set contents. | |
virtual Set_pa | getRef () const |
Get a reference to the Set_pa that is attached to the Set object. | |
virtual SetIndex_t | get (SetIndex_t position) const |
Get the member at the specified position in the set. | |
virtual SetIndex_t | size () const |
Get the number of members in the set. | |
virtual SetIndex_t | getNext (SetIndex_t member) const |
Get the next member in the set. | |
virtual SetIndex_t | getPosition (SetIndex_t member) const |
Get the position of the member within the set. | |
virtual bool | isEmpty () const |
Query if the set has any members. | |
virtual bool | isEqual (const Set &other) const |
Query if the set contains the same member as the specified set. | |
virtual bool | isMember (SetIndex_t member) const |
Query if a member is a part of the set. | |
virtual bool | isValidMember (SetIndex_t member) const |
Determine if a member number is valid. | |
virtual bool | isValidPosition (SetIndex_t position) const |
Determine if a position index is valid. | |
Static Public Member Functions | |
static Set | intersection (const Set &set1, const Set &set2) |
Calculate the intersection of two sets. |
tecplot::toolbox::Set::Set | ( | ) | [explicit] |
Create a Set object.
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be allocated. |
tecplot::toolbox::Set::Set | ( | SetIndex_t | member | ) | [explicit] |
Create a Set object.
member | The value with which to seed the Set object. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be allocated. |
tecplot::toolbox::Set::Set | ( | std::string | strValue | ) | [explicit] |
Create a Set object.
strValue | strValue must have the form: "[s[,s][,s]...]" where s can be one of: 'n' or 'n-m' or 'n-m:l' And where: n >= 1 m > n l >= 1 (l is a skip factor) e.g. "[1,4,7]" - 1,4,7 "[1-5]" - 1,2,3,4,5 "[1,4,7-13:2]" - 1,4,7,9,11,13 |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be allocated. | |
InvalidArgumentException | InvalidArgumentException is thrown if strValue does not conform to the specified rules. |
tecplot::toolbox::Set::Set | ( | std::set< int > const & | stdSet | ) | [explicit] |
Create a Set object from a std::set<int>.
stdSet | std::set<int> object |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be allocated. | |
InvalidArgumentException | InvalidArgumentException is thrown if stdSet contains items that are not valid set members. See isValidMember() for more info. |
tecplot::toolbox::Set::Set | ( | Set_pa | set | ) | [explicit] |
Create a Set object.
set | A preallocated Set_pa with which, to populate the Set object. If this parameter is NULL an empty Set will be created. |
Set_pa zoneSet; TecUtilZoneGetEnabled(&zoneSet); Set enabledZones(zoneSet); TecUtilSetDealloc(&zoneSet); ... do something with enabledZones ...
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be allocated. |
tecplot::toolbox::Set::Set | ( | const Set & | set | ) |
Create a Set object.
set | A Set object you want to copy |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be allocated. |
virtual tecplot::toolbox::Set::~Set | ( | ) | [virtual] |
virtual bool tecplot::toolbox::Set::operator== | ( | const Set & | rhs | ) | const [virtual] |
Query if the set contains the same members as the specified set.
rhs | The set on the right hand side to compare with |
true
if the set contains exactly the same members as the specified set. false
otherwise.virtual bool tecplot::toolbox::Set::operator!= | ( | const Set & | rhs | ) | const [virtual] |
Query if the set is different from the specified set.
rhs | The set on the right hand side to compare with |
true
if the sets are different. false
otherwise.virtual Set& tecplot::toolbox::Set::operator= | ( | SetIndex_t | rhs | ) | [virtual] |
Assign a single member to the Set.
rhs | A SetIndex_t which is greater than or equal to 1. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
Copy the members of one set to the set.
rhs | A set object that contains zero or more members |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
virtual Set& tecplot::toolbox::Set::operator= | ( | const std::string | rhs | ) | [virtual] |
Assign set members from a string representation of a set.
rhs | As string that represents a valid set. See Set::assign. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. | |
InvalidArgumentException | InvalidArgumentException is thrown if strValue does not conform to the specified rules. |
virtual Set& tecplot::toolbox::Set::operator+= | ( | SetIndex_t | rhs | ) | [virtual] |
Add a member to the set.
rhs | Member to add to the set. Member must be greater than or equal to 1. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
Add the members of one set to the set.
rhs | The set which to add to the current set. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
virtual Set& tecplot::toolbox::Set::operator+= | ( | const std::string | rhs | ) | [virtual] |
Add set members from a string representation of a set.
rhs | As string that represents a valid set. See Set::assign. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. | |
InvalidArgumentException | InvalidArgumentException is thrown if strValue does not conform to the specified rules. |
virtual Set& tecplot::toolbox::Set::operator-= | ( | SetIndex_t | member | ) | [virtual] |
Remove a member from the set.
member | Member to remove from the set. |
Remove the members of one set from the set.
rhs | The set identifying the members to remove from the current set. |
virtual Set& tecplot::toolbox::Set::operator-= | ( | const std::string | rhs | ) | [virtual] |
Remove set members from a string representation of a set.
rhs | As string that represents a valid set. See Set::assign. |
OutOfMemoryException | OutOfMemoryException is thrown if there is not enough memory to perform this operation. | |
InvalidArgumentException | InvalidArgumentException is thrown if strValue does not conform to the specified rules. |
virtual void tecplot::toolbox::Set::add | ( | SetIndex_t | member | ) | [virtual] |
Add a member to the set.
member | Member to add to the set. Member must be greater than or equal to 1. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
virtual void tecplot::toolbox::Set::add | ( | const Set & | set | ) | [virtual] |
Add the members of one set to the set.
set | The set which to add to the current set. |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
virtual void tecplot::toolbox::Set::remove | ( | SetIndex_t | member | ) | [virtual] |
Remove a member from the set.
member | Member to remove from the set. |
virtual void tecplot::toolbox::Set::remove | ( | const Set & | set | ) | [virtual] |
Remove the members of one set from the set.
set | The set which to remove the members from the current set. |
virtual void tecplot::toolbox::Set::clear | ( | ) | [virtual] |
Remove all members from the set.
virtual void tecplot::toolbox::Set::assign | ( | const Set & | set | ) | [virtual] |
Copy the members of one set to the set.
set | A set object that contains zero or more members |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. |
virtual void tecplot::toolbox::Set::assign | ( | std::string | strValue | ) | [virtual] |
Assign set members from a string representation of a set.
strValue | strValue must have the form: "[s[,s][,s]...]" where s can be one of: 'n' or 'n-m' or 'n-m:l' And where: n >= 1 m > n l >= 1 (l is a skip factor) e.g. "[1,4,7]" - 1,4,7 "[1-5]" - 1,2,3,4,5 "[1,4,7-13:2]" - 1,4,7,9,11,13 |
OutOfMemoryException | OutOfMemoryException is thrown if the Set could not be expanded. | |
InvalidArgumentException | InvalidArgumentException is thrown if strValue does not conform to the specified rules. |
virtual void tecplot::toolbox::Set::toStdSet | ( | std::set< int > & | stdSet | ) | [virtual] |
Create a std::set<int> representation of the set contents.
stdSet | std set<int> to which the memeber of the set will be assigned. |
virtual std::string tecplot::toolbox::Set::toString | ( | ) | const [virtual] |
Create a string representation of the set contents.
The resulting string will be in the form as described by Set::assign(std::string strValue).
virtual Set_pa tecplot::toolbox::Set::getRef | ( | ) | const [virtual] |
virtual SetIndex_t tecplot::toolbox::Set::get | ( | SetIndex_t | position | ) | const [virtual] |
Get the member at the specified position in the set.
position | The position in the set. position must be >= 1. |
virtual SetIndex_t tecplot::toolbox::Set::size | ( | ) | const [virtual] |
Get the number of members in the set.
virtual SetIndex_t tecplot::toolbox::Set::getNext | ( | SetIndex_t | member | ) | const [virtual] |
Get the next member in the set.
member | The member after which to return the next member. Use TECUTILSETNOTMEMBER to get the first member of the set. |
virtual SetIndex_t tecplot::toolbox::Set::getPosition | ( | SetIndex_t | member | ) | const [virtual] |
Get the position of the member within the set.
member | The member for which to get the position. |
Calculate the intersection of two sets.
OutOfMemoryException | OutOfMemoryException is thrown if the resulting Set could not be created. |
virtual bool tecplot::toolbox::Set::isEmpty | ( | ) | const [virtual] |
Query if the set has any members.
true
if the set has no members, false
if the set contains members virtual bool tecplot::toolbox::Set::isEqual | ( | const Set & | other | ) | const [virtual] |
Query if the set contains the same member as the specified set.
other | The other set to compare with. |
true
if the set contains exactly the same members as the specified set. false
otherwise. virtual bool tecplot::toolbox::Set::isMember | ( | SetIndex_t | member | ) | const [virtual] |
Query if a member is a part of the set.
member | The member to look for in the set. member must be >= 1 |
true
if the member is contained in the set. false
otherwise. virtual bool tecplot::toolbox::Set::isValidMember | ( | SetIndex_t | member | ) | const [inline, virtual] |
Determine if a member number is valid.
true
if the member number is valid, false
otherwise. virtual bool tecplot::toolbox::Set::isValidPosition | ( | SetIndex_t | position | ) | const [inline, virtual] |
Determine if a position index is valid.
true
if the position index is valid, false
otherwise