CodeSonar C++ API
Public Member Functions | Related Symbols | List of all members
cs::point Class Reference

A single program point. More...

Public Member Functions

point actual_in (size_t _rank) const
 Get the actual-in, having the specified rank, associated with a call site point.
 
point actual_out (size_t _rank) const
 Get the actual-out, having the specified rank, associated with a call site point.
 
point_set actual_to_formals () const
 Get the formal-in points associated with an actual-in point.
 
point_set actuals_in () const
 Get the actual-in and global-actual-in points associated with a call site point.
 
std::vector< pointactuals_in_as_list () const
 Get the actual-in and global-actual-in points associated with a call site point.
 
point_set actuals_out () const
 Get the actual-out and global-actual-out points associated with a call site point.
 
std::vector< pointactuals_out_as_list () const
 Get the actual-out points associated with a call site point.
 
procedure adjusted_callee () const
 Get the callee procedure of a call site point, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.
 
procedure adjusted_callee_no_reroute () const
 Get the callee procedure of a call site point, ignoring any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.
 
point_adjusted_callees_iterator  adjusted_callees () const
 Get an iterator over the callee procedures (procedure) from a point, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.
 
point_adjusted_callees_no_reroute_iterator  adjusted_callees_no_reroute () const
 Get an iterator over the callee procedures (procedure) from a point, ignoring any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.
 
std::string as_repr () const
 Get a representation of a point object that includes information useful for debugging.
 
std::string as_string () const
 Get a string representation of a point containing information useful for debugging.
 
point call_site () const
 Get the call site of a subordinate point.
 
procedure callee () const
 Get the callee procedure associated with a call-site point.
 
cfg_edge_set cfg_inter_targets () const
 Get the inter-procedural successors of a point.
 
cfg_edge_set cfg_targets () const
 Get the intra-procedural successors of a point.
 
std::string characters (size_t limit=SIZE_MAX) const
 Get a string representation of a point.
 
sfileinst_int_pair_set_pair charpos () const
 Get the character positions (in the source code) for a point.
 
int cmp (const point &other) const
 Comparison function for point.
 
csuint64 condition_number () const
 [CodeSonar only] Get the condition number of a point.
 
symbol_vector csonar_enum_killed () const
 Get the list of killed symbols (symbol) for a point, computing the list on-demand.
 
symbol_vector csonar_enum_referenced () const
 Get the list of referenced symbols (symbol) for a point, computing the list on-demand.
 
symbol_vector csonar_enum_used () const
 Get the list of used symbols (symbol) for a point, computing the list on-demand.
 
sfileinst_line_pair file_line () const
 Get the file instance and (smallest offset) line for a point.
 
effective_address get_address () const
 [Binary analyses only] Get the effective address of a point, if it has one.
 
effective_address get_affiliated_address () const
 [Binary analyses only] Get the effective address affiliated with a point, if there is one.
 
ast get_ast (ast_family fam=ast_family::DEFAULT) const
 Get the AST associated with a point.
 
point_kind get_kind () const
 Get a point's kind.
 
procedure get_procedure () const
 Get the procedure containing a point.
 
point_syntax_element get_syntax_element () const
 Get a point's syntax element.
 
point_syntax_kind get_syntax_kind () const
 Get a point's syntax kind.
 
std::string handle () const
 Get a handle for this point.
 
bool has_ast (ast_family fam=ast_family::DEFAULT) const
 Check: does a point have an associated AST (ast) of the specified family (ast_family)?
 
cs_hash_t hash () const
 Get a hash value for a point.
 
csint64 id () const
 Get a point's unique identifier.
 
bool is_implicit_actual_in () const
 Check: is a point an actual-in that is implicitly generated?
 
bool is_inside_macro () const
 Check: is a point entirely contained inside a macro?
 
size_t rank () const
 Get the rank of a point.
 
point solitary_cfg_target () const
 Get the CFG successor of a point that has exactly one successor CFG edge.
 
std::string source_pp () const
 [CodeSonar only] Get a string containing a pretty printed version of an actual-in, expression, call-site, or control-point point.
 
int stable_cmp (const point &other) const
 Compare with another point, with stable results across sufficiently-similar analyses.
 
csuint64 stable_hash () const
 Get a hash value for a point, with stable results across sufficiently-similar analyses.
 

