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

An iterator over the callee procedures (procedure) from a specific point, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable. More...

Public Types

typedef const procedureconst_pointer
 const pointer to the type of the iterator elements. More...
 
typedef const procedureconst_reference
 const reference to the type of the iterator elements. More...
 
typedef cs_ssize_t difference_type
 Type of distance between iterators. More...
 
typedef std::forward_iterator_tag iterator_category
 Iterator is a ForwardIterator. More...
 
typedef procedurepointer
 Pointer to the type of the iterator elements. More...
 
typedef procedurereference
 Reference to the type of the iterator elements. More...
 

Public Member Functions

 point_adjusted_callees_iterator (const point_adjusted_callees_iterator &other)
 Copy constructor. More...
 
void advance ()
 Advance the iterator by one position. More...
 
std::string as_repr () const
 Get a representation of the iterator that includes information useful for debugging. More...
 
std::string as_string () const
 Get a simple string representation of the iterator. More...
 
bool at_end () const
 Check: is the iterator at the end of the structure? More...
 
bool operator!= (const point_adjusted_callees_iterator &other) const
 Iterator inequality. More...
 
procedure operator* () const
 Iterator dereference operator. More...
 
point_adjusted_callees_iteratoroperator++ ()
 Advance the iterator. More...
 
point_adjusted_callees_iteratoroperator= (point_adjusted_callees_iterator other)
 Iterator assignment operator. More...
 
bool operator== (const point_adjusted_callees_iterator &other) const
 Iterator equality. More...
 
void swap (point_adjusted_callees_iterator &other)
 Exchange the contents of this and other. More...
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

An iterator over the callee procedures (procedure) from a specific point, taking into account any translations incurred by csonar_replace_*() calls and the FUNCTION_MAP configuration file variable.

Calls may be direct or indirect.

Initialize with point::adjusted_callees().

Use as you would any other C++ iterator. For example:

// set up point pt, then...
for (cs::point_adjusted_callees_iterator it = pt.adjusted_callees(); !it.at_end(); ++it){
std::cout << "procedure: " << *it;
}

Member Typedef Documentation

◆ const_pointer

typedef const procedure* cs::point_adjusted_callees_iterator::const_pointer
inherited

const pointer to the type of the iterator elements.

◆ const_reference

typedef const procedure& cs::point_adjusted_callees_iterator::const_reference
inherited

const reference to the type of the iterator elements.

◆ difference_type

typedef cs_ssize_t cs::point_adjusted_callees_iterator::difference_type
inherited

Type of distance between iterators.

◆ iterator_category

typedef std::forward_iterator_tag cs::point_adjusted_callees_iterator::iterator_category
inherited

Iterator is a ForwardIterator.

◆ pointer

typedef procedure* cs::point_adjusted_callees_iterator::pointer
inherited

Pointer to the type of the iterator elements.

◆ reference

typedef procedure& cs::point_adjusted_callees_iterator::reference
inherited

Reference to the type of the iterator elements.

Constructor & Destructor Documentation

◆ point_adjusted_callees_iterator()

cs::point_adjusted_callees_iterator::point_adjusted_callees_iterator ( const point_adjusted_callees_iterator other)

Copy constructor.

Member Function Documentation

◆ advance()

void cs::point_adjusted_callees_iterator::advance ( )
inlineinherited

Advance the iterator by one position.

Exceptions
result::OUT_OF_ELEMENTS

◆ as_repr()

std::string cs::point_adjusted_callees_iterator::as_repr ( ) const
inlineinherited

Get a representation of the iterator that includes information useful for debugging.

Returns
The string representation.

◆ as_string()

std::string cs::point_adjusted_callees_iterator::as_string ( ) const
inlineinherited

Get a simple string representation of the iterator.

Returns
The string representation.

◆ at_end()

bool cs::point_adjusted_callees_iterator::at_end ( ) const
inlineinherited

Check: is the iterator at the end of the structure?

Returns
true if the iterator is at the end of the structure (there are no more elements to iterate over), false otherwise.

◆ operator!=()

bool cs::point_adjusted_callees_iterator::operator!= ( const point_adjusted_callees_iterator other) const
inlineinherited

Iterator inequality.

Parameters
[in]otherThe iterator to compare against.
Returns
false if and only if this and other are at the same position. Behavior is undefined if this and other are not iterating over the same collection.

◆ operator*()

cs::point_adjusted_callees_iterator::operator* ( ) const

Iterator dereference operator.

Returns
The element at the current iterator position.
Exceptions
result::OUT_OF_ELEMENTSif the iterator is at the end of the container.
result::ERROR_INVALID_PHASE_FOR_OPERATIONif the iterator was initialized before the beginning of the serial depth-first traversal.
result::ERROR_NOT_A_CALL_SITEif the iterator was initialized with respect to a point that is not a call site, or with respect to a direct call site whose callee procedure could not be determined.

◆ operator++()

point_adjusted_callees_iterator& cs::point_adjusted_callees_iterator::operator++ ( )
inlineinherited

Advance the iterator.

Exceptions
result::OUT_OF_ELEMENTSif the iterator is at the end of the container.

◆ operator=()

point_adjusted_callees_iterator& cs::point_adjusted_callees_iterator::operator= ( point_adjusted_callees_iterator  other)

Iterator assignment operator.

Parameters
[in]otherThe iterator to assign.
Returns
A pointer to this.

◆ operator==()

bool cs::point_adjusted_callees_iterator::operator== ( const point_adjusted_callees_iterator other) const
inlineinherited

Iterator equality.

Returns
true if and only if this and other are at the same position. Behavior is undefined if this and other are not iterating over the same collection.

◆ swap()

void cs::point_adjusted_callees_iterator::swap ( point_adjusted_callees_iterator other)
inlineinherited

Exchange the contents of this and other.

Friends And Related Function Documentation

◆ operator<<()

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

Print a representation of an point_adjusted_callees_iterator object to the specified stream.

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

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