#include <ngiter.h>
Inheritance diagram for NodeScan:
Public Member Functions | |
NodeScan (Source *ps) | |
Constructs an NodeScan object. | |
virtual | ~NodeScan () |
Destroys an NodeScan object. | |
BOOL | Scan () |
Scans through the 'selected' document's tree extracting Nodes and calling the polymorphic Do function with them. | |
Protected Member Functions | |
virtual BOOL | Pre () |
Default override called by NodeScan::Scan prior to scanning the document. | |
virtual BOOL | Do (Node *pNode)=0 |
virtual BOOL | Post () |
Default override called by NodeScan::Scan prior to scanning the document. | |
Private Attributes | |
Source * | m_pSource |
Classes | |
class | Source |
Abstract base class for interfaces to SelRanges, Document trees etc whose nodes can be scanned over. Notes: If your derived class defines data members then remember to define a copy constructor and consider concurrency issues! More... |
Definition at line 122 of file ngiter.h.
|
Constructs an NodeScan object.
Definition at line 209 of file ngiter.cpp. 00210 : m_pSource(ps) 00211 { 00212 // Empty. 00213 }
|
|
Destroys an NodeScan object.
Definition at line 225 of file ngiter.cpp.
|
|
Implemented in BaseSelectScan, AllowOpScan, AllowOpSingleScan, ApplyScan, ApplySingleScan, ApplyPropScan, HideScan, HidePropScan, HideSingleScan, and CreateDisplayScan. |
|
Default override called by NodeScan::Scan prior to scanning the document.
Reimplemented in BaseSelectScan, and CreateDisplayScan. Definition at line 191 of file ngiter.cpp. 00192 { 00193 return TRUE; 00194 }
|
|
Default override called by NodeScan::Scan prior to scanning the document.
Reimplemented in BaseSelectScan, and CreateDisplayScan. Definition at line 175 of file ngiter.cpp. 00176 { 00177 return TRUE; 00178 }
|
|
Scans through the 'selected' document's tree extracting Nodes and calling the polymorphic Do function with them.
Definition at line 146 of file ngiter.cpp. 00147 { 00148 // Call Pre() before the scan. 00149 if (!Pre()) return FALSE; 00150 00151 // Perform the appropriate type of scan. 00152 for (Node* pNode = m_pSource->GetFirst(); 00153 pNode != 0; 00154 pNode = m_pSource->GetNext(pNode)) 00155 { 00156 // NB. Post() not called if scan fails. 00157 if (!Do(pNode)) return FALSE; 00158 } 00159 00160 // Call Post() after a successful scan. 00161 return Post(); 00162 }
|
|
|