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

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

Static Public Member Functions

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

Static Public Attributes

static const cfg_path_node_flags ALREADY_XML_ENCODED
 Special characters such as '<' and '>' are already XML-escaped in the 'problem' string. More...
 
static const cfg_path_node_flags CONTRIBUTES
 This location contributes to a warning path. More...
 
static const cfg_path_node_flags DONT_MARK_CONTRIBUTING
 This location should not be additionally highlighted in the code listing. More...
 
static const cfg_path_node_flags ENDBOX
 The GUI should display an end box at this location (rather than an event box): More...
 
static const cfg_path_node_flags NEW_PATH
 This node starts a new path (that is, it is not the CFG path successor of the previous node in the std::vector). More...
 
static const cfg_path_node_flags NONE
 Use this if you don't want any other flags. More...
 
static const cfg_path_node_flags PRIMARY
 The event at this location is a "primary event" and should be displayed by default in the GUI Warning Report. More...
 

Friends

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

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Flag class: characterizes a cfg_path_node.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a cfg_path_node_flags object.

Returns
The string representation.

◆ cmp()

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

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

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

◆ hash()

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

Hash function for cfg_path_node_flags.

◆ name()

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

Get the name of a cfg_path_node_flags object.

◆ operator &=()

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

AND-assign operator.

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

◆ operator|=()

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

OR-assign operator.

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

◆ operator~()

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

Complementation operator.

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

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for cfg_path_node_flags.

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

◆ operator&()

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

AND operator for cfg_path_node_flags.

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

◆ operator<()

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

Less-than operator for cfg_path_node_flags.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for cfg_path_node_flags.

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

◆ operator==()

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

Equality operator for cfg_path_node_flags.

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

◆ operator>()

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

Greater-than operator for cfg_path_node_flags.

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

◆ operator>=()

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

Greater-than-or-equal operator for cfg_path_node_flags.

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

◆ operator|()

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

OR operator for cfg_path_node_flags.

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

Member Data Documentation

◆ ALREADY_XML_ENCODED

const cfg_path_node_flags cs::cfg_path_node_flags::ALREADY_XML_ENCODED
static

Special characters such as '<' and '>' are already XML-escaped in the 'problem' string.

◆ CONTRIBUTES

const cfg_path_node_flags cs::cfg_path_node_flags::CONTRIBUTES
static

This location contributes to a warning path.

By default, code excerpts in warning reports are expanded to show contributing vertices.

◆ DONT_MARK_CONTRIBUTING

const cfg_path_node_flags cs::cfg_path_node_flags::DONT_MARK_CONTRIBUTING
static

This location should not be additionally highlighted in the code listing.

(Note that in some cases CodeSonar will have independently determined that the location shouldn't be additionally highlighted.)

◆ ENDBOX

const cfg_path_node_flags cs::cfg_path_node_flags::ENDBOX
static

The GUI should display an end box at this location (rather than an event box):

  • Warning class name instead of event id.
  • "Show: All events | Only primary events" links.

◆ NEW_PATH

const cfg_path_node_flags cs::cfg_path_node_flags::NEW_PATH
static

This node starts a new path (that is, it is not the CFG path successor of the previous node in the std::vector).

When you are specifying multiple paths in the path argument to the warningclass report() and report_return_warning() methods that report a warning with a path, use this flag to identify the first node of each path.

The typical use case is for concurrency bugs, where the code involved may not be in a single path.

◆ NONE

const cfg_path_node_flags cs::cfg_path_node_flags::NONE
static

Use this if you don't want any other flags.

◆ PRIMARY

const cfg_path_node_flags cs::cfg_path_node_flags::PRIMARY
static

The event at this location is a "primary event" and should be displayed by default in the GUI Warning Report.

Do not set this flag if you are setting cscpnf_endbox. (End boxes are always displayed.)


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