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

Enumeration class describing the mode of a CodeSonar analysis process. 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 analysis_mode object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a analysis_mode object. More...
 
int cmp (const analysis_mode &other) const
 Comparison function for analysis_mode, with respect to a stable overall ordering. More...
 
cs_hash_t hash () const
 Hash function for analysis_mode. More...
 
std::string name () const
 Get the name of a analysis_mode object. More...
 

Static Public Member Functions

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

Static Public Attributes

static const analysis_mode DAEMON
 Indicates that the CodeSonar process is not analyzing anything - it is only running to service requests from the hub (for example, requests for source code listings). More...
 
static const analysis_mode INCREMENTAL
 Indicates an incremental analysis: only new and otherwise-affected parts of the program are being analyzed; state associated with no-longer-present bits of the program may be deleted. More...
 
static const analysis_mode INITIALIZING
 The CodeSonar process always starts in this state. More...
 
static const analysis_mode NORMAL
 Indicates a nonincremental analysis ( INCREMENTAL_BUILD =No) or base analysis ( INCREMENTAL_BUILD =Yes and no parent analysis). More...
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Enumeration class describing the mode of a CodeSonar analysis process.

analysis::get_mode() returns an object of this class.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a analysis_mode object.

Returns
The string representation.

◆ cmp()

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

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

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

Construct an instance from an integer representation.

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

◆ hash()

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

Hash function for analysis_mode.

◆ name()

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

Get the name of a analysis_mode object.

Returns
The name.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for analysis_mode.

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

◆ operator<()

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

Less-than operator for analysis_mode.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for analysis_mode.

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

◆ operator==()

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

Equality operator for analysis_mode.

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

◆ operator>()

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

Greater-than operator for analysis_mode.

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

◆ operator>=()

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

Greater-than-or-equal operator for analysis_mode.

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

Member Data Documentation

◆ DAEMON

const analysis_mode cs::analysis_mode::DAEMON
static

Indicates that the CodeSonar process is not analyzing anything - it is only running to service requests from the hub (for example, requests for source code listings).

◆ INCREMENTAL

const analysis_mode cs::analysis_mode::INCREMENTAL
static

Indicates an incremental analysis: only new and otherwise-affected parts of the program are being analyzed; state associated with no-longer-present bits of the program may be deleted.

◆ INITIALIZING

const analysis_mode cs::analysis_mode::INITIALIZING
static

The CodeSonar process always starts in this state.

If this value is returned by analysis::get_mode(), it means that the function call occurred too early to get useful information.

◆ NORMAL

const analysis_mode cs::analysis_mode::NORMAL
static

Indicates a nonincremental analysis ( INCREMENTAL_BUILD =No) or base analysis ( INCREMENTAL_BUILD =Yes and no parent analysis).


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