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::procedure_kind Class Reference

Enumeration class: the "kind" of a procedure. 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 procedure_kind object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a procedure_kind object. More...
 
int cmp (const procedure_kind &other) const
 Comparison function for procedure_kind, with respect to a stable overall ordering. More...
 
cs_hash_t hash () const
 Hash function for procedure_kind. More...
 
std::string name () const
 Get the name of a procedure_kind object. More...
 

Static Public Member Functions

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

Static Public Attributes

static const procedure_kind FILE_INITIALIZATION
 Kind file-initialization
 
static const procedure_kind GENERATED_INDIRECT
 Kind generated-indirect
 
static const procedure_kind HAMMOCK_GENERATED
 For internal use only.
 
static const procedure_kind LIBRARY
 Kind library
 
static const procedure_kind SYSTEM_INITIALIZATION
 Kind system-initialization
 
static const procedure_kind UNDEFINED
 Kind undefined
 
static const procedure_kind USER_DEFINED
 Kind user-defined
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Enumeration class: the "kind" of a procedure.

The procedure_kind class corresponds to the PDG kind abstraction.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a procedure_kind object.

Returns
The string representation.

◆ cmp()

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

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

Parameters
otherThe procedure_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 procedure_kind cs::procedure_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 procedure_kind x, procedure_kind.from_integer(x.as_integer()) == x
Exceptions
cs::result::ERROR_INVALID_ARGUMENTif _inner is not a valid integer representation for a procedure_kind instance.

◆ hash()

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

Hash function for procedure_kind.

◆ name()

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

Get the name of a procedure_kind object.

Returns
The name.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for procedure_kind.

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

◆ operator<()

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

Less-than operator for procedure_kind.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for procedure_kind.

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

◆ operator==()

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

Equality operator for procedure_kind.

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

◆ operator>()

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

Greater-than operator for procedure_kind.

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

◆ operator>=()

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

Greater-than-or-equal operator for procedure_kind.

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

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