C and C++ Binaries

Point Set: cs_pdg_vertex_set.h

Defines a set of cs_pdg_vertex_set operations for CodeSonar.



Links


Defines

#define CS_PDG_VERTEX_SET_H
#define CS_PDG_VERTEX_SET_NULL (cs_pdg_vertex_set_get_null()) The null cs_pdg_vertex_set.
#define CS_PDG_VERTEX_SET_INL_H

Types

typedef cs_pdg_vertex_set_iter
Definition typedef struct cs_pdg_vertex_set_iter_t * cs_pdg_vertex_set_iter
Notes A structure to handle a cs_pdg_vertex_set traversal.

On Separate Pages

struct cs_pdg_pdgvs
struct cs_uid_pdgvslist
struct cs_uid_pdgvs_pair

Functions

cs_result cs_pdg_vertex_set_create_default ( cs_pdg_vertex_set * out_set )
Create an empty cs_pdg_vertex_set of the default kind.
cs_result cs_pdg_vertex_set_create ( cs_set_kind set_kind, cs_pdg_vertex_set * out_set )
Create an empty cs_pdg_vertex_set of a given cs_set_kind.
cs_result cs_pdg_vertex_set_copy ( cs_const_pdg_vertex_set pdg_vertex_set, cs_pdg_vertex_set * out_set )
Create a copy of a cs_pdg_vertex_set.
cs_result cs_pdg_vertex_set_put ( cs_pdg_vertex_set pdg_vertex_set, cs_pdg_vertex pdg_vertex )
cs_result cs_pdg_vertex_set_delete ( cs_pdg_vertex_set pdg_vertex_set, cs_pdg_vertex pdg_vertex )
cs_boolean cs_pdg_vertex_set_member ( cs_const_pdg_vertex_set pdg_vertex_set, cs_pdg_vertex pdg_vertex )
Check whether a cs_pdg_vertex is an element of a cs_pdg_vertex_set.
cs_set_kind cs_pdg_vertex_set_kind ( cs_const_pdg_vertex_set pdg_vertex_set )
Determine the cs_set_kind of a cs_pdg_vertex_set.
cs_boolean cs_pdg_vertex_set_empty ( cs_const_pdg_vertex_set pdg_vertex_set )
Determine whether a cs_pdg_vertex_set contains any elements.
cs_size_t cs_pdg_vertex_set_cardinality ( cs_const_pdg_vertex_set pdg_vertex_set )
Return the number of elements in a cs_pdg_vertex_set.
cs_boolean cs_pdg_vertex_set_equal ( cs_const_pdg_vertex_set pdg_vertex_set1, cs_const_pdg_vertex_set pdg_vertex_set2 )
Compare two cs_pdg_vertex_set sets for equality.
cs_hash_t cs_pdg_vertex_set_hash ( cs_const_pdg_vertex_set pdg_vertex_set )
Hash function for cs_pdg_vertex_set.
cs_result cs_pdg_vertex_set_union ( cs_const_pdg_vertex_set pdg_vertex_set1, cs_const_pdg_vertex_set pdg_vertex_set2, cs_pdg_vertex_set * out_set )
Union of two cs_pdg_vertex_set sets.
cs_result cs_pdg_vertex_set_union_p ( cs_pdg_vertex_set target, cs_const_pdg_vertex_set source )
Add the elements of a cs_pdg_vertex_set to another.
cs_result cs_pdg_vertex_set_intersect ( cs_const_pdg_vertex_set pdg_vertex_set1, cs_const_pdg_vertex_set pdg_vertex_set2, cs_pdg_vertex_set * out_set )
Intersection of two cs_pdg_vertex_set sets.
cs_boolean cs_pdg_vertex_set_intersects ( cs_const_pdg_vertex_set pdg_vertex_set1, cs_const_pdg_vertex_set pdg_vertex_set2 )
Check whether two cs_pdg_vertex_set sets have a non-empty intersection.
cs_result cs_pdg_vertex_set_incr ( cs_pdg_vertex_set pdg_vertex_set )
Increment the reference count of a cs_pdg_vertex_set.
cs_result cs_pdg_vertex_set_close ( cs_pdg_vertex_set pdg_vertex_set )
cs_result cs_pdg_vertex_set_iter_first ( cs_const_pdg_vertex_set pdg_vertex_set, cs_pdg_vertex * pdg_vertex, cs_pdg_vertex_set_iter * pdg_vertex_set_iter )
Retrieve the first cs_pdg_vertex from a cs_pdg_vertex_set and open a cs_pdg_vertex_set_iter for the rest of the set.
cs_result cs_pdg_vertex_set_iter_next ( cs_pdg_vertex * pdg_vertex, cs_pdg_vertex_set_iter * pdg_vertex_set_iter )
Retrieve the next cs_pdg_vertex from a cs_pdg_vertex_set_iter.
cs_result cs_pdg_vertex_set_iter_close ( cs_pdg_vertex_set_iter * pdg_vertex_set_iter )
Close a cs_pdg_vertex_set_iter iterator.
cs_result cs_pdg_vertex_set_to_list ( cs_const_pdg_vertex_set pdg_vertex_set, cs_pdg_vertex pdg_vertices[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a (arbitrarily ordered) list of cs_pdg_vertex elements of a cs_pdg_vertex_set.
cs_result cs_list_to_pdg_vertex_set ( cs_pdg_vertex inlist[], cs_size_t cardinality, cs_pdg_vertex_set * out_set )
Retrieve a cs_pdg_vertex_set containing all of the cs_pdg_vertex elements in a list.
cs_result cs_pdg_vertex_set_to_int_pair_set_in_sfid ( cs_sfid container, cs_const_pdg_vertex_set pdg_vertex_set, cs_int_pair_set * out_set )
Retrieve a cs_int_pair_set of the character positions in a specified source file instance of all cs_pdg_vertex elements in a cs_pdg_vertex_set.
cs_result cs_pdg_vertex_set_subtract ( cs_const_pdg_vertex_set minuend, cs_const_pdg_vertex_set subtrahend, cs_pdg_vertex_set * out_set )
Subtract one cs_pdg_vertex_set from another.
cs_result cs_pdg_vertex_set_intersect_size ( cs_const_pdg_vertex_set pdg_vertex_set1, cs_const_pdg_vertex_set pdg_vertex_set2, cs_size_t * out_set )
Find the number of elements in the intersection of two cs_pdg_vertex_set sets.
cs_result cs_pdg_vertex_set_categorize ( cs_const_pdg_vertex_set pdg_vertex_set, cs_uid_pdgvslist categories[], cs_size_t capacity_bytes, cs_size_t * bytes_needed, cs_size_t * result_cardinality )
Categorize the cs_pdg_vertex elements of a cs_pdg_vertex_set by the compilation unit and cs_pdg in which they are found.
cs_result cs_pdg_vertex_set_categorize_by_file ( cs_const_pdg_vertex_set pdg_vertex_set, cs_uid_pdgvs_pair categories[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Categorize the points (cs_pdg_vertex) of a cs_pdg_vertex_set by the compilation unit in which they are found.
cs_result cs_pdg_vertex_set_multi_union ( cs_const_pdg_vertex_set inlist[], cs_size_t list_cardinality, cs_pdg_vertex_set * out_set )
Union of a list of cs_pdg_vertex_set.
cs_result cs_pdg_vertex_set_intersects_pdg ( cs_const_pdg_vertex_set pdg_vertex_set, cs_pdg pdg, cs_boolean * out_b )
Check whether a cs_pdg_vertex_set contains any vertices from a given cs_pdg.
cs_result cs_pdg_vertex_set_pdgs ( cs_const_pdg_vertex_set pdg_vertex_set, cs_pdg pdgs[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a list of the procedures (cs_pdg) that contain one or more points (cs_pdg_vertex) from a given cs_pdg_vertex_set.
cs_result cs_pdg_vertex_set_sort ( cs_const_pdg_vertex_set pdg_vertex_set, cs_const_file_path file_name, cs_pdg_vertex pdg_vertices[], cs_size_t capacity_bytes, cs_size_t * bytes_needed )
Retrieve a sorted list of cs_pdg_vertex elements of a cs_pdg_vertex_set.
cs_size_t cs_pdg_vertex_set_get_outstanding_references ( )
Get the number of cs_pdg_vertex_set objects allocated by the C API.
cs_boolean cs_pdg_vertex_set_same_instance ( cs_const_pdg_vertex_set pdg_vertex_set1, cs_const_pdg_vertex_set pdg_vertex_set2 )
Determine whether two cs_pdg_vertex_set sets are in fact the same object.
cs_boolean cs_pdg_vertex_set_is_null ( cs_const_pdg_vertex_set pdg_vertex_set )
Determine whether a cs_pdg_vertex_set is null.
cs_const_pdg_vertex_set cs_pdg_vertex_set_get_null ( )
Return a null cs_pdg_vertex_set.

Function Descriptions

Function cs_pdg_vertex_set_create_default
cs_result cs_pdg_vertex_set_create_default (
Create an empty cs_pdg_vertex_set of the default kind.
Parameters
out_set [out] An empty cs_pdg_vertex_set of the default kind.
Returns CS_SUCCESS on success.
Notes Create an empty cs_pdg_vertex_set of the default kind. It is the responsibility of the user to close the returned set after use: use cs_pdg_vertex_set_close().
Function cs_pdg_vertex_set_create
cs_result cs_pdg_vertex_set_create (
Create an empty cs_pdg_vertex_set of a given cs_set_kind.
Parameters
set_kind [in] The cs_set_kind of the new cs_pdg_vertex_set.
out_set [out] An empty cs_pdg_vertex_set with kind set_kind.
Returns A cs_result:
Notes It is the responsibility of the user to close the returned set after use: use cs_pdg_vertex_set_close().
Function cs_pdg_vertex_set_copy
cs_result cs_pdg_vertex_set_copy (
Create a copy of a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The source set
out_set [out] The newly created, mutable cs_pdg_vertex_set.
Returns CS_SUCCESS unless an internal error occurs.
Notes The new set must be closed with cs_pdg_vertex_set_close(). The cs_set_kind of the new set is the same as the old one.
Function cs_pdg_vertex_set_put
cs_result cs_pdg_vertex_set_put (
Insert a cs_pdg_vertex into a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set into which pdg_vertex will be inserted.
pdg_vertex [in] The cs_pdg_vertex to insert.
Returns A cs_result:
Function cs_pdg_vertex_set_delete
cs_result cs_pdg_vertex_set_delete (
Delete a cs_pdg_vertex from a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set from which pdg_vertex will be deleted.
pdg_vertex [in] The cs_pdg_vertex to delete.
Returns A cs_result:
Function cs_pdg_vertex_set_member
cs_boolean cs_pdg_vertex_set_member (
Check whether a cs_pdg_vertex is an element of a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to check.
pdg_vertex [in] The cs_pdg_vertex to check for.
Returns cs_true if pdg_vertex is a member of pdg_vertex_set; cs_false otherwise.
Function cs_pdg_vertex_set_kind
cs_set_kind cs_pdg_vertex_set_kind (
Determine the cs_set_kind of a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set for which to find the cs_set_kind.
Returns The kind of pdg_vertex_set.
Function cs_pdg_vertex_set_empty
cs_boolean cs_pdg_vertex_set_empty (
Determine whether a cs_pdg_vertex_set contains any elements.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to check.
Returns cs_true if pdg_vertex_set is empty; cs_false if not.
Function cs_pdg_vertex_set_cardinality
cs_size_t cs_pdg_vertex_set_cardinality (
Return the number of elements in a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set for which to obtain the cardinality.
Returns The size of the pdg_vertex_set.
Function cs_pdg_vertex_set_equal
cs_boolean cs_pdg_vertex_set_equal (
Compare two cs_pdg_vertex_set sets for equality.
Parameters
pdg_vertex_set1 [in] First argument to equality check.
pdg_vertex_set2 [in] Second argument to equality check.
Returns cs_true if pdg_vertex_set1 and pdg_vertex_set2 are equal; cs_false if not.
Function cs_pdg_vertex_set_hash
cs_hash_t cs_pdg_vertex_set_hash (
Hash function for cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] A set to hash.
Returns A hash of pdg_vertex_set. Two sets with the same contents will have the same hash.
Function cs_pdg_vertex_set_union
cs_result cs_pdg_vertex_set_union (
Union of two cs_pdg_vertex_set sets.
Parameters
pdg_vertex_set1 [in] First argument to union.
pdg_vertex_set2 [in] Second argument to union.
out_set [out] A new cs_pdg_vertex_set containing the union of pdg_vertex_set1 and pdg_vertex_set2. The user is reponsible for closing this set: use cs_pdg_vertex_set_close().
Returns CS_SUCCESS on success.
Function cs_pdg_vertex_set_union_p
cs_result cs_pdg_vertex_set_union_p (
Add the elements of a cs_pdg_vertex_set to another.
Parameters
target [in] The cs_pdg_vertex set to which the elements of source will be added.
source [in] The cs_pdg_vertex set whose elements are added to target.
Returns A cs_result:
Function cs_pdg_vertex_set_intersect
cs_result cs_pdg_vertex_set_intersect (
Intersection of two cs_pdg_vertex_set sets.
Parameters
pdg_vertex_set1 [in] First argument to intersection.
pdg_vertex_set2 [in] Second argument to intersection.
out_set [out] A new cs_pdg_vertex_set containing the intersection of pdg_vertex_set1 and pdg_vertex_set2. The user is reponsible for closing this set: use cs_pdg_vertex_set_close().
Returns CS_SUCCESS on success.
Function cs_pdg_vertex_set_intersects
cs_boolean cs_pdg_vertex_set_intersects (
Check whether two cs_pdg_vertex_set sets have a non-empty intersection.
Parameters
pdg_vertex_set1 [in] First argument to intersection check.
pdg_vertex_set2 [in] Second argument to intersection check.
Returns cs_true if pdg_vertex_set1 and pdg_vertex_set2 have a non-empty intersection, cs_false otherwise.
Function cs_pdg_vertex_set_incr
cs_result cs_pdg_vertex_set_incr (
Increment the reference count of a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set subject to increment.
Returns A cs_result:
Notes Increment function for cs_pdg_vertex_set: increment the reference count for pdg_vertex_set.
Function cs_pdg_vertex_set_close
cs_result cs_pdg_vertex_set_close (
Close a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to close.
Returns A cs_result:
Notes Decrements the reference count for pdg_vertex_set. If this brings the reference count to 0 (zero), frees the set.
Function cs_pdg_vertex_set_iter_first
cs_result cs_pdg_vertex_set_iter_first (
Retrieve the first cs_pdg_vertex from a cs_pdg_vertex_set and open a cs_pdg_vertex_set_iter for the rest of the set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set from which to obtain the first cs_pdg_vertex.
pdg_vertex [out] The first cs_pdg_vertex in pdg_vertex_set.
pdg_vertex_set_iter [out] An iterator for pdg_vertex_set.
Returns A cs_result:
Notes Retrieve the first cs_pdg_vertex from a cs_pdg_vertex_set and open a cs_pdg_vertex_set_iter for the rest of the set. This function opens pdg_vertex_set_iter, which is required by cs_pdg_vertex_set_iter_next(). Use cs_pdg_vertex_set_iter_close() to close pdg_vertex_set_iter.
Function cs_pdg_vertex_set_iter_next
cs_result cs_pdg_vertex_set_iter_next (
Retrieve the next cs_pdg_vertex from a cs_pdg_vertex_set_iter.
Parameters
pdg_vertex [out] The next cs_pdg_vertex.
pdg_vertex_set_iter [inout] The iterator from which to retrieve pdg_vertex.
Returns A cs_result:
Function cs_pdg_vertex_set_iter_close
cs_result cs_pdg_vertex_set_iter_close (
Close a cs_pdg_vertex_set_iter iterator.
Parameters
pdg_vertex_set_iter [out] The cs_pdg_vertex_set_iter to close.
Returns CS_SUCCESS on success.
Function cs_pdg_vertex_set_to_list
cs_result cs_pdg_vertex_set_to_list (
Retrieve a (arbitrarily ordered) list of cs_pdg_vertex elements of a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to be converted to a list.
pdg_vertices [out] A user-allocated array to be populated with the cs_pdg_vertex elements from pdg_vertex_set.
capacity_bytes [in] The capacity of pdg_vertices, measured in bytes.
bytes_needed [out] The number of bytes required to store the entire list of cs_pdg_vertex elements of pdg_vertex_set. Note that the cardinality of pdg_vertices can be computed by dividing this number by the size of a cs_pdg_vertex.
Returns A cs_result:
Notes Write a (arbitrarily ordered) list of cs_pdg_vertex elements of a cs_pdg_vertex_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 pdg_vertices NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire list.

Function cs_list_to_pdg_vertex_set
cs_result cs_list_to_pdg_vertex_set (
Retrieve a cs_pdg_vertex_set containing all of the cs_pdg_vertex elements in a list.
Parameters
inlist [in] A list of cs_pdg_vertex.
cardinality [in] The number of elements in inlist.
out_set [out] A new cs_pdg_vertex_set composed of the elements from inlist. The user is responsible for closing this set: use cs_pdg_vertex_set_close().
Returns CS_SUCCESS on success.
Time-Complexity Average O(nlog(n)), where n is the length of inlist.
Notes Retrieve a cs_pdg_vertex_set containing all of the cs_pdg_vertex elements in a list. The list must contain only cs_pdg_vertex items, and may contain duplicates.
Function cs_pdg_vertex_set_to_int_pair_set_in_sfid
cs_result cs_pdg_vertex_set_to_int_pair_set_in_sfid (
Retrieve a cs_int_pair_set of the character positions in a specified source file instance of all cs_pdg_vertex elements in a cs_pdg_vertex_set.
Parameters
container [in] The cs_sfid of the source file instance in which character positions are to be obtained.
pdg_vertex_set [in] The cs_pdg_vertex_set whose elements' character positions are to be found.
out_set [out] A new cs_int_pair_set representing the character positions of the cs_pdg_vertex elements from pdg_vertex_set in the compilation unit specified by container. The user is responsible for closing this set: use cs_int_pair_set_close().
Returns A cs_result:
Function cs_pdg_vertex_set_subtract
cs_result cs_pdg_vertex_set_subtract (
Subtract one cs_pdg_vertex_set from another.
Parameters
minuend [in] The cs_pdg_vertex_set subject to subtraction.
subtrahend [in] The cs_pdg_vertex_set being subtracted
out_set [out] The cs_pdg_vertex_set resulting from subtracting subtrahend from minuend. The user is responsible for closing this set: use cs_pdg_vertex_set_close().
Returns CS_SUCCESS on success.
Function cs_pdg_vertex_set_intersect_size
cs_result cs_pdg_vertex_set_intersect_size (
Find the number of elements in the intersection of two cs_pdg_vertex_set sets.
Parameters
pdg_vertex_set1 [in] First argument to intersection.
pdg_vertex_set2 [in] Second argument to intersection.
out_set [out] The number of elements in the intersection of pdg_vertex_set1 and pdg_vertex_set2.
Returns CS_SUCCESS on success.
Function cs_pdg_vertex_set_categorize
cs_result cs_pdg_vertex_set_categorize (
Categorize the cs_pdg_vertex elements of a cs_pdg_vertex_set by the compilation unit and cs_pdg in which they are found.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to categorize.
categories [out] A user-allocated array to be populated with cs_uid_pdgvslist elements, each representing a compilation unit and a list of cs_pdg_pdgvs (which in turn each represent a cs_pdg and the set of vertices that are found in that cs_pdg).
capacity_bytes [in] The capacity of categories, measured in bytes.
bytes_needed [out] The number of bytes required to store the entire list of categories.
result_cardinality [out] The number of categories that were created.
Returns A cs_result:
Time-Complexity O(n), where n is the cardinality of pdg_vertex_set.
Notes Categorize the cs_pdg_vertex elements of a cs_pdg_vertex_set by the compilation unit and cs_pdg in which they are found. It is the responsibility of the user to close the set in the pdg_vertex_set field of each cs_pdg_pdgvs struct: use cs_pdg_vertex_set_close().

Call this function with categories NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire category mapping.

Function cs_pdg_vertex_set_categorize_by_file
cs_result cs_pdg_vertex_set_categorize_by_file (
Categorize the points (cs_pdg_vertex) of a cs_pdg_vertex_set by the compilation unit in which they are found.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to categorize.
categories [out] A user-allocated array to be populated with cs_uid_pdgvs_pair elements, each representing a compilation unit and the set of vertices in pdg_vertex_set that are found in that compilation unit.
capacity_bytes [in] The capacity of categories, measured in bytes.
bytes_needed [out] The number of bytes required to store the entire list of categories.
Returns A cs_result:
Time-Complexity O(n), where n is the cardinality of pdg_vertex_set.
Notes Categorize the cs_pdg_vertex elements of a cs_pdg_vertex_set by the compilation unit in which they are found. It is the responsibility of the user to close the set in the pdg_vertex_set field of each cs_pdg_pdgvs struct: use cs_pdg_vertex_set_close().

Call this function with categories NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire category mapping.

Function cs_pdg_vertex_set_multi_union
cs_result cs_pdg_vertex_set_multi_union (
Union of a list of cs_pdg_vertex_set.
Parameters
inlist [in] The list of cs_pdg_vertex_set objects to union.
list_cardinality [in] The number of cs_pdg_vertex_set objects in inlist.
out_set [out] A new cs_pdg_vertex_set containing the union of every cs_pdg_vertex_set in inlist. The user is responsible for closing this set: use cs_pdg_vertex_set_close().
Returns CS_SUCCESS on success.
Function cs_pdg_vertex_set_intersects_pdg
cs_result cs_pdg_vertex_set_intersects_pdg (
Check whether a cs_pdg_vertex_set contains any vertices from a given cs_pdg.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set.
pdg [in] The cs_pdg.
out_b [out] cs_true if any cs_pdg_vertex in pdg_vertex_set is found in pdg; cs_false otherwise.
Returns A cs_result:
Function cs_pdg_vertex_set_pdgs
cs_result cs_pdg_vertex_set_pdgs (
Retrieve a list of the procedures (cs_pdg) that contain one or more points (cs_pdg_vertex) from a given cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set.
pdgs [out] A user-allocated list to be populated with the procedures (cs_pdg) that contain one or more vertices from pdg_vertex_set.
capacity_bytes [in] The capacity of pdgs, measured in bytes.
bytes_needed [out] The number of bytes required to store the entire list of cs_pdg that contain one or more vertices from pdg_vertex_set. Note that the cardinality of the cardinality of this list can be computed by dividing this number by the size of a cs_pdg.
Returns A cs_result:
Notes Write a list of the procedures (cs_pdg) that contain one or more points (cs_pdg_vertex) from a given cs_pdg_vertex_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 pdgs NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire list.

Function cs_pdg_vertex_set_sort
cs_result cs_pdg_vertex_set_sort (
Retrieve a sorted list of cs_pdg_vertex elements of a cs_pdg_vertex_set.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to be converted to a sorted list.
file_name [in] The name of a file. Points (cs_pdg_vertex) occuring in this file appear first in the sorted list. If file_name is an empty string, then so such provenance preference exists.
pdg_vertices [out] A user-allocated array to be populated with the sorted cs_pdg_vertex elements of pdg_vertex_set.
capacity_bytes [in] The capacity of pdg_vertices, measured in bytes.
bytes_needed [out] The number of bytes required to store the entire list of cs_pdg_vertex elements of pdg_vertex_set. Note that the cardinality of pdg_vertex_set can be computed by dividing this number by the size of a cs_pdg_vertex.
Returns A cs_result:
Notes Write a sorted list of cs_pdg_vertex elements of a cs_pdg_vertex_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. The list is sorted as follows:
  • If file_name is the empty string, then the vertices are sorted first by the alphabetical order of the file in which they occur, secondly by the position of the text they represent in the source file, and thirdly by the vertex kind.
  • If file_name is defined, then vertices that occur in that file appear first.

Call this function with pdg_vertices NULL and capacity_bytes 0 (zero) to determine the memory needed to hold the entire list.

Function cs_pdg_vertex_set_get_outstanding_references
cs_size_t cs_pdg_vertex_set_get_outstanding_references ( )
Get the number of cs_pdg_vertex_set objects allocated by the C API.
Returns The number of cs_pdg_vertex_set objects allocated by the C API.
Time-Complexity O(1)
Function cs_pdg_vertex_set_same_instance
cs_boolean cs_pdg_vertex_set_same_instance (
Determine whether two cs_pdg_vertex_set sets are in fact the same object.
Parameters
pdg_vertex_set1 [in] First argument to same-object check.
pdg_vertex_set2 [in] Second argument to same-object check.
Returns cs_true if pdg_vertex_set1 and pdg_vertex_set2 are the same object; cs_false if not.
Notes cs_pdg_vertex_set_same_instance( a, b ) implies cs_pdg_vertex_set_equal( a, b )
Function cs_pdg_vertex_set_is_null
cs_boolean cs_pdg_vertex_set_is_null (
Determine whether a cs_pdg_vertex_set is null.
Parameters
pdg_vertex_set [in] The cs_pdg_vertex_set to check for nullity.
Returns cs_true if pdg_vertex_set is null; cs_false otherwise.
Function cs_pdg_vertex_set_get_null
cs_const_pdg_vertex_set cs_pdg_vertex_set_get_null ( )
Return a null cs_pdg_vertex_set.
Returns A null cs_pdg_vertex_set.