C and C++ Binaries

Symbol Set (cs_abs_loc_set) : cs_abs_loc_set.h

Defines a set of cs_abs_loc_set operations for CodeSonar.



Links


Defines

#define CS_ABS_LOC_SET_H
#define CS_ABS_LOC_SET_NULL (cs_abs_loc_set_get_null()) The null cs_abs_loc_set.
#define CS_ABS_LOC_SET_INL_H

Types

typedef cs_abs_loc_set_iter
Definition typedef struct cs_abs_loc_set_iter_t * cs_abs_loc_set_iter
Notes A structure to handle cs_abs_loc_set traversal.

Used by:


Functions

cs_result cs_abs_loc_set_create_default ( cs_abs_loc_set * out_set )
Create an empty cs_abs_loc_set of the default kind.
cs_result cs_abs_loc_set_create ( cs_set_kind set_kind, cs_abs_loc_set * out_set )
Create an empty cs_abs_loc_set with a given cs_set_kind.
cs_result cs_abs_loc_set_incr ( cs_abs_loc_set abs_loc_set )
Increment the reference count of a cs_abs_loc_set.
cs_result cs_abs_loc_set_copy ( cs_const_abs_loc_set abs_loc_set, cs_abs_loc_set * out_set )
Create a copy of a cs_abs_loc_set.
cs_result cs_abs_loc_set_close ( cs_abs_loc_set abs_loc_set )
cs_result cs_abs_loc_set_put ( cs_abs_loc_set abs_loc_set, cs_abs_loc abs_loc )
Insert a cs_abs_loc into a cs_abs_loc_set.
cs_result cs_abs_loc_set_delete ( cs_abs_loc_set abs_loc_set, cs_abs_loc abs_loc )
Delete a cs_abs_loc from a cs_abs_loc_set.
cs_boolean cs_abs_loc_set_member ( cs_const_abs_loc_set abs_loc_set, cs_abs_loc abs_loc )
Check whether a cs_abs_loc is an element of a cs_abs_loc_set.
cs_set_kind cs_abs_loc_set_kind ( cs_const_abs_loc_set abs_loc_set )
Determine the cs_set_kind of a cs_abs_loc_set.
cs_boolean cs_abs_loc_set_empty ( cs_const_abs_loc_set abs_loc_set )
Determine whether a cs_abs_loc_set contains any elements.
cs_size_t cs_abs_loc_set_cardinality ( cs_const_abs_loc_set abs_loc_set )
Return the number of elements in a cs_abs_loc_set.
cs_boolean cs_abs_loc_set_equal ( cs_const_abs_loc_set abs_loc_set1, cs_const_abs_loc_set abs_loc_set2 )
Compare two cs_abs_loc_set sets.
cs_hash_t cs_abs_loc_set_hash ( cs_const_abs_loc_set abs_loc_set )
Hash function for cs_abs_loc_set.
cs_result cs_abs_loc_set_union ( cs_const_abs_loc_set abs_loc_set1, cs_const_abs_loc_set abs_loc_set2, cs_abs_loc_set * out )
Union of two cs_abs_loc_set sets.
cs_result cs_abs_loc_set_union_p ( cs_abs_loc_set target, cs_const_abs_loc_set source )
Add the elements of a cs_abs_loc_set to another.
cs_result cs_abs_loc_set_intersect ( cs_const_abs_loc_set abs_loc_set1, cs_const_abs_loc_set abs_loc_set2, cs_abs_loc_set * out )
Intersection of two cs_abs_loc_set sets.
cs_boolean cs_abs_loc_set_intersects ( cs_const_abs_loc_set abs_loc_set1, cs_const_abs_loc_set abs_loc_set2 )
Check whether two cs_abs_loc_set sets have a non-empty intersection.
cs_result cs_abs_loc_set_iter_first ( cs_const_abs_loc_set abs_loc_set, cs_abs_loc * abs_loc, cs_abs_loc_set_iter * abs_loc_set_iter )
Retrieve the first cs_abs_loc from a cs_abs_loc_set and open a cs_abs_loc_set_iter for the rest of the set.
cs_result cs_abs_loc_set_iter_next ( cs_abs_loc * abs_loc, cs_abs_loc_set_iter * abs_loc_set_iter )
Retrieve the next cs_abs_loc from a cs_abs_loc_set_iter.
cs_result cs_abs_loc_set_iter_close ( cs_abs_loc_set_iter * abs_loc_set_iter )
Close a cs_abs_loc_set_iter iterator.
cs_result cs_abs_loc_set_to_list ( cs_const_abs_loc_set abs_loc_set, cs_abs_loc abs_loc_list[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a (arbitarily ordered) list of cs_abs_loc elements of a cs_abs_loc_set.
cs_result cs_list_to_abs_loc_set ( cs_abs_loc abs_loc_list[], cs_size_t cardinality, cs_abs_loc_set * out_set )
Convert a list of cs_abs_loc elements into a cs_abs_loc_set.
cs_result cs_abs_loc_set_subtract ( cs_const_abs_loc_set minuend, cs_const_abs_loc_set subtrahend, cs_abs_loc_set * out_set )
Find the difference between two cs_abs_loc_set sets.
cs_size_t cs_abs_loc_set_get_outstanding_references ( )
Retrieve the number of cs_abs_loc_set objects allocated by the C API.
cs_boolean cs_abs_loc_set_same_instance ( cs_const_abs_loc_set abs_loc_set1, cs_const_abs_loc_set abs_loc_set2 )
Determine whether two cs_abs_loc_set sets are in fact the same object.
cs_boolean cs_abs_loc_set_is_null ( cs_const_abs_loc_set abs_loc_set )
Determine whether a cs_abs_loc_set is null.
cs_const_abs_loc_set cs_abs_loc_set_get_null ( )
Return a null cs_abs_loc_set.

Function Descriptions

Function cs_abs_loc_set_create_default
cs_result cs_abs_loc_set_create_default (
Create an empty cs_abs_loc_set of the default kind.
Parameters
out_set [out] An empty cs_abs_loc_set of the default kind.
Returns A cs_result:
Notes It is the responsibility of the user to close the returned set after use: use cs_abs_loc_set_close().
Function cs_abs_loc_set_create
cs_result cs_abs_loc_set_create (
Create an empty cs_abs_loc_set with a given cs_set_kind.
Parameters
set_kind [in] The cs_set_kind of the new cs_abs_loc_set.
out_set [out] An empty cs_abs_loc_set with kind set_kind
Returns A cs_result:
Notes Create an empty cs_abs_loc_set with a given cs_set_kind. It is the reponsibility of the user to close this set after use: use cs_abs_loc_set_close().
Function cs_abs_loc_set_incr
cs_result cs_abs_loc_set_incr (
Increment the reference count of a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set subject to increment.
Returns A cs_result:
Notes Increment function for cs_abs_loc_set: increment the reference count for abs_loc_set.
Function cs_abs_loc_set_copy
cs_result cs_abs_loc_set_copy (
Create a copy of a cs_abs_loc_set.
Parameters
abs_loc_set [in] The source cs_abs_loc_set.
out_set [out] A mutable copy of abs_loc_set.
Returns A cs_result:
Notes The new set must be closed with cs_abs_loc_set_close(). The cs_set_kind of the new set is the same as the old one.
Function cs_abs_loc_set_close
cs_result cs_abs_loc_set_close (
Close a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set to close.
Returns A cs_result:
Notes Decrements the reference count for abs_loc_set. If this brings the reference count to 0 (zero), frees the set.
Function cs_abs_loc_set_put
cs_result cs_abs_loc_set_put (
Insert a cs_abs_loc into a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set into which abs_loc will be inserted.
abs_loc [in] The cs_abs_loc to insert.
Returns A cs_result:
Function cs_abs_loc_set_delete
cs_result cs_abs_loc_set_delete (
Delete a cs_abs_loc from a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set from which abs_loc will be deleted.
abs_loc [in] The cs_abs_loc to delete.
Returns A cs_result:
Function cs_abs_loc_set_member
cs_boolean cs_abs_loc_set_member (
Check whether a cs_abs_loc is an element of a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set to check.
abs_loc [in] The cs_abs_loc to check for.
Returns cs_true if abs_loc is an element of abs_loc_set, cs_false otherwise.
Function cs_abs_loc_set_kind
cs_set_kind cs_abs_loc_set_kind (
Determine the cs_set_kind of a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_const_abs_loc_set for which to find the cs_set_kind.
Returns The kind of abs_loc_set, as a cs_set_kind.
Function cs_abs_loc_set_empty
cs_boolean cs_abs_loc_set_empty (
Determine whether a cs_abs_loc_set contains any elements.
Parameters
abs_loc_set [in] The cs_const_abs_loc_set to check.
Returns cs_true if abs_loc_set is empty, cs_false if not.
Function cs_abs_loc_set_cardinality
cs_size_t cs_abs_loc_set_cardinality (
Return the number of elements in a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set for which to obtain the cardinality.
Returns The size of abs_loc_set.
Function cs_abs_loc_set_equal
cs_boolean cs_abs_loc_set_equal (
Compare two cs_abs_loc_set sets.
Parameters
abs_loc_set1 [in] First argument to equality test.
abs_loc_set2 [in] Second argument to equality test.
Returns cs_true if abs_loc_set1 and abs_loc_set2 are equal; cs_false if not.
Function cs_abs_loc_set_hash
cs_hash_t cs_abs_loc_set_hash (
Hash function for cs_abs_loc_set.
Parameters
abs_loc_set [in] A cs_abs_loc_set to hash.
Returns A hash of abs_loc_set, as a cs_hash_t. Two sets with the same contents will have the same hash.
Function cs_abs_loc_set_union
cs_result cs_abs_loc_set_union (
Union of two cs_abs_loc_set sets.
Parameters
abs_loc_set1 [in] First argument to union.
abs_loc_set2 [in] Second argument to union.
out [out] A new cs_abs_loc_set containing the union of abs_loc_set1 and abs_loc_set2.
Returns A cs_result:
Notes Union of two cs_abs_loc_set sets. It is the reponsibility of the user to close the union set after use: use cs_abs_loc_set_close().
Function cs_abs_loc_set_union_p
cs_result cs_abs_loc_set_union_p (
Add the elements of a cs_abs_loc_set to another.
Parameters
target [in] The cs_abs_loc set to which the elements of source will be added.
source [in] The cs_abs_loc set whose elements are added to target.
Returns A cs_result:
Function cs_abs_loc_set_intersect
cs_result cs_abs_loc_set_intersect (
Intersection of two cs_abs_loc_set sets.
Parameters
abs_loc_set1 [in] First argument to intersection.
abs_loc_set2 [in] Second argument to intersection.
out [out] A new cs_abs_loc_set containing the intersection of abs_loc_set1 and abs_loc_set2.
Returns A cs_result:
Notes Intersection of two cs_abs_loc_set sets. It is the reponsibility of the user to close the intersection set after use: use cs_abs_loc_set_close().
Function cs_abs_loc_set_intersects
cs_boolean cs_abs_loc_set_intersects (
Check whether two cs_abs_loc_set sets have a non-empty intersection.
Parameters
abs_loc_set1 [in] First argument to intersection check.
abs_loc_set2 [in] Second argument to intersection check.
Returns cs_true if abs_loc_set1 and abs_loc_set2 have a non-empty intersection, cs_false otherwise.
Function cs_abs_loc_set_iter_first
cs_result cs_abs_loc_set_iter_first (
Retrieve the first cs_abs_loc from a cs_abs_loc_set and open a cs_abs_loc_set_iter for the rest of the set.
Parameters
abs_loc_set [in] The cs_abs_loc_set from which to obtain the first cs_abs_loc.
abs_loc [out] The first cs_abs_loc in abs_loc_set.
abs_loc_set_iter [out] An iterator for abs_loc_set.
Returns A cs_result:
Notes Retrieve the first cs_abs_loc from abs_loc_set. This function opens abs_loc_set_iter, which is required by cs_abs_loc_set_iter_next(). Use cs_abs_loc_set_iter_close() to close abs_loc_set_iter.
Function cs_abs_loc_set_iter_next
cs_result cs_abs_loc_set_iter_next (
Retrieve the next cs_abs_loc from a cs_abs_loc_set_iter.
Parameters
abs_loc [out] The next cs_abs_loc.
abs_loc_set_iter [inout] The cs_abs_loc_set iterator from which to retrieve abs_loc.
Returns A cs_result:
Function cs_abs_loc_set_iter_close
cs_result cs_abs_loc_set_iter_close (
Close a cs_abs_loc_set_iter iterator.
Parameters
abs_loc_set_iter [out] The cs_abs_loc_set_iter to close.
Returns CS_SUCCESS on success.
Function cs_abs_loc_set_to_list
cs_result cs_abs_loc_set_to_list (
Retrieve a (arbitarily ordered) list of cs_abs_loc elements of a cs_abs_loc_set.
Parameters
abs_loc_set [in] The cs_abs_loc_set to be converted to a list.
abs_loc_list [out] A user-allocated array to be populated with the cs_abs_loc elements from abs_loc_set.
capacity_bytes [in] The capacity of abs_loc_list, measured in bytes.
bytes_needed [out] The number of bytes required to store the entire list of cs_abs_loc elements in abs_loc_set. Note that the cardinality of abs_loc_set can be computed by dividing this number by the size of a cs_abs_loc.
Returns A cs_result:
Notes Writes a (arbitarily ordered) list of cs_abs_loc elements of a cs_abs_loc_set into a user-allocated array. If the array is not large enough to hold the entire list, the list is truncated to fit into the array.

Call this function with abs_loc_list NULL and capacity_bytes 0 (zero) to determine the memory needed to hold all cs_abs_loc elements of abs_loc_set.

Function cs_list_to_abs_loc_set
cs_result cs_list_to_abs_loc_set (
Convert a list of cs_abs_loc elements into a cs_abs_loc_set.
Parameters
abs_loc_list [in] The cs_abs_loc list to be converted to a cs_abs_loc_set.
cardinality [in] The number of cs_abs_loc elements in abs_loc_list.
out_set [out] A cs_abs_loc_set containing the first cardinality cs_abs_loc elements in abs_loc_list.
Returns A cs_result:
Notes Creates a new cs_abs_loc_set containing the first cardinality elements from abs_loc_list. Any entries at positions higher than cardinality are ignored.
Function cs_abs_loc_set_subtract
cs_result cs_abs_loc_set_subtract (
Find the difference between two cs_abs_loc_set sets.
Parameters
minuend [in] The cs_abs_loc_set subject to subtraction.
subtrahend [in] The cs_abs_loc_set being subtracted.
out_set [out] The cs_abs_loc_set resulting from subtracting subtrahend from minuend.
Returns A cs_result:
Notes It is the reponsibility of the user to close the difference set after use: use cs_abs_loc_set_close().
Function cs_abs_loc_set_get_outstanding_references
cs_size_t cs_abs_loc_set_get_outstanding_references ( )
Retrieve the number of cs_abs_loc_set objects allocated by the C API.
Returns The number of cs_abs_loc_set objects allocated by the C API.
Time-Complexity O(1)
Function cs_abs_loc_set_same_instance
cs_boolean cs_abs_loc_set_same_instance (
Determine whether two cs_abs_loc_set sets are in fact the same object.
Parameters
abs_loc_set1 [in] First argument to same-instance check.
abs_loc_set2 [in] Second argument to same-instance check.
Returns cs_true if abs_loc_set1 and abs_loc_set2 are the same object; cs_false if not.
Notes cs_abs_loc_set_same_instance( a, b ) implies cs_abs_loc_set_equal ( a, b )
Function cs_abs_loc_set_is_null
cs_boolean cs_abs_loc_set_is_null (
Determine whether a cs_abs_loc_set is null.
Parameters
abs_loc_set [in] The cs_abs_loc_set to check for nullity.
Returns cs_true if abs_loc_set is null; cs_false otherwise.
Function cs_abs_loc_set_get_null
cs_const_abs_loc_set cs_abs_loc_set_get_null ( )
Return a null cs_abs_loc_set.
Returns A null cs_abs_loc_set.