Related Symbols

(Note that these are not member symbols.)

bool operator!= (const point &a, const point &b)
 Inequality operator for point.
 
bool operator< (const point &a, const point &b)
 Less-than operator for point.
 
std::ostream & operator<< (std::ostream &out, const point &a)
 
 
bool operator<= (const point &a, const point &b)
 Less-than-or-equal operator for point.
 
bool operator== (const point &a, const point &b)
 Equality operator for point.
 
bool operator> (const point &a, const point &b)
 Greater-than operator for point.
 
bool operator>= (const point &a, const point &b)
 Greater-than-or-equal operator for point.
 

Detailed Description

A single program point.

The point class corresponds to the PDG_VERTEX abstraction.

Internal representation for points is available for C/C++ and binary analyses only. For C# and Java analyses, plug-ins that rely on point properties and relationships will generally not produce useful information.

Member Function Documentation

◆ actual_in()

point cs::point::actual_in ( size_t  _rank) const
inline

Get the actual-in, having the specified rank, associated with a call site point.

Parameters
[in]_rankThe (1-based) index of the actual-in to retrieve.
Returns
The actual-in of the specified rank.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.
result::ERROR_INVALID_ARGUMENTif _rank is 0.
result::ELEMENT_NOT_PRESENTif there is no actual-in whose rank is _rank.

◆ actual_out()

point cs::point::actual_out ( size_t  _rank) const
inline

Get the actual-out, having the specified rank, associated with a call site point.

Parameters
[in]_rankThe (1-based) index of the actual-out to retrieve.
Returns
The actual-out of the specified rank.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.
result::ERROR_INVALID_ARGUMENTif _rank is 0.
result::ELEMENT_NOT_PRESENTif there is no actual-out whose rank is _rank.

In most languages (including C and C++), only an actual-out of rank 1 can exist. It corresponds to the return value of a function.

◆ actual_to_formals()

point_set cs::point::actual_to_formals ( ) const
inline

Get the formal-in points associated with an actual-in point.

Returns
A point_set containing the formal-ins associated with the point, if the point is an actual-in in a call to a defined function.
Exceptions
result::ERROR_SDG_NOT_PRESENT
result::ERROR_NOT_AN_ACTUAL_INif the point is not an actual-in.
result::ELEMENT_NOT_PRESENTif there is no call site associated with the point.
result::ERROR_NOT_A_CALL_SITEif the call site associated with the point is an indirect call.
result::PDG_IS_UNDEFINEDif the call site associated with the point is an undefined function.

The modeling of GNU extension __builtin_apply leads to the possibility that more than one formal can be associated with a given actual. In this case, the returned point_set will contain several formals.

◆ actuals_in()

point_set cs::point::actuals_in ( ) const
inline

Get the actual-in and global-actual-in points associated with a call site point.

Returns
A point_set containing the actual-in and global-actual-in vertices associated with the point, provided it represents a call site.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.

◆ actuals_in_as_list()

std::vector< point > cs::point::actuals_in_as_list ( ) const
inline

Get the actual-in and global-actual-in points associated with a call site point.

Returns
A list of the actual-ins and global-actual-ins associated with the point.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.

◆ actuals_out()

point_set cs::point::actuals_out ( ) const
inline

Get the actual-out and global-actual-out points associated with a call site point.

Returns
A point_set containing the actual-out and global-actual-out point associated with the point, provided it represents a call site.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.

◆ actuals_out_as_list()

std::vector< point > cs::point::actuals_out_as_list ( ) const
inline

Get the actual-out points associated with a call site point.

Returns
A list of the actual-outs associated with the point, if it represents a call site.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.

◆ adjusted_callee()

procedure cs::point::adjusted_callee ( ) const
inline

Get the callee procedure of a call site point, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

Returns
The point's callee procedure.
Exceptions
result::ERROR_NOT_A_CALL_SITEif the point is not a call site.
result::NO_SUCH_PDGif v is a call site but its callee procedure cannot be determined.
result::ELEMENT_NOT_PRESENTif the point is a call site with more than one callee procedure. No procedure will be returned in this case: to traverse all callees, use the point_adjusted_callees_iterator returned by adjusted_callees().
result::ERROR_INVALID_PHASE_FOR_OPERATIONif called before the beginning of the bottom-up phase.

Redirection resolution is completed in the pointer analysis phase, so this function must be called in the bottom-up phase or later.

A direct call site (that is, a point of kind point_kind::CALL_SITE will always have exactly one callee.

An indirect call site (a kind point_kind::INDIRECT_CALL) can have zero or more callees. This function will only successfully retrieve a callee if the analysis identifies exactly one callee.

Use the point_adjusted_callees_iterator returned by adjusted_callees() to iterate over all callees of a point, taking into account translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

◆ adjusted_callee_no_reroute()

procedure cs::point::adjusted_callee_no_reroute ( ) const
inline

Get the callee procedure of a call site point, ignoring any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

Returns
The point's callee procedure.
Exceptions
result::ERROR_NOT_A_CALL_SITE
result::NO_SUCH_PDG
result::ELEMENT_NOT_PRESENTif the point is a call site with more than one callee procedure. No procedure will be returned in this case: to traverse all callees, use the point_adjusted_callees_no_reroute_iterator returned by adjusted_callees_no_reroute().

A direct call site (that is, a point of kind point_kind::CALL_SITE will always have exactly one callee.

An indirect call site (a kind point_kind::INDIRECT_CALL) can have zero or more callees. This function will only successfully retrieve a callee if the analysis identifies exactly one callee. Indirect call resolution takes place in the pointer analysis phase, so results for indirect call sites will be best if this function is called in the bottom-up phase or later.

Use the point_adjusted_callees_no_reroute_iterator returned by adjusted_callees_no_reroute() to iterate over all callees of a point, ignoring translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

◆ adjusted_callees()

point_adjusted_callees_iterator cs::point::adjusted_callees ( ) const
inline

Get an iterator over the callee procedures (procedure) from a point, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

Returns
The initialized point_adjusted_callees_iterator.

A direct call site (that is, a point of kind point_kind::CALL_SITE) will always have exactly one callee. As an alternative to setting up an iterator, you can use adjusted_callee() to retrieve the callee, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

An indirect call site (point of kind point_kind::INDIRECT_CALL) can have zero or more callees.

◆ adjusted_callees_no_reroute()

point_adjusted_callees_no_reroute_iterator cs::point::adjusted_callees_no_reroute ( ) const
inline

Get an iterator over the callee procedures (procedure) from a point, ignoring any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

Returns
The initialized point_adjusted_callees_no_reroute_iterator.

A direct call site (that is, a point of kind point_kind::CALL_SITE) will always have exactly one callee. As an alternative to setting up an iterator, you can use adjusted_callee_no_reroute() to retrieve the callee, ignoring any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

An indirect call site (point of kind point_kind::INDIRECT_CALL) can have zero or more callees.

◆ as_repr()

std::string cs::point::as_repr ( ) const
inline

Get a representation of a point object that includes information useful for debugging.

Returns
The string representation.

◆ as_string()

std::string cs::point::as_string ( ) const
inline

Get a string representation of a point containing information useful for debugging.

Returns
A string containing the representation. Do not modify or free the return value. The return value is only valid until another API function is invoked.

◆ call_site()

point cs::point::call_site ( ) const
inline

Get the call site of a subordinate point.

Returns
The corresponding call site point.

A subordinate point is one whose kind is one of the following.

Exceptions
result::ELEMENT_NOT_PRESENTif no corresponding call site exists: either the point is not of an a suitable kind, or it is an indirect-call with no corresponding call site.

◆ callee()

procedure cs::point::callee ( ) const
inline

Get the callee procedure associated with a call-site point.

Returns
The callee procedure.
Exceptions
result::ERROR_SDG_NOT_PRESENTif no project is loaded.
result::ERROR_NOT_A_CALL_SITEif the point does not represent a call site.
result::ELEMENT_NOT_PRESENTif the point represents a call site, but there is no associated callee.

◆ cfg_inter_targets()

cfg_edge_set cs::point::cfg_inter_targets ( ) const
inline

Get the inter-procedural successors of a point.

Returns
A cfg_edge_set containing the inter-procedural successor edges from the point.
Exceptions
result::ERROR_SDG_NOT_PRESENTif no project is loaded.
result::ERROR_NO_DEPENDENCES[CodeSonar only] if the kind of this is one of point_kind::EXIT, point_kind::CALL_SITE, point_kind::INDIRECT_CALL, point_kind::ACTUAL_IN.
This affects only CodeSonar: CodeSurfer retains more dependence information.

See CFG Edges for more information.

◆ cfg_targets()

cfg_edge_set cs::point::cfg_targets ( ) const
inline

Get the intra-procedural successors of a point.

Returns
A cfg_edge_set containing the intra-procedural successor edges from the point.
Exceptions
result::ERROR_SDG_NOT_PRESENTif no project is loaded.

See CFG Edges for more information.

◆ characters()

std::string cs::point::characters ( size_t  limit = SIZE_MAX) const
inline

Get a string representation of a point.

Parameters
[in]limitThe maximum length of the retrieved representation. Specify SIZE_MAX for no limit.
Returns
The string formed by concatenating all characters in the relevant source file that are associated with the point.
Exceptions
result::ELEMENT_NOT_PRESENTif there is no position information associated with the point.

◆ charpos()

sfileinst_int_pair_set_pair cs::point::charpos ( ) const
inline

Get the character positions (in the source code) for a point.

Returns
The sfileinst_int_pair_set_pair representing the point's character positions.
Exceptions
result::NO_POSITIONif this does not have a position in any file in the project

◆ cmp()

cs::point::cmp ( const point other) const
inline

Comparison function for point.

Parameters
otherThe point object to compare against.
Returns
An integer N such that:
  • N==0 if the two objects compare equal
  • N<0 if this < other
  • N>0 if this > other
this and other will only compare equal if they are the same point object.

◆ condition_number()

csuint64 cs::point::condition_number ( ) const
inline

[CodeSonar only] Get the condition number of a point.

Returns
The condition number, or 0 on failure.

Each group of points in the same conditional will share the same condition number. The value has no meaning, beyond grouping vertices by conditional. A conditional is defined as the predicate of one if statement or loop. Multiple vertices can arise from one conditional because normalizations decompose a single if statement into many vertices in the presence of language features such as short-circuiting connectives.

◆ csonar_enum_killed()

symbol_vector cs::point::csonar_enum_killed ( ) const
inline

Get the list of killed symbols (symbol) for a point, computing the list on-demand.

Returns
The killed symbols for the point. The list is generated on-demand and will be recomputed if the method is called again on the same point.

◆ csonar_enum_referenced()

symbol_vector cs::point::csonar_enum_referenced ( ) const
inline

Get the list of referenced symbols (symbol) for a point, computing the list on-demand.

Returns
The referenced symbols for the point. The list is generated on-demand and will be recomputed if the method is called again on the same point.

◆ csonar_enum_used()

symbol_vector cs::point::csonar_enum_used ( ) const
inline

Get the list of used symbols (symbol) for a point, computing the list on-demand.

Returns
The used symbols for the point. The list is generated on-demand and will be recomputed if the method is called again on the same point.

◆ file_line()

sfileinst_line_pair cs::point::file_line ( ) const
inline

Get the file instance and (smallest offset) line for a point.

Returns
The source file instance containing the point, and the (smallest offset) line on which the point occurs in that source file instance.
Exceptions
result::NO_POSITIONif the point does not have a position in any file instance in the project.

◆ get_address()

effective_address cs::point::get_address ( ) const
inline

[Binary analyses only] Get the effective address of a point, if it has one.

Returns
The point's effective address.
Exceptions
result::NOT_IMPLEMENTEDif the CodeSonar installation does not include binary analysis functionality.
result::ELEMENT_NOT_PRESENTif the point does not have an effective address, either because it is not a machine-code point or because it is not directly assocated with an instruction.

This function typically only associates an address with the "first" point of an instruction. For example, call instructions get expanded to several points: an expression or control point, the actual call-site vertex, potentially multiple actual-ins, and potentially multiple actual-outs. Only the expression/control point will have an address per this function.

See get_affiliated_address() for a version of this function that tries harder to find a sensible address. In the case of the call-site vertex, all points will have an "affiliated" address that agrees with that of the expression/control point.

The mapping between addresses and points is still not quite one-to-one however, because of procedure cloning and other issues; multiple vertices can have the same address.

◆ get_affiliated_address()

effective_address cs::point::get_affiliated_address ( ) const
inline

[Binary analyses only] Get the effective address affiliated with a point, if there is one.

Returns
The affiliated effective address.
Exceptions
result::NOT_IMPLEMENTEDif the CodeSonar installation does not include binary analysis functionality.
result::ELEMENT_NOT_PRESENTif the point does not have an effective address, either because it is not a machine-code point or because it is an exit point.

See get_address() for a discussion of what "affiliated" means.

◆ get_ast()

ast cs::point::get_ast ( ast_family  fam = ast_family::DEFAULT) const
inline

Get the AST associated with a point.

Parameters
[in]famPoints may be associated with multiple ASTs. This specifies which one to get.
Returns
The ast of ast_family fam that is associated with the point.
Exceptions
result::ERROR_SDG_NOT_PRESENTif no project is loaded
result::ELEMENT_NOT_PRESENTif the point does not have an associated AST of family fam. This includes the case where the project was not built to include ASTs of family fam, and the case where fam is ast_family::C_UNNORMALIZED

◆ get_kind()

point_kind cs::point::get_kind ( ) const
inline

Get a point's kind.

Returns
The kind, as a point_kind.

◆ get_procedure()

procedure cs::point::get_procedure ( ) const
inline

Get the procedure containing a point.

Returns
The point's containing procedure.

◆ get_syntax_element()

point_syntax_element cs::point::get_syntax_element ( ) const
inline

Get a point's syntax element.

Returns
The point's syntax element, as a point_syntax_element.

◆ get_syntax_kind()

point_syntax_kind cs::point::get_syntax_kind ( ) const
inline

Get a point's syntax kind.

Returns
The syntax kind, as a point_syntax_kind.

◆ handle()

std::string cs::point::handle ( ) const
inline

Get a handle for this point.

Returns
The point's handle.

Use this function to retrieve a handle to the point which can be stored externally and used with project::lookup_point_handle() to retrieve the point when needed. This handle is valid only for the analysis it was generated from. If you rebuild the project, the handle will no longer be valid.

A handle is a std::string consisting of letters (upper and lower case) and numbers, and could also include the following characters: "+", "=", and "_".

◆ has_ast()

bool cs::point::has_ast ( ast_family  fam = ast_family::DEFAULT) const
inline

Check: does a point have an associated AST (ast) of the specified family (ast_family)?

Parameters
[in]famPoints may be associated with multiple ASTs. This specifies which one to check for. Each language dependent AST header file will define its AST families.
Returns
true if the point has an associated AST whose family is fam, false otherwise.

◆ hash()

cs_hash_t cs::point::hash ( ) const
inline

Get a hash value for a point.

◆ id()

csint64 cs::point::id ( ) const
inline

Get a point's unique identifier.

Returns
The unique identifier.
  • Identifiers are unique within a procedure.
  • In an incremental analysis where the containing compilation unit is not recompiled, a point will have the same identifier that it did in the incremental parent.
  • In all other cases do not persist between different analyses of the same project (or the same code in a different project).

To get a point given its ID, use procedure::retrieve_point().

◆ is_implicit_actual_in()

bool cs::point::is_implicit_actual_in ( ) const
inline

Check: is a point an actual-in that is implicitly generated?

Returns
true if called on a point that is an actual-in and is implicit. false otherwise

An implicit actual-in can occur in C++ code where the callee returns a non-trivial C++ object. For example:

std::string s = std::to_string(1);

will have two actual-ins, where the first is implicit:

[actual-in] $param_1 = &s
[actual-in] $param_2 = 1

Note that default arguments are not considered implicit, despite also not being being written at the call site.

◆ is_inside_macro()

bool cs::point::is_inside_macro ( ) const
inline

Check: is a point entirely contained inside a macro?

Returns
true if called on a point that lies entirely inside a C or C++ macro expansion. false otherwise, including the case where only part of the point is inside a macro expansion.

This function will return false if called on a point for which only only part is inside a macro expansion, such as the point corresponding to the assignment "p = NULL".

◆ rank()

size_t cs::point::rank ( ) const
inline

Get the rank of a point.

Returns
The rank, as a size_t.

Rank starts at 1, with globals coming first, followed by non-globals. For non-globals, rank shows the order they appear in the source.

Exceptions
result::VERTEX_HAS_NO_RANKif the point is not a {formal,actual}-{in,out} or global-{formal,actual}-{in,out}: these are the only points that have rank.

◆ solitary_cfg_target()

point cs::point::solitary_cfg_target ( ) const
inline

Get the CFG successor of a point that has exactly one successor CFG edge.

Returns
The single CFG successor.
Exceptions
result::ERROR_SDG_NOT_PRESENT
result::PDG_VERTEX_HAS_ZERO_OR_MULTIPLE_SUCCESSORSif the point does not have exactly one successor CFG edge (this includes the case where it has one CFG successor but multiple CFG edges to that successor).

See CFG Edges for more information.

◆ source_pp()

std::string cs::point::source_pp ( ) const
inline

[CodeSonar only] Get a string containing a pretty printed version of an actual-in, expression, call-site, or control-point point.

Returns
The string representation.
Exceptions
result::ERROR_INVALID_ARGUMENTif called on a point that is not an actual-in, expression, call-site, or control-point.
result::ELEMENT_NOT_PRESENTif the point does not have the necessary information associated with it.

◆ stable_cmp()

int cs::point::stable_cmp ( const point other) const
inline

Compare with another point, with stable results across sufficiently-similar analyses.

Parameters
[in]otherThe point to compare against.
Returns
An integer N, such that:
  • N<0 if this considered less than other
  • N==0 if this and other are the same object
  • N>0 if this considered greater than other

The comparison is stable in the following sense. Suppose there are two analyses A1 and A2 generated with exactly the same inputs (including identical analyzed code, underlying build commands and ordering, command line and configuration settings, increment order and contents). Let a1 and b1 be two point objects in A1, and a2 and b2 be the point objects in A2 that correspond to a1 and b1 respectively. Then a1.stable_cmp(b1)==a2.stable_cmp(b2).

If you don't need comparison relationships to be stable across analyses, use cmp(): it has better performance.

◆ stable_hash()

csuint64 cs::point::stable_hash ( ) const
inline

Get a hash value for a point, with stable results across sufficiently-similar analyses.

Returns
The computed hash value.

This hash value is stable in the following sense. Suppose there are two analyses A1 and A2 generated with exactly the same inputs (including identical analyzed code, underlying build commands and ordering, command line and configuration settings, increment order and contents). Let v1 be a point object in A1, and v2 be the point object in A2 that corresponds to v1. Then v1.stable_hash()==v2.stable_hash().

If you don't need hash values to be stable across analyses, use hash(): it has better performance.

Friends And Related Symbol Documentation

◆ operator!=()

bool operator!= ( const point a,
const point b 
)
related

Inequality operator for point.

Parameters
[in]aThe point to compare.
[in]bThe point to compare against.
Returns
false if a and b are equal according to point::cmp(), true otherwise.

◆ operator<()

bool operator< ( const point a,
const point b 
)
related

Less-than operator for point.

Parameters
[in]aThe point to compare.
[in]bThe point to compare against.
Returns
true if a < b according to point::cmp() , false otherwise.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  out,
const point a 
)
related


Print a representation of a point object to the specified stream.

Parameters
[in]outThe stream to print to.
[in]aThe point object to print.
Returns
void

◆ operator<=()

bool operator<= ( const point a,
const point b 
)
related

Less-than-or-equal operator for point.

Parameters
[in]aThe point to compare.
[in]bThe point to compare against.
Returns
true if a <= b according to point::cmp() , false otherwise.

◆ operator==()

bool operator== ( const point a,
const point b 
)
related

Equality operator for point.

Parameters
[in]aThe point to compare.
[in]bThe point to compare against.
Returns
true if a and b are equal according to point::cmp(), false otherwise.

◆ operator>()

bool operator> ( const point a,
const point b 
)
related

Greater-than operator for point.

Parameters
[in]aThe point to compare.
[in]bThe point to compare against.
Returns
true if a > b according to point::cmp() , false otherwise.

◆ operator>=()

bool operator>= ( const point a,
const point b 
)
related

Greater-than-or-equal operator for point.

Parameters
[in]aThe point to compare.
[in]bThe point to compare against.
Returns
true if a >= b according to point::cmp() , false otherwise.

The documentation for this class was generated from the following files: