NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | List of all members
CTypeIterator< C, TypeGetter > Class Template Reference

Search Toolkit Book for CTypeIterator

Template class for iteration on objects of class C. More...

#include <serial/iterator.hpp>

+ Inheritance diagram for CTypeIterator< C, TypeGetter >:
+ Collaboration diagram for CTypeIterator< C, TypeGetter >:

Public Types

using iterator_category = forward_iterator_tag
using value_type = C
using difference_type = ptrdiff_t
using pointer = C *
using reference = C &
typedef CParent::TBeginInfo TBeginInfo
- Public Types inherited from CTreeIterator
enum  EAction { eCont , eStop , eSkip }
typedef CParent::TObjectInfo TObjectInfo
typedef CParent::TBeginInfo TBeginInfo
typedef EAction(* ForEachFunc) (CTreeContNodeBase *pNode, void *user_data)
- Public Types inherited from CTreeIteratorTmpl< CTreeLevelIterator >
typedef LevelIterator::TObjectInfo TObjectInfo
typedef LevelIterator::TBeginInfo TBeginInfo
typedef set< TConstObjectPtrTVisitedObjects
typedef list< pair< typename LevelIterator::TObjectInfo, const CItemInfo * > > TIteratorContext

Public Member Functions

 CTypeIterator (void)
 CTypeIterator (const TBeginInfo &beginInfo)
 CTypeIterator (const TBeginInfo &beginInfo, const string &filter)
 CTypeIterator (CSerialObject &object)
CTypeIterator< C, TypeGetter > & operator= (const TBeginInfo &beginInfo)
Coperator* (void)
const Coperator* (void) const
Coperator-> (void)
const Coperator-> (void) const
 CTypeIterator (const CTypeIterator &it)
CTypeIteratoroperator= (const CTypeIterator &it)
CTypeIteratorbegin (void)
CTypeIterator end (void)
CTypeIteratoroperator++ (void)
CTypeIterator operator++ (int)
bool operator== (const CTypeIterator &it) const
bool operator!= (const CTypeIterator &it) const
- Public Member Functions inherited from CTreeIterator
 CTreeIterator (void)
 CTreeIterator (const TBeginInfo &beginInfo)
 CTreeIterator (const TBeginInfo &beginInfo, const string &filter)
CTreeIteratoroperator= (const TBeginInfo &beginInfo)
void Erase (void)
 Delete currently pointed object (throws exception if failed) More...
void GoRoot ()
bool GoParent ()
bool GoChild ()
bool GoSibling ()
bool GoNode (CTreeContNodeBase *node)
bool GoAncestor (CTreeContNodeBase *node)
EAction ForEachDownward (ForEachFunc ucb, void *user_data)
EAction ForEachDownward (C4Each &)
EAction ForEachDownwardLimited (ForEachFunc ucb, void *user_data, int levels)
EAction ForEachDownwardLimited (C4Each &, int levels)
EAction ForEachUpward (ForEachFunc ucb, void *user_data)
EAction ForEachUpward (C4Each &)
EAction ForEachUpwardLimited (ForEachFunc ucb, void *user_data, int levels)
EAction ForEachUpwardLimited (C4Each &, int levels)
bool AddChild (CTreeContNodeBase *new_node)
bool AddSibling (CTreeContNodeBase *new_node)
bool AddChild (CTreeContNodeBase *new_node, CSortPredicate &)
void SortChildren (CSortPredicate &)
void SortAllChildrenInSubtree (CSortPredicate &)
bool DeleteNode ()
bool DeleteSubtree ()
bool MoveNode (CTreeContNodeBase *to_node)
bool MoveChildren (CTreeContNodeBase *to_node)
bool Merge (CTreeContNodeBase *to_node)
void NodeUpdated ()
CTreeContNodeBaseGetNode () const
bool BelongSubtree (const CTreeContNodeBase *subtree_root)
bool AboveNode (CTreeContNodeBase *node)
 CTreeIterator (CTreeCont *tree)
 ~CTreeIterator ()
- Public Member Functions inherited from CTreeIteratorTmpl< CTreeLevelIterator >
 CTreeIteratorTmpl (void)
 CTreeIteratorTmpl (const TBeginInfo &beginInfo)
 CTreeIteratorTmpl (const TBeginInfo &beginInfo, const string &filter)
virtual ~CTreeIteratorTmpl (void)
TObjectInfoGet (void)
 Get information about current object. More...
const TObjectInfoGet (void) const
 Get information about current object. More...
TTypeInfo GetCurrentTypeInfo (void) const
 Get type information of current object. More...
void Reset (void)
 Reset iterator to initial state. More...
void Next (void)
void SkipSubTree (void)
bool IsValid (void) const
TThisoperator++ (void)
 Go to next object. More...
TThisoperator= (const TBeginInfo &beginInfo)
 Initialize iterator to new root of object hierarchy. More...
TIteratorContext GetContextData (void) const
 Get raw context data. More...
string GetContext (void) const
 Get context data as string. More...
bool MatchesContext (const string &filter) const
 Check context against filter. More...
void SetContextFilter (const string &filter)
 Set context filter. More...
int GetContainerElementIndex (void) const
 Return element index in STL container. More...
int GetItemIndex (void) const
 Return member index in sequence, or variant index in choice. More...

Private Types

typedef CTypeIteratorBase< CTreeIteratorCParent

Additional Inherited Members

- Protected Types inherited from CTypeIteratorBase< CTreeIterator >
typedef CParent::TBeginInfo TBeginInfo
- Protected Member Functions inherited from CTypeIteratorBase< CTreeIterator >
 CTypeIteratorBase (TTypeInfo needType)
 CTypeIteratorBase (TTypeInfo needType, const TBeginInfo &beginInfo)
 CTypeIteratorBase (TTypeInfo needType, const TBeginInfo &beginInfo, const string &filter)
virtual bool CanSelect (const CConstObjectInfo &object)
virtual bool CanEnter (const CConstObjectInfo &object)
TTypeInfo GetIteratorType (void) const
void Assign (const CTypeIteratorBase &it)
- Protected Member Functions inherited from CTreeIteratorTmpl< CTreeLevelIterator >
bool CheckValid (void) const
void Init (const TBeginInfo &beginInfo)
void Init (const TBeginInfo &beginInfo, const string &filter)
void Assign (const CTreeIteratorTmpl &it)

Detailed Description

template<class C, class TypeGetter = C>
class CTypeIterator< C, TypeGetter >

Template class for iteration on objects of class C.

Definition at line 672 of file iterator.hpp.

The documentation for this class was generated from the following file:
Modified on Sat Apr 13 11:43:16 2024 by rev. 669887