![]() |
XII Release 0.1.0
|
Implements visitor pattern for content of the document object manager. More...
#include <DocumentObjectVisitor.h>
Public Types | |
| using | VisitorFunction = xiiDelegate<bool(const xiiDocumentObject*)> |
Public Member Functions | |
| xiiDocumentObjectVisitor (const xiiDocumentObjectManager *pManager, xiiStringView sChildrenProperty="Children", xiiStringView sRootProperty="Children") | |
| Copyright (c) Theophilus Eriata. All Rights Reserved. | |
| void | Visit (const xiiDocumentObject *pObject, bool bVisitStart, VisitorFunction function) |
Implements visitor pattern for content of the document object manager.
| xiiDocumentObjectVisitor::xiiDocumentObjectVisitor | ( | const xiiDocumentObjectManager * | pManager, |
| xiiStringView | sChildrenProperty = "Children", | ||
| xiiStringView | sRootProperty = "Children" ) |
Copyright (c) Theophilus Eriata. All Rights Reserved.
Constructor
| pManager | Manager that will be iterated through. |
| szChildrenProperty | Name of the property that is used for finding children on an object. |
| szRootProperty | Same as szChildrenProperty, but for the root object of the document. |
| void xiiDocumentObjectVisitor::Visit | ( | const xiiDocumentObject * | pObject, |
| bool | bVisitStart, | ||
| VisitorFunction | function ) |
Executes depth first traversal starting at the given node.
| pObject | Object to start traversal at. |
| bVisitStart | If true, function will be executed for the start object as well. |
| function | Functions executed for each visited object. Should true if the object's children should be traversed. |