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

A warning instance. More...

Public Member Functions

 warning (const std::string &serialized)
 Constructor.
 
std::string as_repr () const
 Get a representation of a warning object that includes information useful for debugging.
 
std::string as_string () const
 Get a simple string representation of a warning object.
 
cs_hash_t hash () const
 Get a hash value for a warning.
 
void retract ()
 Manually retract a warning instance.
 
std::string serialize (void) const
 Serialize a warning instance.
 

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

A warning instance.

See the manual section on Warnings: Instances and Groups for more information about warning instances.

Constructor & Destructor Documentation

◆ warning()

cs::warning::warning ( const std::string &  serialized)
inline

Constructor.

Parameters
[in]serializedA serialized warning instance, as produced by serialize().
Exceptions
result::ERROR_INVALID_ARGUMENT

Member Function Documentation

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a warning object.

Returns
The string representation.

◆ hash()

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

Get a hash value for a warning.

◆ retract()

void cs::warning::retract ( )
inline

Manually retract a warning instance.

Returns
void
Exceptions
result::ELEMENT_NOT_PRESENT

Call this method in a drop phase visitor to manually retract a warning instance. Support for calling this function from visitors in other analysis phases is experimental and may be removed in future versions.

◆ serialize()

std::string cs::warning::serialize ( void  ) const
inline

Serialize a warning instance.

Returns
The serialized form of the warning instance.

Friends And Related Symbol Documentation

◆ operator<<()

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


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

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

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