API
IDOMNode Class Referenceabstract

Abstract class providing the interface to basic DOM node functionality. IDOMNode is the base class for many of the other DOM node types, and defines many of the basic functions of DOM nodes. More...

#include <idomnode.h>

Inheritance diagram for IDOMNode:

Public Member Functions

virtual ~IDOMNode ()
 virtual destructor
 
virtual DOMid getDOMid () const =0
 Retrieves the node ID. More...
 
virtual void setDOMid (DOMid id)=0
 Sets the node ID. More...
 
virtual eDOMNodeType getNodeType () const =0
 Retrieves the DOM node type. More...
 
virtual bool getProperty (const EDLSysString &propertyName, PValue &propertyValue) const =0
 Retrieves the value of a property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on. More...
 
virtual bool setProperty (const EDLSysString &propertyName, const PValue &propertyValue)=0
 Sets the value of a property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on. More...
 
virtual void removeProperty (const EDLSysString &propertyName)=0
 Removes property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on. More...
 
virtual IEDLSysStringCollectionEnumPtr getPropertyCollectionEnum ()=0
 Retrieves a navigable list of the property names stored on this node. More...
 
virtual bool hasChildNodes () const =0
 Function that indicates whether this node is a parent to other nodes. More...
 
virtual IDOMNodePtr getParentNode () const =0
 Gets the parent node of this node. More...
 
virtual IDOMNodePtr getFirstChild () const =0
 Gets the first child node of this node. More...
 
virtual IDOMNodePtr getLastChild () const =0
 Gets the last child node of this node. More...
 
virtual IDOMNodePtr getNextChild (IDOMNodePtr &child) const =0
 Gets the child node which follows the node passed in. More...
 
virtual IDOMNodePtr getPreviousChild (IDOMNodePtr &child) const =0
 Gets the child node which precedes the node passed in. More...
 
virtual IDOMNodePtr getPreviousSibling () const =0
 Retrieves the node's previous sibling node. More...
 
virtual IDOMNodePtr getNextSibling () const =0
 Retrieves node's next sibling node. More...
 
virtual bool appendChild (const IDOMNodePtr &child)=0
 Appends a node to the end of the node's child list. More...
 
virtual bool insertChild (const IDOMNodePtr &ptrPreviousSibling, const IDOMNodePtr &child, bool bCheckComplete=true)=0
 Insert a child node after ptrPreviousSibling. More...
 
virtual IDOMNodePtr extractChild (const IDOMNodePtr &child)=0
 Extracts (that is, finds and removes) a child node from the node children. After extraction the child node is no longer a part of the DOM. If no node is specified, the first available node will be extracted from the node's children. More...
 
virtual bool replaceChild (const IDOMNodePtr &oldChild, const IDOMNodePtr &newChild)=0
 Replaces the child node with another. More...
 
virtual bool isComplete () const =0
 Signals the completeness of the node. A complete node is one that has no more children to be added to it. More...
 
virtual void setComplete ()=0
 Sets the node's completeness status to "true".
 
virtual IDOMNodeFlagsgetFlags ()=0
 Retrieves the node's flags property. More...
 
virtual bool setParentNode (const IDOMNodePtr &ptrParent)=0
 Sets the parent node. More...
 
virtual bool setPreviousSibling (const IDOMNodePtr &ptrPreviousSibling)=0
 Sets the previous sibling node. More...
 
virtual bool setNextSibling (const IDOMNodePtr &ptrNextSibling)=0
 Sets the next sibling node. More...
 
virtual bool isAncestor (const IDOMNodePtr &ptrCandidate)=0
 Function tests whether a candidate node is a descendant of the node. More...
 
virtual bool getBounds (FRect &bounds, bool applyTransform=true, bool applyClip=true)
 Find the conservative bounding box of the marking content of the node. More...
 
virtual FRect getBounds (bool applyTransform=true, bool applyClip=true)=0
 Exception-throwing version of getBounds(). A convenience. An exception of type IEDLError is thrown on failure.
 
virtual bool copyNodeData (IDOMNode *pSourceNode)=0
 Copy the properties collection, the flags and the DOM ID from the given source node to this one. More...
 
virtual IDOMNodePtr cloneNode (IEDLClassFactory *pFactory) const =0
 Simpified node cloning. An exception of type IEDLError will be thrown on failure. More...
 
