< DOMVisitor > Protocol Reference

Inheritance diagram for < DOMVisitor >:

DOMFormatter DOMXIncludeResolver List of all members.

Detailed Description

Formal declaration of the visitor pattern.

A visitor may or may not conform to this protocol, ideally all visitors should, but in the spirit of Objective-C, this can be seen as an informal protocol. A visitor may choose to only implement parts of this protocol, it will not visit the node types for which it doesn't respond to a message for. A visitor must, however, respond to the visitUnknownNode:userInfo: message.


Public Member Functions

(void)  visitDocumentNode:userInfo:
(void)  visitCDATASectionNode:userInfo:
(void)  visitCommentNode:userInfo:
(void)  visitDocTypeNode:userInfo:
(void)  visitDocumentFragmentNode:userInfo:
(void)  visitElementNode:userInfo:
(void)  visitProcessingInstructionNode:userInfo:
(void)  visitTextNode:userInfo:
(void)  visitUnknownNode:userInfo:

Member Function Documentation

- (void) visitCDATASectionNode: (id< DOMCDATASection >)  cdata
userInfo: (id)  userInfo
 
 

- (void) visitCommentNode: (id< DOMComment >)  comment
userInfo: (id)  userInfo
 
 

- (void) visitDocTypeNode: (id< DOMDocType >)  docType
userInfo: (id)  userInfo
 
 

- (void) visitDocumentFragmentNode: (id< DOMDocumentFragment >)  fragment
userInfo: (id)  userInfo
 
 

- (void) visitDocumentNode: (id< DOMDocument >)  document
userInfo: (id)  userInfo
 
 

- (void) visitElementNode: (id< DOMElement >)  element
userInfo: (id)  userInfo
 
 

- (void) visitProcessingInstructionNode: (id< DOMProcessingInstruction >)  pi
userInfo: (id)  userInfo
 
 

- (void) visitTextNode: (id< DOMText >)  text
userInfo: (id)  userInfo
 
 

- (void) visitUnknownNode: (id< DOMNode >)  node
userInfo: (id)  userInfo
 
 

Used if node type can not be determined (which, in most cases, is an error), or if the reciever does not implement any of the specific node type visit methods.

Not called visitNode:userInfo: since there is a delegate method for DOMTraversal with that name, and a traversal delegate is often a visitor as well.