AttrMould Class Reference

Mould Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrMould:

NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrMould ()
 AttrMould (NodeMould *pMould, MouldGeometry *pMouldShape)
 Constructor for Mould attribute.
 AttrMould (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
virtual INT32 operator== (const NodeAttribute &NodeAttrib)
 A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
virtual CCRuntimeClassGetAttributeType ()
void Render (RenderRegion *pRender)
 'Renders' a Mould attribute.
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.
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
MouldGeometryGetMouldShape ()
void SetMouldShape (MouldGeometry *pMould)
NodeMouldGetParentMould ()
void SetParentMould (NodeMould *pMould)
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.

Public Attributes

MouldAttribute Value

Private Member Functions

BOOL CopyNodeContents (AttrMould *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.

Detailed Description

Mould Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/03/95
See also:
MouldAttribute

Definition at line 2954 of file fillattr2.h.


Constructor & Destructor Documentation

AttrMould::AttrMould  )  [inline]
 

Definition at line 2959 of file fillattr2.h.

02959 {}

AttrMould::AttrMould NodeMould pMould,
MouldGeometry pMouldShape
 

Constructor for Mould attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/02/94
Parameters:
pMould - the Mould to associate with this attribute [INPUTS]

Definition at line 19649 of file fillattr.cpp.

19650 {
19651     SetParentMould(pMould);
19652     SetMouldShape(pMouldShape);
19653 }

AttrMould::AttrMould Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
[inline]
 

Definition at line 2961 of file fillattr2.h.

02966                                      : 
02967         NodeAttribute (ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

BOOL AttrMould::CopyNodeContents AttrMould NodeCopy  )  [private]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Parameters:
NodeCopy - the node to copy. [INPUTS]
A copy of this node [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Definition at line 19750 of file fillattr.cpp.

19751 {
19752     ERROR2IF(NodeCopy == NULL, FALSE, "NULL pointer in AttrMould::CopyNodeContents!");
19753 
19754     NodeAttribute::CopyNodeContents(NodeCopy);
19755 
19756     // Copy contents specific to derived class here
19757     NodeCopy->Value.SimpleCopy(&Value);
19758     return TRUE;
19759 } 

virtual CCRuntimeClass* AttrMould::GetAttributeType  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 2971 of file fillattr2.h.

02971 { return CC_RUNTIME_CLASS(AttrMould); }

UINT32 AttrMould::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
Attribute description ID

Reimplemented from NodeAttribute.

Definition at line 19731 of file fillattr.cpp.

19732 {
19733     return (_R(IDS_ATTRMOULD)); 
19734 }                                  

MouldGeometry* AttrMould::GetMouldShape  )  [inline]
 

Definition at line 2978 of file fillattr2.h.

02978 { return Value.GetMouldShape(); }

UINT32 AttrMould::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 19796 of file fillattr.cpp.

19797 {     
19798     return (sizeof(AttrMould)); 
19799 }  

NodeMould* AttrMould::GetParentMould  )  [inline]
 

Definition at line 2981 of file fillattr2.h.

02981 { return Value.GetParentMould(); }

INT32 AttrMould::operator== const NodeAttribute Attrib  )  [virtual]
 

A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Parameters:
Attrib - the attribute to compare, which must be an AttrMouldLinear [INPUTS]
Returns:
Usual semantics for equality.

Errors: An ERROR3IF failure will occur if Attrib does not have a AttrMouldLinear runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 19671 of file fillattr.cpp.

19672 {
19673     ERROR3IF(!Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrMould)), 
19674                 "Trying to compare two objects with different types"); 
19675 
19676     return (GetParentMould() == ((AttrMould*)&Attrib)->GetParentMould());
19677 }

void AttrMould::PolyCopyNodeContents NodeRenderable pNodeCopy  )  [virtual]
 

Polymorphically copies the contents of this node to another.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/12/2003
Parameters:
- [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Reimplemented from NodeRenderable.

Definition at line 19773 of file fillattr.cpp.

19774 {
19775     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
19776     ENSURE(IS_A(pNodeCopy, AttrMould), "PolyCopyNodeContents given wrong dest node type");
19777 
19778     if (IS_A(pNodeCopy, AttrMould))
19779         CopyNodeContents((AttrMould*)pNodeCopy);
19780 }

void AttrMould::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Mould attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94

Reimplemented from NodeAttribute.

Definition at line 19689 of file fillattr.cpp.

19690 {
19691 //  pRender->SetMould(&Value, FALSE);
19692 }

void AttrMould::SetMouldShape MouldGeometry pMould  )  [inline]
 

Definition at line 2979 of file fillattr2.h.

02979 { Value.SetMouldShape(pMould); }

void AttrMould::SetParentMould NodeMould pMould  )  [inline]
 

Definition at line 2982 of file fillattr2.h.

02982 { Value.SetParentMould(pMould); }

Node * AttrMould::SimpleCopy void   )  [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:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
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 NodeAttribute.

Definition at line 19709 of file fillattr.cpp.

19710 {
19711     AttrMould* NodeCopy = new AttrMould;
19712     if (NodeCopy == NULL)
19713         return NULL;
19714 
19715     CopyNodeContents(NodeCopy);
19716     
19717     return NodeCopy;
19718 }  


Member Data Documentation

MouldAttribute AttrMould::Value
 

Definition at line 2990 of file fillattr2.h.


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