Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

sedris::seSearchIterator Class Reference
[Utility Classes]

#include <seSearchIterator.h>

List of all members.

Public Member Functions

 seSearchIterator ()
 Constructor.

virtual ~seSearchIterator ()
 Destructor.

void start (seObject &start_obj, SE_DRM_Class filter)
bool getNext (seObject &ret_obj)

Protected Member Functions

bool mayHaveIt (seObject &obj)
 Returns true if the object may have a matching component.

void push_hierarchy (seObject &root_obj)
 Pushes an object's hierarchy on the stack.


Protected Attributes

std::stack< seIterator_iter_stack
 The stack of iterators that need to be searched.

SE_DRM_Class _filter
 The DRM class to match the objects agains.


Detailed Description

seSearchIterator is an iterator for getting at all the objects of a specific type in an object's component hierarchy. Sample usage:
    seSearchIterator iter;
    seObject obj;

    ...
    iter.start(some_obj, SE_DRM_CLS_POLYGON);
    while (iter.getNext(obj))
    {
        obj.print();
    }
Note:
The filter class MUST be a valid DRM class (not SE_DRM_CLS_NULL).

Iteration is done depth first.

Author:
Warren Macchi (Accent Geographic)
Version:
1.0
See also:
seIterator


Constructor & Destructor Documentation

sedris::seSearchIterator::seSearchIterator  )  [inline]
 

virtual sedris::seSearchIterator::~seSearchIterator  )  [inline, virtual]
 


Member Function Documentation

bool sedris::seSearchIterator::getNext seObject ret_obj  )  [inline]
 

Retrieve the next object matching the search criteria.

Note:
Component objects have priority over link objects. Hence, if both a component and a link object match the search criteria, the link object will be skipped and never returned.
Parameters:
ret_obj out: the next matching object
Returns:
true if a matching object was found

bool sedris::seSearchIterator::mayHaveIt seObject obj  )  [inline, protected]
 

void sedris::seSearchIterator::push_hierarchy seObject root_obj  )  [inline, protected]
 

void sedris::seSearchIterator::start seObject start_obj,
SE_DRM_Class  filter
[inline]
 

Reset the iterator to start at a specified object.

Note:
The start_obj is NOT returned by the iterator (unless it has been added as a component of an object in the hierarchy below it, which would create an infinite loop in the iteration).
Parameters:
start_obj in: the start object
filter in (optional): a DRM class to filter by


Member Data Documentation

SE_DRM_Class sedris::seSearchIterator::_filter [protected]
 

std::stack<seIterator> sedris::seSearchIterator::_iter_stack [protected]
 


The documentation for this class was generated from the following file:
SEDRIS Transmittal Access C++ API 4.0.0 beta - 14 Jul 2004
Copyright © 2004 SEDRIS Docs by Doxygen 1.3.2