CodeSonar C++ API
[For improved navigation, enable JavaScript.]
Public Member Functions | Related Functions | List of all members
cs::cfg_path_node Class Reference

A node on a CFG path. More...

Public Member Functions

 cfg_path_node (point _pnt, edge_label _edge, const std::string &_event, cfg_path_node_flags _flags)
 Constructor. More...
 
 cfg_path_node (point _pnt, const std::string &_event, cfg_path_node_flags _flags)
 Constructor for use when constructing pseudo-paths for display that do not correspond to actual control flow. More...
 
std::string as_repr () const
 Get a representation of a cfg_path_node object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a cfg_path_node object. More...
 
edge_label get_edge_label () const
 Get the edge label from a cfg_path_node. More...
 
std::string get_event () const
 Get the event string from a cfg_path_node. More...
 
cfg_path_node_flags get_flags () const
 Get the flags from a cfg_path_node. More...
 
point get_source_point () const
 Get the source point from a cfg_path_node. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &out, const cfg_path_node &a)
 Print a representation of a cfg_path_node object to the specified stream. More...
 

Detailed Description

A node on a CFG path.

Used by the warningclass report() and report_return_warning() methods that report a warning with a path.

Constructor & Destructor Documentation

◆ cfg_path_node() [1/2]

cs::cfg_path_node::cfg_path_node ( point  _pnt,
edge_label  _edge,
const std::string &  _event,
cfg_path_node_flags  _flags 
)
inline

Constructor.

Parameters
[in]_pntA point on the path.
[in]_edgeThe edge label for this node (identifies an edge out of _pnt. Use cfg_path_node(point _pnt, const std::string &, cfg_path_node_flags) if there is no edge label because this does not correspond to actual control flow.
[in]_eventDescribes the problem at the point, if any. If empty, no event will be associated with this node.
[in]_flagsFlags that characterize this node.

◆ cfg_path_node() [2/2]

cs::cfg_path_node::cfg_path_node ( point  _pnt,
const std::string &  _event,
cfg_path_node_flags  _flags 
)
inline

Constructor for use when constructing pseudo-paths for display that do not correspond to actual control flow.

Parameters
[in]_pntA point on the path.
[in]_eventDescribes the problem at the point, if any. If empty, no event will be associated with this node.
[in]_flagsFlags that characterize this node.

Member Function Documentation

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a cfg_path_node object.

Returns
The string representation.

◆ get_edge_label()

edge_label cs::cfg_path_node::get_edge_label ( ) const
inline

Get the edge label from a cfg_path_node.

Returns
The node's edge_label.

◆ get_event()

std::string cs::cfg_path_node::get_event ( ) const
inline

Get the event string from a cfg_path_node.

Returns
The node's event string.

◆ get_flags()

cfg_path_node_flags cs::cfg_path_node::get_flags ( ) const
inline

Get the flags from a cfg_path_node.

Returns
The node's flags (cfg_path_node_flags).

◆ get_source_point()

point cs::cfg_path_node::get_source_point ( ) const
inline

Get the source point from a cfg_path_node.

Returns
The node's path point.

Friends And Related Function Documentation

◆ operator<<()

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

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

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

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