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

Denotes the conditions under which control can flow along an edge: a component of a cfg_edge. More...

Public Member Functions

 edge_label (bool val)
 Constructor for a boolean edge_label. More...
 
std::string as_repr () const
 Get a representation of a edge_label object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a edge_label object. More...
 
int cmp (const edge_label &other) const
 Comparison function for edge_label. More...
 
cs_hash_t hash () const
 Get a hash value for a edge_label. More...
 
std::string name () const
 Get the string representation of an edge_label. More...
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Denotes the conditions under which control can flow along an edge: a component of a cfg_edge.

Constructor & Destructor Documentation

◆ edge_label()

cs::edge_label::edge_label ( bool  val)
inline

Constructor for a boolean edge_label.

Parameters
[in]valSet to true for the "T" edge label, false for the "F" edge label.

Member Function Documentation

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a edge_label object.

Returns
The string representation.

◆ cmp()

cs::edge_label::cmp ( const edge_label other) const
inline

Comparison function for edge_label.

Parameters
otherThe edge_label 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
this and other will compare equal if and only if they have the same label string as determined by edge_label::name().

◆ hash()

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

Get a hash value for a edge_label.

◆ name()

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

Get the string representation of an edge_label.

Returns
The std::string representation.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for edge_label.

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

◆ operator<()

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

Less-than operator for edge_label.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for edge_label.

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

◆ operator==()

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

Equality operator for edge_label.

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

◆ operator>()

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

Greater-than operator for edge_label.

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

◆ operator>=()

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

Greater-than-or-equal operator for edge_label.

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

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