virtual IDOMNodePtr cloneTree (IEDLClassFactory *pFactory) const =0
 Clone the tree of nodes beginning at this node. An exception of type IEDLError will be thrown on failure. More...
 
virtual void cloneTreeAndAppend (IEDLClassFactory *pFactory, const IDOMNodePtr &dest) const =0
 Clone the tree of nodes beginning at this node, and append the result to the destination tree. An exception of type IEDLError will be thrown on failure. More...
 
virtual void completeTree ()=0
 Mark the entire tree from this point as complete. An exception of type IEDLError will be thrown on failure. You should not ordinarily need to call this function.
 
virtual void removeCompleteFlagFromTree ()=0
 Mark the entire tree from this point as complete. An exception of type IEDLError will be thrown on failure. You should not ordinarily need to call this function.
 
virtual void findChildrenOfType (eDOMNodeType type, CEDLVector< IDOMNodePtr > &nodes, bool searchForms=false)=0
 Find all children of this node with the given type, appending to the given vector. Does not descend into brushes. More...
 
virtual void walkTree (WalkTreeFunc func, void *priv, bool descendIntoBrushes=false, bool descendIntoForms=false)=0
 Walk through the DOM calling a given function on each node. The function is allowed to: More...
 
- Public Member Functions inherited from IEDLObject
virtual const CClassIDgetClassID () const =0
 Returns class ID of IEDLObject. More...
 
virtual bool init (CClassParams *pData)
 The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. More...
 
virtual bool clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
 Create a copy of EDLObject. More...
 
- Public Member Functions inherited from IRCObject
virtual void addRef ()=0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef ()=0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. More...
 

Static Public Member Functions

static EDL_API FMatrix effectiveTransformationOfNode (const IDOMNodePtr &node)
 Attempt to find the effective transformation matrix external to the given node relative to either a containing page or ultimate parent. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Abstract class providing the interface to basic DOM node functionality. IDOMNode is the base class for many of the other DOM node types, and defines many of the basic functions of DOM nodes.

Member Function Documentation

◆ appendChild()

virtual bool IDOMNode::appendChild ( const IDOMNodePtr &  child)
pure virtual

Appends a node to the end of the node's child list.

Parameters
Thechild node to append.
Returns
bool. Returns true on success, false if the call fails.

◆ cloneNode()

virtual IDOMNodePtr IDOMNode::cloneNode ( IEDLClassFactory pFactory) const
pure virtual

Simpified node cloning. An exception of type IEDLError will be thrown on failure.

Parameters
pFactoryThe edl class factory.
Returns
IDOMNodePtr The cloned node.

◆ cloneTree()

virtual IDOMNodePtr IDOMNode::cloneTree ( IEDLClassFactory pFactory) const
pure virtual

Clone the tree of nodes beginning at this node. An exception of type IEDLError will be thrown on failure.

Parameters
pFactoryThe edl class factory.
Returns
IDOMNodePtr The cloned node.

◆ cloneTreeAndAppend()

virtual void IDOMNode::cloneTreeAndAppend ( IEDLClassFactory pFactory,
const IDOMNodePtr &  dest 
) const
pure virtual

Clone the tree of nodes beginning at this node, and append the result to the destination tree. An exception of type IEDLError will be thrown on failure.

Parameters
pFactoryThe edl class factory.
destThe destination node

◆ copyNodeData()

virtual bool IDOMNode::copyNodeData ( IDOMNode pSourceNode)
pure virtual

Copy the properties collection, the flags and the DOM ID from the given source node to this one.

Parameters
ptrSourceNodeSmart pointer to the source node.
Returns
bool. Returns true on success, false if the call fails.

◆ effectiveTransformationOfNode()

static EDL_API FMatrix IDOMNode::effectiveTransformationOfNode ( const IDOMNodePtr &  node)
static

Attempt to find the effective transformation matrix external to the given node relative to either a containing page or ultimate parent.

Parameters
renderTransformA reference to receive the transform.

◆ extractChild()

virtual IDOMNodePtr IDOMNode::extractChild ( const IDOMNodePtr &  child)
pure virtual

Extracts (that is, finds and removes) a child node from the node children. After extraction the child node is no longer a part of the DOM. If no node is specified, the first available node will be extracted from the node's children.

Parameters
childA pointer to the child node to extract. If set to NULL, the first available child node will be extracted.
Returns
IDOMNodePtr. Returns a smart pointer to the extracted child node.

◆ findChildrenOfType()

