MouldBecomeA Class Reference

This is the class that is passed to other nodes when the mould tool is trying to turn them into other types via their DoBecomeA() method. More...

#include <moldtool.h>

Inheritance diagram for MouldBecomeA:

BecomeA List of all members.

Public Member Functions

virtual ~MouldBecomeA ()
 Destructor for the MouldBecomeA parameter.
 MouldBecomeA (BecomeAReason Reason, CCRuntimeClass *pClass, UndoableOperation *pOp)
virtual BOOL PassBack (NodeRenderableInk *pNewNode, NodeRenderableInk *pCreatedByNode, CCAttrMap *pAttrMap)
 From the call ProducerObj->DoBecomeA( MouldBecomeA(ObjectType) ) this function being a member of MouldBecomeA will be passed objects of ObjectType created by ProducerObj. We store the first object passed to us and ignore the rest as we really can only use one thanks very much. Most simple producers will probably return single objects anyway.
NodePathGetMouldPath () const

Protected Member Functions

void Destroy ()
 Destroy the contents of the mould become a object.

Private Member Functions

 CC_DECLARE_MEMDUMP (MouldBecomeA)

Private Attributes

NodePathpNodePath

Detailed Description

This is the class that is passed to other nodes when the mould tool is trying to turn them into other types via their DoBecomeA() method.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/02/95

Definition at line 546 of file moldtool.h.


Constructor & Destructor Documentation

MouldBecomeA::~MouldBecomeA  )  [virtual]
 

Destructor for the MouldBecomeA parameter.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/09/96
See also:
-

Definition at line 2176 of file moldtool.cpp.

02177 {
02178     Destroy();
02179 }

MouldBecomeA::MouldBecomeA BecomeAReason  Reason,
CCRuntimeClass pClass,
UndoableOperation pOp
[inline]
 

Definition at line 553 of file moldtool.h.

00555                                              : BecomeA(Reason,pClass,pOp) {pNodePath=NULL;};


Member Function Documentation

MouldBecomeA::CC_DECLARE_MEMDUMP MouldBecomeA   )  [private]
 

void MouldBecomeA::Destroy  )  [protected]
 

Destroy the contents of the mould become a object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/01/95
See also:
-

Definition at line 2233 of file moldtool.cpp.

02234 {
02235     // remember on a pass back we own this object so we 
02236     // really need to delete it if we're not going to use it!
02237     if (pNodePath)
02238     {
02239         pNodePath->CascadeDelete(); 
02240         delete pNodePath;
02241         pNodePath = NULL;
02242     }
02243 }

NodePath* MouldBecomeA::GetMouldPath  )  const [inline]
 

Definition at line 562 of file moldtool.h.

00562 { return pNodePath; }

BOOL MouldBecomeA::PassBack NodeRenderableInk pNewNode,
NodeRenderableInk pCreatedByNode,
CCAttrMap pAttrMap
[virtual]
 

From the call ProducerObj->DoBecomeA( MouldBecomeA(ObjectType) ) this function being a member of MouldBecomeA will be passed objects of ObjectType created by ProducerObj. We store the first object passed to us and ignore the rest as we really can only use one thanks very much. Most simple producers will probably return single objects anyway.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/02/95
Parameters:
pNewNode = ptr to Node that been generated by a node via its [INPUTS] DoBecomeA() method pCreatedByNode = ptr to the node that created pNewNode
- [OUTPUTS]
Returns:
TRUE if Successful, FALSE otherwise

Reimplemented from BecomeA.

Definition at line 2204 of file moldtool.cpp.

02207 {
02208     if ( (MouldBecomeA::pNodePath==NULL) && (pNewNode->IsKindOf(CC_RUNTIME_CLASS(NodePath))) )
02209         MouldBecomeA::pNodePath=(NodePath*)pNewNode;
02210     else
02211     {
02212         // remember on a pass back we own this object so we 
02213         // really need to delete it if we're not going to use it!
02214         pNewNode->CascadeDelete(); 
02215         delete pNewNode;
02216         pNewNode = NULL;
02217     }   
02218 
02219     return TRUE;
02220 }


Member Data Documentation

NodePath* MouldBecomeA::pNodePath [private]
 

Definition at line 568 of file moldtool.h.


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