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

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

Static Public Member Functions

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

Static Public Attributes

static const set_kind BIT_VECTOR
 bit vector
 
static const set_kind FAST_VECTOR
 fast vector
 
static const set_kind LIST
 list
 
static const set_kind TREE
 tree
 
static const set_kind TRIE
 [CodeSurfer only] trie
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Enumeration class: the kind of a set.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a set_kind object.

Returns
The string representation.

◆ cmp()

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

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

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

◆ hash()

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

Hash function for set_kind.

◆ name()

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

Get the name of a set_kind object.

Returns
The name.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for set_kind.

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

◆ operator<()

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

Less-than operator for set_kind.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for set_kind.

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

◆ operator==()

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

Equality operator for set_kind.

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

◆ operator>()

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

Greater-than operator for set_kind.

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

◆ operator>=()

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

Greater-than-or-equal operator for set_kind.

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

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