virtual void IDOMNode::findChildrenOfType ( eDOMNodeType  type,
CEDLVector< IDOMNodePtr > &  nodes,
bool  searchForms = false 
)
pure virtual

Find all children of this node with the given type, appending to the given vector. Does not descend into brushes.

Parameters
typethe type of node to find
nodesVector to receive the found nodes.
searchFormsIf true search inside forms referenced from form instance nodes.

◆ getBounds()

virtual bool IDOMNode::getBounds ( FRect &  bounds,
bool  applyTransform = true,
bool  applyClip = true 
)
inlinevirtual

Find the conservative bounding box of the marking content of the node.

For composite objects such as canvases and pages, this function will recurse through its current children.

Parameters
boundsA reference to an FRect object to receive the bounding box.
applyTransformControls whether or not the receiver's RenderTransform is applied to the bounds (if it has one) Passing true (default) gives you results in the coordinate space of the object enclosing the receiver, while passing false will give you results in the coordinate space active inside the object.
applyClipControls whether or not the receiver's Clip is applied to the bounds (if it has a clip). This parameter only applies to the current node clip path, it does not apply to child nodes. It is generally used to test if the current nodes clip path is effective.
Returns
bool. Returns true on success, false if the call fails.

◆ getDOMid()

virtual DOMid IDOMNode::getDOMid ( ) const
pure virtual

Retrieves the node ID.

Returns
DOMid. Returns the numeric value use to uniquely identify the node.

◆ getFirstChild()

virtual IDOMNodePtr IDOMNode::getFirstChild ( ) const
pure virtual

Gets the first child node of this node.

Returns
IDOMNodePtr. Returns a smart pointer to the first child node.

◆ getFlags()

virtual IDOMNodeFlags* IDOMNode::getFlags ( )
pure virtual

Retrieves the node's flags property.

Returns
IDOMNodeFlags. Returns a pointer to the node's flags property.

◆ getLastChild()

virtual IDOMNodePtr IDOMNode::getLastChild ( ) const
pure virtual

Gets the last child node of this node.

Returns
IDOMNodePtr. Returns a smart pointer to the last child node.

◆ getNextChild()

virtual IDOMNodePtr IDOMNode::getNextChild ( IDOMNodePtr &  child) const
pure virtual

Gets the child node which follows the node passed in.

Parameters
childThe "current" child node; the node whose next sibling is required.
Returns
IDOMNodePtr Smart pointer to the next child node. If the child node passed in was the last one under the node, returns a smart pointer to the node's first child.

◆ getNextSibling()

virtual IDOMNodePtr IDOMNode::getNextSibling ( ) const
pure virtual

Retrieves node's next sibling node.

Returns
IDOMNodePtr Returns a smart pointer to the node's next sibling.

◆ getNodeType()

virtual eDOMNodeType IDOMNode::getNodeType ( ) const
pure virtual

Retrieves the DOM node type.

See also
eDOMNodeType
Returns
eDOMNodeType Returns the DOM node type.

◆ getParentNode()

virtual IDOMNodePtr IDOMNode::getParentNode ( ) const
pure virtual

Gets the parent node of this node.

Returns
IDOMNodePtr. Returns a smart pointer to the parent node.

◆ getPreviousChild()

virtual IDOMNodePtr IDOMNode::getPreviousChild ( IDOMNodePtr &  child) const
pure virtual

Gets the child node which precedes the node passed in.

Parameters
childThe "current" child node; the node whose previous sibling is required.
Returns
IDOMNodePtr Smart pointer to the previous child node. If the child node passed in was the last one under the node, returns a smart pointer to the node's last child.

◆ getPreviousSibling()

virtual IDOMNodePtr IDOMNode::getPreviousSibling ( ) const
pure virtual

Retrieves the node's previous sibling node.

Returns
IDOMNodePtr Returns a smart pointer to the node's previous sibling.

◆ getProperty()

virtual bool IDOMNode::getProperty ( const EDLSysString &  propertyName,
PValue propertyValue 
) const
pure virtual

Retrieves the value of a property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on.

Parameters
propertyNameThe name of the property.
propertyValueSmart pointer to receive the value of the property.
Returns
bool Returns true on success, false if the call fails.

◆ getPropertyCollectionEnum()

virtual IEDLSysStringCollectionEnumPtr IDOMNode::getPropertyCollectionEnum ( )
pure virtual

