CodeSonar C++ API
[For improved navigation, enable JavaScript.]
Public Member Functions | Static Public Member Functions | Static Public Attributes | Related Functions | List of all members
cs::point_kind Class Reference

Enumeration class: program point (point) kind. More...

Public Member Functions

csint64 as_integer () const
 Get an integer representation of this. More...
 
std::string as_repr () const
 Get a representation of a point_kind object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a point_kind object. More...
 
int cmp (const point_kind &other) const
 Comparison function for point_kind, with respect to a stable overall ordering. More...
 
cs_hash_t hash () const
 Hash function for point_kind. More...
 
std::string name () const
 Get the name of a point_kind object. More...
 
bool participates_in_cfg ()
 Check: do points (point) of this point_kind appear in CFGs? More...
 

Static Public Member Functions

static point_kind from_integer (csint64 _inner)
 Construct an instance from an integer representation. More...
 

Static Public Attributes

static const point_kind ACTUAL_IN
 Kind actual-in.
 
static const point_kind ACTUAL_OUT
 Kind actual-out.
 
static const point_kind AUXILIARY
 [CodeSurfer only] Kind auxiliary.
 
static const point_kind BODY
 Kind body.
 
static const point_kind CALL_SITE
 Kind call-site.
 
static const point_kind CONTROL_POINT
 Kind control-point.
 
static const point_kind DECLARATION
 [CodeSurfer only] Kind declaration.
 
static const point_kind ENTRY
 Kind entry.
 
static const point_kind EXCPT_EXIT
 [CodeSurfer only] Kind exceptional-exit.
 
static const point_kind EXCPT_RETURN
 [CodeSurfer only] Kind exceptional-return.
 
static const point_kind EXIT
 Kind exit.
 
static const point_kind EXPRESSION
 Kind expression.
 
static const point_kind FORMAL_IN
 Kind formal-in.
 
static const point_kind FORMAL_OUT
 Kind formal-out.
 
static const point_kind GLOBAL_ACTUAL_IN
 [CodeSurfer only] Kind global-actual-in.
 
static const point_kind GLOBAL_ACTUAL_OUT
 [CodeSurfer only] Kind global-actual-out.
 
static const point_kind GLOBAL_FORMAL_IN
 [CodeSurfer only] Kind global-formal-in.
 
static const point_kind GLOBAL_FORMAL_OUT
 [CodeSurfer only] Kind global-formal-out.
 
static const point_kind HAMMOCK_EXIT
 [CodeSurfer only] Kind hammock-exit.
 
static const point_kind HAMMOCK_HEADER
 [CodeSurfer only] Kind hammock-header.
 
static const point_kind INDIRECT_CALL
 Kind indirect-call.
 
static const point_kind JUMP
 Kind jump.
 
static const point_kind LABEL
 Kind label.
 
static const point_kind NORMAL_EXIT
 [CodeSurfer only] Kind normal-exit.
 
static const point_kind NORMAL_RETURN
 [CodeSurfer only] Kind normal-return.
 
static const point_kind PHI
 [CodeSurfer only] Kind phi.
 
static const point_kind PI
 [CodeSurfer only] Kind pi.
 
static const point_kind PREEXIT
 Kind preexit.
 
static const point_kind RESERVED_000
 [CodeSurfer only] VERTEX_KIND_NULL
 
static const point_kind RESERVED_002
 [CodeSurfer only] CALLPOST_VERTEX
 
static const point_kind RESERVED_004
 [CodeSurfer only] USER_DEFINED_VERTEX
 
static const point_kind RETURN
 Kind return.
 
static const point_kind SWITCH_CASE
 Kind switch-case.
 
static const point_kind UNAVAILABLE
 Kind unavailable.
 
static const point_kind VARIABLE_INITIALIZATION
 Kind variable-initialization.
 

Related Functions

(Note that these are not member functions.)

bool operator!= (const point_kind &a, const point_kind &b)
 Inequality operator for point_kind. More...
 
bool operator< (const point_kind &a, const point_kind &b)
 Less-than operator for point_kind. More...
 
std::ostream & operator<< (std::ostream &out, const point_kind &a)
 Print a representation of a point_kind object to the specified stream. More...
 
bool operator<= (const point_kind &a, const point_kind &b)
 Less-than-or-equal operator for point_kind. More...
 
bool operator== (const point_kind &a, const point_kind &b)
 Equality operator for point_kind. More...
 
bool operator> (const point_kind &a, const point_kind &b)
 Greater-than operator for point_kind. More...
 
bool operator>= (const point_kind &a, const point_kind &b)
 Greater-than-or-equal operator for point_kind. More...
 

Detailed Description

Enumeration class: program point (point) kind.

Get a point's kind with point::get_kind().

Member Function Documentation

◆ as_integer()

csint64 cs::point_kind::as_integer ( ) const
inline

Get an integer representation of this.

Returns
An integer suitable for use with from_integer(). Invariant: For point_kind x, point_kind.from_integer(x.as_integer()) == x

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a point_kind object.

Returns
The string representation.

◆ cmp()

int cs::point_kind::cmp ( const point_kind other) const
inline

Comparison function for point_kind, with respect to a stable overall ordering.

Parameters
otherThe point_kind 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

◆ from_integer()

static point_kind cs::point_kind::from_integer ( csint64  _inner)
inlinestatic

Construct an instance from an integer representation.

Parameters
[in]_innerThe integer representation, as returned by as_integer(). Invariant: For point_kind x, point_kind.from_integer(x.as_integer()) == x
Exceptions
cs::result::ERROR_INVALID_ARGUMENTif _inner is not a valid integer representation for a point_kind instance.

◆ hash()

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

Hash function for point_kind.

◆ name()

std::string cs::point_kind::name ( ) const
inline

Get the name of a point_kind object.

Returns
The name.

◆ participates_in_cfg()

bool cs::point_kind::participates_in_cfg ( )
inline

Check: do points (point) of this point_kind appear in CFGs?

Returns
true if a point of this kind can ever appear in a CFG, false otherwise.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for point_kind.

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

◆ operator<()

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

Less-than operator for point_kind.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for point_kind.

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

◆ operator==()

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

Equality operator for point_kind.

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

◆ operator>()

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

Greater-than operator for point_kind.

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

◆ operator>=()

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

Greater-than-or-equal operator for point_kind.

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

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