Math Type Library (libmath++) 0.0.3
Public Member Functions | List of all members
math::TOperandIter< NodeType > Class Template Reference

#include <nodes.h>

Public Member Functions

 TOperandIter (NodeType *AOperator)
 
 TOperandIter (const TOperandIter< NodeType > &AProto)
 
NodeType & operator* () const
 
NodeType * operator-> () const
 
NodeType * get () const
 
TOperandIter< NodeType > & end () const
 
TOperandIter< NodeType > & operator++ ()
 

Detailed Description

template<typename NodeType>
class math::TOperandIter< NodeType >

TOperandIter<> (use TNode<>::operand_iterator and const_operand_iterator) are designed to iterate the operands of an given expression. (e.g. all summands of an plus operation)

Definition at line 151 of file nodes.h.

Constructor & Destructor Documentation

◆ TOperandIter() [1/3]

template<typename NodeType >
math::TOperandIter< NodeType >::TOperandIter ( )
inline

Definition at line 153 of file nodes.h.

153: FOrigin(0), FCurrent(0) {}

◆ TOperandIter() [2/3]

template<typename NodeType >
math::TOperandIter< NodeType >::TOperandIter ( NodeType *  AOperator)
inline

Definition at line 155 of file nodes.h.

155 : FOrigin(AOperator), FCurrent(FOrigin) {
156 do FCurrent = FCurrent->left();
157 while (inScope(FCurrent));
158 }

◆ TOperandIter() [3/3]

template<typename NodeType >
math::TOperandIter< NodeType >::TOperandIter ( const TOperandIter< NodeType > &  AProto)
inline

Definition at line 160 of file nodes.h.

160 :
161 FOrigin(AProto.FOrigin), FCurrent(AProto.FCurrent) {}

Member Function Documentation

◆ end()

template<typename NodeType >
TOperandIter< NodeType > & math::TOperandIter< NodeType >::end ( ) const
inline

Definition at line 168 of file nodes.h.

168{ return *static_cast<TOperandIter<NodeType> *>(0); }

◆ get()

template<typename NodeType >
NodeType * math::TOperandIter< NodeType >::get ( ) const
inline

Definition at line 166 of file nodes.h.

166{ return this ? FCurrent : 0; }

◆ operator*()

template<typename NodeType >
NodeType & math::TOperandIter< NodeType >::operator* ( ) const
inline

Definition at line 163 of file nodes.h.

163{ return *FCurrent; }

◆ operator++()

template<typename NodeType >
TOperandIter< NodeType > & math::TOperandIter< NodeType >::operator++ ( )
inline

Definition at line 170 of file nodes.h.

170{ increment(); return *this; }

◆ operator->()

template<typename NodeType >
NodeType * math::TOperandIter< NodeType >::operator-> ( ) const
inline

Definition at line 164 of file nodes.h.

164{ return FCurrent; }

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