Retrieves a navigable list of the property names stored on this node.

Returns
IEDLSysStringCollectionEnumPtr. Returns a smart pointer to the property names list.

◆ hasChildNodes()

virtual bool IDOMNode::hasChildNodes ( ) const
pure virtual

Function that indicates whether this node is a parent to other nodes.

Returns
bool Returns true if the node has child nodes, false if it does not.

◆ insertChild()

virtual bool IDOMNode::insertChild ( const IDOMNodePtr &  ptrPreviousSibling,
const IDOMNodePtr &  child,
bool  bCheckComplete = true 
)
pure virtual

Insert a child node after ptrPreviousSibling.

Parameters
ptrPreviousSiblingSmart pointer to the previous sibling node. If ptrPreviousSibling is NULL then child will be inserted as the first node
childThe child node to insert.
bCheckCompleteIf false insert node even if parent is complete.
Returns
bool. Returns true on success, false if the call fails.

◆ isAncestor()

virtual bool IDOMNode::isAncestor ( const IDOMNodePtr &  ptrCandidate)
pure virtual

Function tests whether a candidate node is a descendant of the node.

Parameters
ptrCandidateSmart pointer to the candidate node.
Returns
bool Returns true if ptrCandidate is a descendant of this node.

◆ isComplete()

virtual bool IDOMNode::isComplete ( ) const
pure virtual

Signals the completeness of the node. A complete node is one that has no more children to be added to it.

Returns
bool Returns true if the node is complete, false if the node is incomplete.

◆ removeProperty()

virtual void IDOMNode::removeProperty ( const EDLSysString &  propertyName)
pure virtual

Removes property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on.

Parameters
propertyNameThe name of the property.

◆ replaceChild()

virtual bool IDOMNode::replaceChild ( const IDOMNodePtr &  oldChild,
const IDOMNodePtr &  newChild 
)
pure virtual

Replaces the child node with another.

Parameters
oldChildPointer to the child node to be replaced.
newChildPointer to the replacing node.
Returns
bool. Returns true on success, false if the call fails.

◆ setDOMid()

virtual void IDOMNode::setDOMid ( DOMid  id)
pure virtual

Sets the node ID.

Parameters
DOMidid The new DOM ID for the node.

◆ setNextSibling()

virtual bool IDOMNode::setNextSibling ( const IDOMNodePtr &  ptrNextSibling)
pure virtual

Sets the next sibling node.

Parameters
ptrNextSiblingSmart pointer to the new next sibling node.
Returns
bool. Returns true on success, false if the call fails.

◆ setParentNode()

virtual bool IDOMNode::setParentNode ( const IDOMNodePtr &  ptrParent)
pure virtual

Sets the parent node.

Parameters
parentPtrSmart pointer to the new parent node.
Returns
bool. Returns true on success, false if the call fails.

◆ setPreviousSibling()

virtual bool IDOMNode::setPreviousSibling ( const IDOMNodePtr &  ptrPreviousSibling)
pure virtual

Sets the previous sibling node.

Parameters
ptrPreviousSiblingSmart pointer to the new previous sibling node.
Returns
bool. Returns true on success, false if the call fails.

◆ setProperty()

virtual bool IDOMNode::setProperty ( const EDLSysString &  propertyName,
const PValue propertyValue 
)
pure virtual

Sets the value of a property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on.

Parameters
propertyNameThe name of the property.
propertyValueThe new value for the property.
Returns
bool Returns true on success, false if the call fails.

◆ walkTree()

virtual void IDOMNode::walkTree ( WalkTreeFunc  func,
void *  priv,
bool  descendIntoBrushes = false,
bool  descendIntoForms = false 
)
pure virtual

Walk through the DOM calling a given function on each node. The function is allowed to:

  • edit or inspect the node in any way
  • replace the node (via parent->replaceNode())
  • remove the node (via parent->extractChild())
  • edit or modify the node's children in any way However the result is undefined if the nodes siblings are removed or reordered. Keep in mind that if a node within a brush or form is altered, all uses of that brush or form will see the change.
Parameters
funcThe function to be called for each node. Return false from this function if you wish to stop the walking. It is also safe to throw exceptions from this function.
privA bare pointer that is passed to func for each call.
descendIntoBrushesIf true, the walker will descend into composite brushes, only once per invokation.
descentIntoFormsIf true, the walker will descend into forms, only once per invokation.

The documentation for this class was generated from the following file: