Beispiel #1
0
/*public*/
void
NodeBase::visit(const Envelope* searchEnv, ItemVisitor& visitor)
{
	if (! isSearchMatch(*searchEnv)) return;

	// this node may have items as well as subnodes (since items may not
	// be wholely contained in any single subnode
	visitItems(searchEnv, visitor);

	for (int i = 0; i < 4; i++) {
		if (subnode[i] != NULL) {
			subnode[i]->visit(searchEnv, visitor);
		}
	}
}
Beispiel #2
0
/*public*/
void
NodeBase::visit(const Envelope* searchEnv, ItemVisitor& visitor)
{
    if(! isSearchMatch(*searchEnv)) {
        return;
    }

    // this node may have items as well as subnodes (since items may not
    // be wholly contained in any single subnode
    visitItems(searchEnv, visitor);

    for(const auto& subnode : subnodes) {
        if(subnode != nullptr) {
            subnode->visit(searchEnv, visitor);
        }
    }
}