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

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

Static Public Member Functions

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

Static Public Attributes

static const multiprocess_mode INITIALIZING
 Every CodeSonar process always starts in this state. More...
 
static const multiprocess_mode MASTER
 Indicates that CodeSonar is running in parallel mode, and the current process is the analysis master or daemon master. More...
 
static const multiprocess_mode SERIAL
 Indicates that CodeSonar is running in serial mode (and therefore there is only one analysis process - the current one). More...
 
static const multiprocess_mode SLAVE
 Indicates that CodeSonar is running in parallel mode, and the current process is an analysis slave or daemon slave. More...
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Enumeration class describing the multiprocess mode of a CodeSonar analysis process.

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

See Parallelism in CodeSonar: Analysis for more information about multiprocess modes.

Member Function Documentation

◆ as_integer()

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

Get an integer representation of this.

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

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a multiprocess_mode object.

Returns
The string representation.

◆ cmp()

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

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

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

◆ hash()

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

Hash function for multiprocess_mode.

◆ name()

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

Get the name of a multiprocess_mode object.

Returns
The name.

Friends And Related Function Documentation

◆ operator!=()

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

Inequality operator for multiprocess_mode.

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

◆ operator<()

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

Less-than operator for multiprocess_mode.

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

◆ operator<<()

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

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

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

◆ operator<=()

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

Less-than-or-equal operator for multiprocess_mode.

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

◆ operator==()

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

Equality operator for multiprocess_mode.

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

◆ operator>()

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

Greater-than operator for multiprocess_mode.

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

◆ operator>=()

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

Greater-than-or-equal operator for multiprocess_mode.

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

Member Data Documentation

◆ INITIALIZING

const multiprocess_mode cs::multiprocess_mode::INITIALIZING
static

Every CodeSonar process always starts in this state.

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

◆ MASTER

const multiprocess_mode cs::multiprocess_mode::MASTER
static

Indicates that CodeSonar is running in parallel mode, and the current process is the analysis master or daemon master.

◆ SERIAL

const multiprocess_mode cs::multiprocess_mode::SERIAL
static

Indicates that CodeSonar is running in serial mode (and therefore there is only one analysis process - the current one).

◆ SLAVE

const multiprocess_mode cs::multiprocess_mode::SLAVE
static

Indicates that CodeSonar is running in parallel mode, and the current process is an analysis slave or daemon slave.


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