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

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

Static Public Member Functions

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

Static Public Attributes

static const symbol_kind FUNCTION
 Kind function.
 
static const symbol_kind HEAP
 Kind heap.
 
static const symbol_kind INTERMEDIATE
 Kind intermediate.
 
static const symbol_kind INTERNAL
 Kind internal.
 
static const symbol_kind LABEL
 Kind label.
 
static const symbol_kind PARAM
 Kind param.
 
static const symbol_kind RESULT
 Kind result.
 
static const symbol_kind RETURN
 Kind return.
 
static const symbol_kind STRING
 Kind string.
 
static const symbol_kind SUBOBJ
 Kind subobj.
 
static const symbol_kind USER
 Kind user.
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Enumeration class: the kind of a symbol.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a symbol_kind object.

Returns
The string representation.

◆ cmp()

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

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

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

◆ hash()

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

Hash function for symbol_kind.

◆ name()

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

Get the name of a symbol_kind object.

Returns
The name.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for symbol_kind.

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

◆ operator<()

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

Less-than operator for symbol_kind.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for symbol_kind.

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

◆ operator==()

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

Equality operator for symbol_kind.

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

◆ operator>()

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

Greater-than operator for symbol_kind.

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

◆ operator>=()

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

Greater-than-or-equal operator for symbol_kind.

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

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