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

Enumeration class: an operator that can be used in a transform query with step_xform::query(). 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 xform_operator object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a xform_operator object. More...
 
int cmp (const xform_operator &other) const
 Comparison function for xform_operator, with respect to a stable overall ordering. More...
 
cs_hash_t hash () const
 Hash function for xform_operator. More...
 
std::string name () const
 Get the name of a xform_operator object. More...
 

Static Public Member Functions

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

Static Public Attributes

static const xform_operator EQUAL
 the == operator
 
static const xform_operator GREATER_THAN_OR_EQUAL
 the >= operator
 
static const xform_operator LESS_THAN_OR_EQUAL
 the <= operator
 
static const xform_operator NOT_EQUAL
 the != operator
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Enumeration class: an operator that can be used in a transform query with step_xform::query().

This class is used when implementing step visitors. When you implement transition() as part of the overall task of subclassing step_state, you will use step_xform::query() invocations to inspect its step_xform arguments; these query invocations take xform_operator arguments.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a xform_operator object.

Returns
The string representation.

◆ cmp()

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

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

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

Construct an instance from an integer representation.

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

◆ hash()

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

Hash function for xform_operator.

◆ name()

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

Get the name of a xform_operator object.

Returns
The name.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for xform_operator.

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

◆ operator<()

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

Less-than operator for xform_operator.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for xform_operator.

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

◆ operator==()

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

Equality operator for xform_operator.

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

◆ operator>()

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

Greater-than operator for xform_operator.

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

◆ operator>=()

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

Greater-than-or-equal operator for xform_operator.

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

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