Functions | |
Set_pa | TecUtilSetAlloc (Boolean_t ShowErr) |
Allocate a new empty set. | |
void | TecUtilSetDealloc (Set_pa *Set) |
Free all memory associated with the specified set and assign the set to be NULL. | |
Boolean_t | TecUtilSetCopy (Set_pa DstSet, Set_pa SrcSet, Boolean_t ShowErr) |
Copy one set to another. | |
void | TecUtilSetClear (Set_pa Set) |
Empties the specified set. | |
Boolean_t | TecUtilSetAddMember (Set_pa Set, SetIndex_t Member, Boolean_t ShowErr) |
Add the specified member to the specified set. | |
void | TecUtilSetRemoveMember (Set_pa Set, SetIndex_t Member) |
Remove a member from a set. | |
Boolean_t | TecUtilSetIsMember (Set_pa Set, SetIndex_t Member) |
Determine if the specified member is in the specified set. | |
Boolean_t | TecUtilSetIsEmpty (Set_pa Set) |
Determine if the specified set is NULL or contains no members. | |
SetIndex_t | TecUtilSetGetMemberCount (Set_pa Set) |
Get the count of the number of members in a set. | |
Boolean_t | TecUtilSetIsEqual (Set_pa Set1, Set_pa Set2) |
Determines if the specified sets are equal (have the same members). | |
SetIndex_t | TecUtilSetGetMember (Set_pa Set, SetIndex_t Position) |
| |
SetIndex_t | TecUtilSetGetPosition (Set_pa Set, SetIndex_t Member) |
| |
SetIndex_t | TecUtilSetGetNextMember (Set_pa Set, SetIndex_t Member) |
Get the next member in the specified set which is located after the specified member. | |
SetIndex_t | TecUtilSetGetPrevMember (Set_pa Set, SetIndex_t Member) |
Get the previous member in the specified set which is located before the specified member. |
Boolean_t TecUtilSetAddMember | ( | Set_pa | Set, | |
SetIndex_t | Member, | |||
Boolean_t | ShowErr | |||
) |
Add the specified member to the specified set.
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set to which to add the specified member. | |
Member | The item to add to the specified set. Members start at one. | |
ShowErr | TRUE to display an error message if the function's return value is FALSE; FALSE to display no error message |
INTEGER*4 FUNCTION TecUtilSetAddMember( & SetPtr, & Member, & ShowErr) POINTER (SetPtr, Set) INTEGER*4 Member INTEGER*4 ShowErr
Python Syntax:
This function is not supported in Python.
Create a set called ZonesToDelete and add zones 2 and 4 to it:
Set_pa ZonesToDelete = TecUtilSetAlloc(TRUE); TecUtilSetAddMember(ZonesToDelete, 2, TRUE); TecUtilSetAddMember(ZonesToDelete, 4, TRUE);
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
ShowErr | TRUE to display an error message if the function's return value is FALSE; FALSE to display no error message |
SUBROUTINE TecUtilSetAlloc( & ShowErr, & ResultPtr) INTEGER*4 ShowErr POINTER (ResultPtr, Result)
Python Syntax:
This function is not supported in Python.
Create two sets, A and B:
Set_pa A, B; A = TecUtilSetAlloc(TRUE); B = TecUtilSetAlloc(TRUE);
void TecUtilSetClear | ( | Set_pa | Set | ) |
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set to empty |
SUBROUTINE TecUtilSetClear(SetPtr) POINTER (SetPtr, Set)
Python Syntax:
This function is not supported in Python.
Get the set of active zones, then clear the set so it can be used again:
Set_pa Zones = NULL; TecUtilZoneGetActive(&Zones); . . // Use the set of active zones . TecUtilSetClear(Zones); . . // Use the set for something else
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
DstSet | The destination set, which must already be allocated with TecUtilSetAlloc(). | |
SrcSet | The source set | |
ShowErr | Set to TRUE to display an error message if an error occurs during the call |
SrcSet Pointer must be a valid address and non-NULL.
INTEGER*4 FUNCTION TecUtilSetCopy( & DstSetPtr, & SrcSetPtr, & ShowErr) POINTER (DstSetPtr, DstSet) POINTER (SrcSetPtr, SrcSet) INTEGER*4 ShowErr
Python Syntax:
This function is not supported in Python.
Make a copy of the set of active Line-maps:
Set_pa MySet, LineMaps = NULL; MySet = TecUtilSetAlloc(TRUE); TecUtilLineMapGetActive(&LineMaps); TecUtilSetCopy(MySet, LineMaps, TRUE); . . . TecUtilSetDealloc(&MySet); TecUtilSetDealloc(&LineMaps);
void TecUtilSetDealloc | ( | Set_pa * | Set | ) |
Free all memory associated with the specified set and assign the set to be NULL.
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set to deallocate. |
Set Pointer must be a valid address or NULL.
SUBROUTINE TecUtilSetDealloc(SetPtr) POINTER (SetPtr, Set)
Python Syntax:
This function is not supported in Python.
SetIndex_t TecUtilSetGetMember | ( | Set_pa | Set, | |
SetIndex_t | Position | |||
) |
Get the member of the specified set at the specified position. See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set from which to get the member. | |
Position | The position in the set. |
INTEGER*4 FUNCTION TecUtilSetGetMember( & SetPtr, & Position) POINTER (SetPtr, Set) INTEGER*4 Position
Python Syntax:
This function is not supported in Python.
Get each member from the set MySet:
Set_pa MySet; . . SetIndex_t Member; SetIndex_t Count; SetIndex_t Position; Count = TecUtilSetGetMemberCount(MySet); for (Position = 1; Position <= Count; Position++) { Member = TecUtilSetGetMember(MySet, Position); . . }
SetIndex_t TecUtilSetGetMemberCount | ( | Set_pa | Set | ) |
Get the count of the number of members in a set.
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set for which to get the count |
INTEGER*4 FUNCTION TecUtilSetGetMemberCount(SetPtr) POINTER (SetPtr, Set)
Python Syntax:
This function is not supported in Python.
SetIndex_t TecUtilSetGetNextMember | ( | Set_pa | Set, | |
SetIndex_t | Member | |||
) |
Get the next member in the specified set which is located after the specified member.
See Chapter 20, "Using Sets," in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set from which to get the member | |
Member | The member after which to return the next member. Members start at one. Use TECUTILSETNOTMEMBER to get the first member of the set |
INTEGER*4 FUNCTION TecUtilSetGetNextMember( & SetPtr, & Member) POINTER (SetPtr, Set) INTEGER*4 Member
Python Syntax:
This function is not supported in Python.
Loop through all members of the set MySet:
Set_pa MySet; . . SetIndex_t Member = TecUtilSetGetNextMember(MySet, TECUTILSETNOTMEMBER); while (Member != TECUTILSETNOTMEMBER) { . . Member = TecUtilSetGetNextMember(MySet, Member); }
SetIndex_t TecUtilSetGetPosition | ( | Set_pa | Set, | |
SetIndex_t | Member | |||
) |
Get the position in the specified set at which the specified member is located. See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set from which to get the member | |
Member | The member after which to get the position. Members start at one. |
INTEGER*4 FUNCTION TecUtilSetGetPosition( & SetPtr, & Member) POINTER (SetPtr, Set) INTEGER*4 Member
Python Syntax:
This function is not supported in Python.
Get the position of the member MyMember of the set MySet:
Set_pa MySet; SetIndex_t Member; . . SetIndex_t Position = TecUtilSetGetPosition(MySet, MyMember);
SetIndex_t TecUtilSetGetPrevMember | ( | Set_pa | Set, | |
SetIndex_t | Member | |||
) |
Get the previous member in the specified set which is located before the specified member.
See Chapter 20, "Using Sets," in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set from which to get the member | |
Member | The member before which to return the previous member. Members start at one. Use TECUTILSETNOTMEMBER to get the last member of the set |
INTEGER*4 FUNCTION TecUtilSetGetPrevMember( & SetPtr, & Member) POINTER (SetPtr, Set) INTEGER*4 Member
Python Syntax:
This function is not supported in Python.
Determine if the specified set is NULL or contains no members.
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set to check for members |
INTEGER*4 FUNCTION TecUtilSetIsEmpty(SetPtr) POINTER (SetPtr, Set)
Python Syntax:
This function is not supported in Python.
Determine if the set MySet is empty or contains no members:
Set_pa MySet; if (TecUtilSetIsEmpty(MySet)) { .... take action based on the set being empty. }
Determines if the specified sets are equal (have the same members).
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set1 | The set to compare with Set2. | |
Set2 | The set to compare with Set1 |
Set2 Pointer must be a valid address and non-NULL.
INTEGER*4 FUNCTION TecUtilSetIsEqual( & Set1Ptr, & Set2Ptr) POINTER (Set1Ptr, Set1) POINTER (Set2Ptr, Set2)
Python Syntax:
This function is not supported in Python.
Determine if all enabled zones are active:
Boolean_t AllEnabledZonesAreActive; Set_pa ActiveZones = NULL; Set_pa EnabledZones = NULL; TecUtilZoneGetActive(&ActiveZones); TecUtilZoneGetEnabled(&EnabledZones); AllEnabledZonesAreActive = TecUtilSetIsEqual(ActiveZones, EnabledZones);
Boolean_t TecUtilSetIsMember | ( | Set_pa | Set, | |
SetIndex_t | Member | |||
) |
Determine if the specified member is in the specified set.
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set to check for the specified member. | |
Member | The item for which to check the specified set. Members start at one |
INTEGER*4 FUNCTION TecUtilSetIsMember( & SetPtr, & Member) POINTER (SetPtr, Set) INTEGER*4 Member
Python Syntax:
This function is not supported in Python.
Determine if the set MySet contains the member MyMember, and if so, remove MyMember from MySet:
Set_pa MySet; SetIndex_t MyMember; . . if (TecUtilSetIsMember(MySet, MyMember)) TecUtilSetRemoveMember(MySet, MyMember);
void TecUtilSetRemoveMember | ( | Set_pa | Set, | |
SetIndex_t | Member | |||
) |
See the chapter "Using Sets" in the ADK User's Manual for a discussion of sets. This function is Thread Safe.
Set | The set from which to remove the specified member. | |
Member | The member to remove from the specified set. Members start at one |
SUBROUTINE TecUtilSetRemoveMember( & SetPtr, & Member) POINTER (SetPtr, Set) INTEGER*4 Member
Python Syntax:
This function is not supported in Python.