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

Flag class: properties for xr_occurrence_iterator and xr_homonym_iterator iterators. 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 xr_occ_iter_flags object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a xr_occ_iter_flags object. More...
 
int cmp (const xr_occ_iter_flags &other) const
 Comparison function for xr_occ_iter_flags, with respect to a stable overall ordering. More...
 
cs_hash_t hash () const
 Hash function for xr_occ_iter_flags. More...
 
std::string name () const
 Get the name of a xr_occ_iter_flags object. More...
 
xr_occ_iter_flagsoperator &= (const xr_occ_iter_flags &other)
 AND-assign operator. More...
 
xr_occ_iter_flagsoperator|= (const xr_occ_iter_flags &other)
 OR-assign operator. More...
 
xr_occ_iter_flags operator~ () const
 Complementation operator. More...
 

Static Public Member Functions

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

Static Public Attributes

static const xr_occ_iter_flags DONTCARE_COMPLETE
 Singleton set containing the "don't care about completeness" flag: if two tuples differ only in completeness, only one of the two will be returned.
 
static const xr_occ_iter_flags DONTCARE_DEF_OR_COMPLETE
 Set containing the "don't care about definition location or completeness" flags: if two tuples differ only in completeness and/or definition location, only one of the two will be returned.
 
static const xr_occ_iter_flags DROP_LIBMODEL_DEFS
 Singleton set containing the "drop library model definitions" flag: if an occurrence's associated definition is in a library model, don't include the occurrence in the iteration.
 
static const xr_occ_iter_flags DROP_LIBMODEL_OCCS
 Singleton set containing the "drop library model occurrences" flag: if an occurrence is in a library model, don't include it in the iteration.
 
static const xr_occ_iter_flags NONE
 Empty set: contains no flags. More...
 
static const xr_occ_iter_flags POPULATE_COUNTERS
 Compute and store tuple counts for later retrieval by xr_occurrence_iterator or xr_homonym_iterator get_*() functions. More...
 

Friends

xr_occ_iter_flags operator & (const xr_occ_iter_flags &a, const xr_occ_iter_flags &b)
 
xr_occ_iter_flags operator| (const xr_occ_iter_flags &a, const xr_occ_iter_flags &b)
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Flag class: properties for xr_occurrence_iterator and xr_homonym_iterator iterators.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a xr_occ_iter_flags object.

Returns
The string representation.

◆ cmp()

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

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

Parameters
otherThe xr_occ_iter_flags 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 xr_occ_iter_flags cs::xr_occ_iter_flags::from_integer ( csint64  _inner)
inlinestatic

Construct an instance from an integer representation.

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

◆ hash()

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

Hash function for xr_occ_iter_flags.

◆ name()

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

Get the name of a xr_occ_iter_flags object.

◆ operator &=()

xr_occ_iter_flags& cs::xr_occ_iter_flags::operator&= ( const xr_occ_iter_flags other)
inline

AND-assign operator.

Returns
A xr_occ_iter_flags object containing the flags that are contained in both this and other.

◆ operator|=()

xr_occ_iter_flags& cs::xr_occ_iter_flags::operator|= ( const xr_occ_iter_flags other)
inline

OR-assign operator.

Returns
A xr_occ_iter_flags object containing the flags that are contained in this, other, or both.

◆ operator~()

xr_occ_iter_flags cs::xr_occ_iter_flags::operator~ ( ) const
inline

Complementation operator.

Returns
A xr_occ_iter_flags object containing the flags that are NOT contained in this.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for xr_occ_iter_flags.

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

◆ operator&()

xr_occ_iter_flags operator & ( const xr_occ_iter_flags a,
const xr_occ_iter_flags b 
)
related

AND operator for xr_occ_iter_flags.

Parameters
[in]aAND operand.
[in]bAND operand.
Returns
A xr_occ_iter_flags object containing all flags that are in both a and b.

◆ operator<()

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

Less-than operator for xr_occ_iter_flags.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for xr_occ_iter_flags.

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

◆ operator==()

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

Equality operator for xr_occ_iter_flags.

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

◆ operator>()

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

Greater-than operator for xr_occ_iter_flags.

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

◆ operator>=()

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

Greater-than-or-equal operator for xr_occ_iter_flags.

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

◆ operator|()

xr_occ_iter_flags operator| ( const xr_occ_iter_flags a,
const xr_occ_iter_flags b 
)
related

OR operator for xr_occ_iter_flags.

Parameters
[in]aOR operand.
[in]bOR operand.
Returns
A xr_occ_iter_flags object containing all flags that are in at least one of a, b.

Member Data Documentation

◆ NONE

const xr_occ_iter_flags cs::xr_occ_iter_flags::NONE
static

Empty set: contains no flags.

◆ POPULATE_COUNTERS

const xr_occ_iter_flags cs::xr_occ_iter_flags::POPULATE_COUNTERS
static

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