InsertionNode Class Reference

#include <insertnd.h>

Inheritance diagram for InsertionNode:

Node CCObject SimpleCCObject List of all members.

Public Member Functions

 InsertionNode (Document *pownerDoc)
 ~InsertionNode ()
 This destructor was added by Simon 28/10/95 to solve a problem with Insertion Nodes being destroyed. If a layer is deleted which contains an Insertion Node (This can occur when throwing away undo info) then we must inform the document containing the InsertionNode, so that it can NULLIFY it's pointer to it.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual BOOL IsAnInsertionNode () const

Protected Member Functions

virtual NodeSimpleCopy ()
 This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.

Protected Attributes

DocumentpOwnerDoc

Detailed Description

Created: 04/07/94 Author: Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com> Purpose: The insertion node is used to locate the position in the tree where new objects are inserted. A pointer to the insertion node is stored in the Document object.

There will be only one instance of an InsertionNode in each camelot document. It will live as a last child of the the selected spread's active layer.

Definition at line 123 of file insertnd.h.


Constructor & Destructor Documentation

InsertionNode::InsertionNode Document pownerDoc  )  [inline]
 

Definition at line 128 of file insertnd.h.

00128 : Node() { pOwnerDoc = pownerDoc; };

InsertionNode::~InsertionNode  ) 
 

This destructor was added by Simon 28/10/95 to solve a problem with Insertion Nodes being destroyed. If a layer is deleted which contains an Insertion Node (This can occur when throwing away undo info) then we must inform the document containing the InsertionNode, so that it can NULLIFY it's pointer to it.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/10/95

Definition at line 179 of file insertnd.cpp.

00180 {
00181     ERROR3IF(!pOwnerDoc, "InsertionNode Has no owner doc"); 
00182     if (pOwnerDoc)
00183     {
00184         pOwnerDoc->InsertionNodeDying();
00185     }       
00186 }


Member Function Documentation

UINT32 InsertionNode::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 159 of file insertnd.cpp.

00160 {     
00161     return (sizeof(InsertionNode)); 
00162 }   

virtual BOOL InsertionNode::IsAnInsertionNode  )  const [inline, virtual]
 

Reimplemented from Node.

Definition at line 131 of file insertnd.h.

00131 { return TRUE; }

Node * InsertionNode::SimpleCopy void   )  [protected, virtual]
 

This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
04/07/94
Parameters:
- [INPUTS]
[OUTPUTS] 
Returns:
A copy of the node, or NULL if memory runs out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL.

Scope: protected

Reimplemented from Node.

Definition at line 134 of file insertnd.cpp.

00135 {
00136     ERROR3("InsertionNode SimpleCopy called, is this good ???"); 
00137     InsertionNode* NodeCopy; 
00138     NodeCopy = new InsertionNode(pOwnerDoc);       
00139     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
00140     CopyNodeContents(NodeCopy);   
00141     return (NodeCopy);
00142 }   


Member Data Documentation

Document* InsertionNode::pOwnerDoc [protected]
 

Definition at line 134 of file insertnd.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:30 2007 for Camelot by  doxygen 1.4.4