#include <ngiter.h>
Inheritance diagram for DocTreeSource:
Public Member Functions | |
DocTreeSource (BaseDocument *pDoc=0) | |
Constructs a DocTreeSource object. | |
Protected Member Functions | |
virtual Node * | GetFirst () |
Identical to Node::DocFindFirstDepthFirst but skips over hidden nodes. NB. the first node in the document tree is guaranteed to never be hidden. | |
virtual Node * | GetNext (Node *) |
Identical to Node::DocFindNextDepthFirst but skips over hidden nodes. To be precise, it doesn't follow child links for NodeHiddens. | |
Protected Attributes | |
BaseDocument * | m_pDoc |
Definition at line 194 of file ngiter.h.
|
Constructs a DocTreeSource object.
Definition at line 262 of file ngiter.cpp. 00263 : m_pDoc(pDoc) 00264 { 00265 // Empty. 00266 }
|
|
Identical to Node::DocFindFirstDepthFirst but skips over hidden nodes. NB. the first node in the document tree is guaranteed to never be hidden.
Implements NodeScan::Source. Reimplemented in SelectDocSource, and NotSelectSource. Definition at line 282 of file ngiter.cpp. 00283 { 00284 ERROR3IF(m_pDoc == 0, "DocTreeSource::GetFirst: no document"); 00285 00286 Node* pNode = m_pDoc->GetFirstNode(); 00287 if (pNode != 0 && !pNode->IsSetCandidate()) pNode = GetNext(pNode); 00288 return pNode; 00289 }
|
|
Identical to Node::DocFindNextDepthFirst but skips over hidden nodes. To be precise, it doesn't follow child links for NodeHiddens.
Implements NodeScan::Source. Reimplemented in NotSelectSource. Definition at line 312 of file ngiter.cpp. 00313 { 00314 do { 00315 if (pNode->FindNext() == 0) 00316 pNode = pNode->FindParent(); 00317 else 00318 { 00319 pNode = pNode->FindNext(); 00320 while ( !pNode->IsNodeHidden() && 00321 !pNode->IsANodeMould() && pNode->FindFirstChild() != 0 ) 00322 pNode = pNode->FindFirstChild(); 00323 } 00324 } while (pNode != 0 && !pNode->IsSetCandidate()); 00325 00326 return pNode; 00327 }
|
|
|