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

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

Static Public Member Functions

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

Static Public Attributes

static const locations_node_flags ALREADY_XML_ENCODED
 Singleton set containing the "already XML encoded" flag: special characters such as '<' and '>' are already XML-escaped in the 'problem' string. More...
 
static const locations_node_flags ALTERNATE_INTERESTING
 Singleton set containing the "alternate interesting" flag: this location should be rendered in the "alternate interesting" style, which is less eye-catching than the "super interesting" style used for actual errors. More...
 
static const locations_node_flags APPLY_STYLE_TO_LINE
 Singleton set containing the "apply style to line" flag: the specified style will be applied to the entire line if it is the only style used on that line. More...
 
static const locations_node_flags DONT_MARK_CONTRIBUTING
 Singleton set containing the "don't mark contributing" flag: this location should not be additionally highlighted in the code listing. More...
 
static const locations_node_flags ENDBOX
 Singleton set containing the "endbox" flag: the GUI should display an end box at this location (rather than an event box). More...
 
static const locations_node_flags INTERPOLATE_STYLE
 Singleton set containing the "interpolate style" flag: the specified style should be heuristically applied to text other than the actual events between and around those events. More...
 
static const locations_node_flags NONE
 Empty set: contains no flags. More...
 
static const locations_node_flags PRIMARY
 Singleton set containing the "primary" flag: the event at this location is a "primary event" and should be displayed by default in the GUI Warning Report. More...
 
static const locations_node_flags STYLE0
 Singleton set containing the "style0" flag: this location should be rendered in the style0 style, which looks identical to "on_path". More...
 
static const locations_node_flags STYLE1
 Singleton set containing the "style1" flag: this location should be rendered in the alternate style1 style. More...
 
static const locations_node_flags STYLE2
 Singleton set containing the "style2" flag: this location should be rendered in the alternate style2 style. More...
 
static const locations_node_flags STYLE3
 Singleton set containing the "style3" flag: this location should be rendered in the alternate style3 style. More...
 

Friends

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

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Flag class: describes properties of a locations_node.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a locations_node_flags object.

Returns
The string representation.

◆ cmp()

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

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

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

◆ hash()

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

Hash function for locations_node_flags.

◆ name()

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

Get the name of a locations_node_flags object.

◆ operator &=()

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

AND-assign operator.

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

◆ operator|=()

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

OR-assign operator.

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

◆ operator~()

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

Complementation operator.

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

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for locations_node_flags.

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

◆ operator&()

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

AND operator for locations_node_flags.

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

◆ operator<()

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

Less-than operator for locations_node_flags.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for locations_node_flags.

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

◆ operator==()

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

Equality operator for locations_node_flags.

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

◆ operator>()

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

Greater-than operator for locations_node_flags.

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

◆ operator>=()

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

Greater-than-or-equal operator for locations_node_flags.

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

◆ operator|()

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

OR operator for locations_node_flags.

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

Member Data Documentation

◆ ALREADY_XML_ENCODED

const locations_node_flags cs::locations_node_flags::ALREADY_XML_ENCODED
static

Singleton set containing the "already XML encoded" flag: special characters such as '<' and '>' are already XML-escaped in the 'problem' string.

◆ ALTERNATE_INTERESTING

const locations_node_flags cs::locations_node_flags::ALTERNATE_INTERESTING
static

Singleton set containing the "alternate interesting" flag: this location should be rendered in the "alternate interesting" style, which is less eye-catching than the "super interesting" style used for actual errors.

This style is suitable for strong supporting evidence for a warning which is not, itself, incorrect.

◆ APPLY_STYLE_TO_LINE

const locations_node_flags cs::locations_node_flags::APPLY_STYLE_TO_LINE
static

Singleton set containing the "apply style to line" flag: the specified style will be applied to the entire line if it is the only style used on that line.

◆ DONT_MARK_CONTRIBUTING

const locations_node_flags cs::locations_node_flags::DONT_MARK_CONTRIBUTING
static

Singleton set containing the "don't mark contributing" flag: this location should not be additionally highlighted in the code listing.

This removes any additional marking CodeSonar may place on this particular event.

◆ ENDBOX

const locations_node_flags cs::locations_node_flags::ENDBOX
static

Singleton set containing the "endbox" flag: the GUI should display an end box at this location (rather than an event box).

An end box has:

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

◆ INTERPOLATE_STYLE

const locations_node_flags cs::locations_node_flags::INTERPOLATE_STYLE
static

Singleton set containing the "interpolate style" flag: the specified style should be heuristically applied to text other than the actual events between and around those events.

◆ NONE

const locations_node_flags cs::locations_node_flags::NONE
static

Empty set: contains no flags.

◆ PRIMARY

const locations_node_flags cs::locations_node_flags::PRIMARY
static

Singleton set containing the "primary" flag: the event at this location is a "primary event" and should be displayed by default in the GUI Warning Report.

Do not use this flag in combination with ENDBOX. (End boxes are always displayed.)

◆ STYLE0

const locations_node_flags cs::locations_node_flags::STYLE0
static

Singleton set containing the "style0" flag: this location should be rendered in the style0 style, which looks identical to "on_path".

◆ STYLE1

const locations_node_flags cs::locations_node_flags::STYLE1
static

Singleton set containing the "style1" flag: this location should be rendered in the alternate style1 style.

◆ STYLE2

const locations_node_flags cs::locations_node_flags::STYLE2
static

Singleton set containing the "style2" flag: this location should be rendered in the alternate style2 style.

◆ STYLE3

const locations_node_flags cs::locations_node_flags::STYLE3
static

Singleton set containing the "style3" flag: this location should be rendered in the alternate style3 style.


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