CodeSonar C++ API
Public Member Functions | Static Public Member Functions | Static Public Attributes | Related Symbols | List of all members
cs::warningclass_flags Class Reference

Flag class: describes properties of a warningclass. More...

Public Member Functions

csint64 as_integer () const
 Get an integer representation of this.
 
std::string as_repr () const
 Get a representation of a warningclass_flags object that includes information useful for debugging.
 
std::string as_string () const
 Get a simple string representation of a warningclass_flags object.
 
int cmp (const warningclass_flags &other) const
 Comparison function for warningclass_flags, with respect to a stable overall ordering.
 
cs_hash_t hash () const
 Hash function for warningclass_flags.
 
std::string name () const
 Get the name of a warningclass_flags object.
 
warningclass_flagsoperator&= (const warningclass_flags &other)
 AND-assign operator.
 
warningclass_flagsoperator|= (const warningclass_flags &other)
 OR-assign operator.
 
warningclass_flags operator~ () const
 Complementation operator.
 

Static Public Member Functions

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

Static Public Attributes

static const warningclass_flags FORCE_PATH
 Singleton set containing the "force_path" flag: warnings of this class will always be treated as "pathy", even if they are reported using a warningclass.report() or warningclass.report_return_warning() overload that would otherwise indicate a pathless warning.
 
static const warningclass_flags NONE
 Empty set: contains no flags.
 
static const warningclass_flags PAD_ABOVE
 Singleton set containing the "pad above" flag: in the warning report, pad before the beginning of the warning proper with additional lines of code.
 
static const warningclass_flags PAD_BELOW
 Singleton set containing the "pad below" flag: In the warning report, pad after the end of the warning proper with additional lines of code.
 
static const warningclass_flags PADDING
 Set containing the "pad below" and "pad above" flags: in the warning report, pad both before and after the warning proper with additional lines of code.
 
static const warningclass_flags SHOW_ENTIRE_PROCEDURE
 Singleton set containing the "show entire procedure" flag: if any part of a procedure appears on a path, show the entire procedure in the warning report.
 
static const warningclass_flags WARNING_POINT_IS_START_POINT
 The start point of the path is most interesting (not the end point).
 

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

Flag class: describes properties of a warningclass.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

Returns
An integer suitable for use with from_integer().

Invariant: For warningclass_flags x, warningclass_flags.from_integer(x.as_integer()) == x

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a warningclass_flags object.

Returns
The string representation.

◆ cmp()

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

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

Parameters
otherThe warningclass_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 warningclass_flags cs::warningclass_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 warningclass_flags x, warningclass_flags.from_integer(x.as_integer()) == x

Exceptions
cs::result::ERROR_INVALID_ARGUMENTif _inner is not a valid integer representation for a warningclass_flags instance.

◆ hash()

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

Hash function for warningclass_flags.


◆ name()

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

Get the name of a warningclass_flags object.

◆ operator&=()

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

AND-assign operator.

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

◆ operator|=()

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

OR-assign operator.

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

◆ operator~()

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

Complementation operator.

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

Friends And Related Symbol Documentation

◆ operator!=()

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

Inequality operator for warningclass_flags.

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

◆ operator&()

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

AND operator for warningclass_flags.

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

◆ operator<()

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

Less-than operator for warningclass_flags.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for warningclass_flags.

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

◆ operator==()

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

Equality operator for warningclass_flags.

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

◆ operator>()

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

Greater-than operator for warningclass_flags.

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

◆ operator>=()

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

Greater-than-or-equal operator for warningclass_flags.

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

◆ operator|()

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

OR operator for warningclass_flags.

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

Member Data Documentation

◆ FORCE_PATH

const warningclass_flags cs::warningclass_flags::FORCE_PATH
static

Singleton set containing the "force_path" flag: warnings of this class will always be treated as "pathy", even if they are reported using a warningclass.report() or warningclass.report_return_warning() overload that would otherwise indicate a pathless warning.

This affects various presentation heuristics for the displayed warning. The main application of this flag is for importing warnings from other tools where a list of locations is known to actually represent a path.

◆ NONE

const warningclass_flags cs::warningclass_flags::NONE
static

Empty set: contains no flags.

◆ PAD_ABOVE

const warningclass_flags cs::warningclass_flags::PAD_ABOVE
static

Singleton set containing the "pad above" flag: in the warning report, pad before the beginning of the warning proper with additional lines of code.

◆ PAD_BELOW

const warningclass_flags cs::warningclass_flags::PAD_BELOW
static

Singleton set containing the "pad below" flag: In the warning report, pad after the end of the warning proper with additional lines of code.

◆ PADDING

const warningclass_flags cs::warningclass_flags::PADDING
static

Set containing the "pad below" and "pad above" flags: in the warning report, pad both before and after the warning proper with additional lines of code.

◆ SHOW_ENTIRE_PROCEDURE

const warningclass_flags cs::warningclass_flags::SHOW_ENTIRE_PROCEDURE
static

Singleton set containing the "show entire procedure" flag: if any part of a procedure appears on a path, show the entire procedure in the warning report.

◆ WARNING_POINT_IS_START_POINT

const warningclass_flags cs::warningclass_flags::WARNING_POINT_IS_START_POINT
static

The start point of the path is most interesting (not the end point).


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