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

A range of (contiguous) locations in a single source file instance. More...

Public Member Functions

 sfileinst_range (sfileinst _file, line_and_column_number _start, line_and_column_number _end)
 Constructor. More...
 
std::string as_repr () const
 Get a representation of a sfileinst_range object that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of a sfileinst_range object. More...
 
line_and_column_number get_end () const
 Get the end line and column number from a sfileinst_range. More...
 
sfileinst get_file () const
 Get the source file instance from a sfileinst_range. More...
 
line_and_column_number get_start () const
 Get the start line and column number from a sfileinst_range. More...
 

Friends

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

Related Functions

(Note that these are not member functions.)

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

Detailed Description

A range of (contiguous) locations in a single source file instance.

Constructor & Destructor Documentation

◆ sfileinst_range()

cs::sfileinst_range::sfileinst_range ( sfileinst  _file,
line_and_column_number  _start,
line_and_column_number  _end 
)
inline

Constructor.

Parameters
[in]_fileThe file instance (sfileinst) in which the range occurs.
[in]_startThe line and column of the first character in the range.
[in]_endThe line and column of the last character in the range.

Member Function Documentation

◆ as_repr()

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

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

Returns
The string representation.

◆ as_string()

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

Get a simple string representation of a sfileinst_range object.

Returns
The string representation.

◆ get_end()

line_and_column_number cs::sfileinst_range::get_end ( ) const
inline

Get the end line and column number from a sfileinst_range.

Returns
The end line and column number.

◆ get_file()

sfileinst cs::sfileinst_range::get_file ( ) const
inline

Get the source file instance from a sfileinst_range.

Returns
The source file instance (sfileinst).

◆ get_start()

line_and_column_number cs::sfileinst_range::get_start ( ) const
inline

Get the start line and column number from a sfileinst_range.

Returns
The start line and column number.

Friends And Related Function Documentation

◆ operator<<()

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

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

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

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