AttrJoinType Class Reference

JoinType Attribute class. More...

#include <lineattr.h>

Inheritance diagram for AttrJoinType:

NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrJoinType ()
 Default constructor for Join Type Attribute class.
 AttrJoinType (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a JoinType Attribute.
void Render (RenderRegion *pRender)
 'Renders' a JoinType attribute.
Node * SimpleCopy ()
 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 INT32 operator== (const NodeAttribute &NodeAttrib)
 A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
virtual UINT32 GetAttrNameID (void)
 Returns back a string resource ID describing the attribute.
virtual AttributeValue * GetAttributeValue ()
virtual CCRuntimeClass * GetAttributeType ()
virtual AttrIndex GetAttributeIndex ()
virtual BOOL EffectsParentBounds ()
 Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
void GetDebugDetails (StringBase *Str)
 For obtaining debug information about the Node.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the join type record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)

Public Attributes

JoinTypeAttribute Value

Private Member Functions

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

Detailed Description

JoinType Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/7/93
See also:
JointType

Definition at line 606 of file lineattr.h.


Constructor & Destructor Documentation

AttrJoinType::AttrJoinType (   ) 
 

Default constructor for Join Type Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 2671 of file lineattr.cpp.

02671                            : NodeAttribute()
02672 {
02673 }

AttrJoinType::AttrJoinType (  Node *  ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
) 
 

Creates a JoinType Attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 2646 of file lineattr.cpp.

02652              : NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
02653 {                         
02654 } 


Member Function Documentation

void AttrJoinType::CopyNodeContents (  AttrJoinType *  NodeCopy  )  [private]
 

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

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
[INPUTS] 
A copy of this node [OUTPUTS]
Returns:
-

Errors: An assertion failure will occur if NodeCopy is NULL

Scope: protected

Definition at line 2789 of file lineattr.cpp.

02790 {
02791     NodeAttribute::CopyNodeContents( NodeCopy ); 
02792     NodeCopy->Value.JoinType = Value.JoinType; 
02793     
02794 } 

virtual BOOL AttrJoinType::EffectsParentBounds (   )  [inline, virtual]
 

Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the node will effect the bounds of it's parent.
See also:
NodeAttribute::GetAttrBoundingRect

Reimplemented from NodeAttribute.

Definition at line 629 of file lineattr.h.

00629 { return TRUE; }

virtual AttrIndex AttrJoinType::GetAttributeIndex (   )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 627 of file lineattr.h.

00627 { return ATTR_JOINTYPE; }

virtual CCRuntimeClass* AttrJoinType::GetAttributeType (   )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 626 of file lineattr.h.

00626 { return CC_RUNTIME_CLASS(AttrJoinType); }

virtual AttributeValue* AttrJoinType::GetAttributeValue (   )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 625 of file lineattr.h.

00625 { return &Value; }

UINT32 AttrJoinType::GetAttrNameID (  void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Attribute description ID

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 2766 of file lineattr.cpp.

02767 {
02768     return (_R(IDS_JOIN_TYPE)); 
02769 }                                  

void AttrJoinType::GetDebugDetails (  StringBase *  Str  )  [virtual]
 

For obtaining debug information about the Node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/9/93
Parameters:
Str,: String giving debug info about the node [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 2840 of file lineattr.cpp.

02841 {
02842 #ifdef _DEBUG
02843     NodeAttribute::GetDebugDetails( Str );
02844 
02845     String_256 TempStr;
02846     char *p;
02847     switch (Value.JoinType)
02848     {
02849         case MitreJoin: p = "Mitre"; break;
02850         case RoundJoin: p = "Round"; break;
02851         case BevelledJoin: p = "Bevelled"; break;
02852         default: p = "??"; break;
02853     }
02854     TempStr._MakeMsg( TEXT("\r\nJoin type=#1%s\r\n"), p );
02855     (*Str) += TempStr;
02856 #endif
02857 }

UINT32 AttrJoinType::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 2875 of file lineattr.cpp.

02876 {     
02877     return (sizeof(AttrJoinType)); 
02878 }  

INT32 AttrJoinType::operator== (  const NodeAttribute &  Attrib  )  [virtual]
 

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

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/94
Parameters:
Atrib,: The attribute to compare, which must be an AttrJoinType [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: An ENSURE failure will occur if Attrib does not have a AttrJoinType runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 2742 of file lineattr.cpp.

02743 {
02744     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrJoinType)),
02745         "Trying to compare two objects with different types"); 
02746     AttrJoinType* Attr = (AttrJoinType*) &Attrib;
02747     return (Attr->Value.JoinType == Value.JoinType); 
02748 }

void AttrJoinType::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 2810 of file lineattr.cpp.

02811 {
02812     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
02813     ENSURE(IS_A(pNodeCopy, AttrJoinType), "PolyCopyNodeContents given wrong dest node type");
02814 
02815     if (IS_A(pNodeCopy, AttrJoinType))
02816         CopyNodeContents((AttrJoinType*)pNodeCopy);
02817 }

void AttrJoinType::Render (  RenderRegion *  pRender  )  [virtual]
 

'Renders' a JoinType attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/7/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 2690 of file lineattr.cpp.

02691 {
02692     pRender->SetJoinType(&Value, FALSE);
02693 }

Node * AttrJoinType::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:
9/7/93
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 NodeAttribute.

Definition at line 2714 of file lineattr.cpp.

02715 {
02716     AttrJoinType* NodeCopy = new AttrJoinType();
02717     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
02718     CopyNodeContents(NodeCopy);
02719     
02720     return NodeCopy;
02721 }  

BOOL AttrJoinType::WritePreChildrenNative (  BaseCamelotFilter *  pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 2916 of file lineattr.cpp.

02917 {
02918 #ifdef DO_EXPORT
02919     return WritePreChildrenWeb(pFilter);
02920 #else
02921     return FALSE;
02922 #endif
02923 }

BOOL AttrJoinType::WritePreChildrenWeb (  BaseCamelotFilter *  pFilter  )  [virtual]
 

Writes the join type record to the filter.

> virtual BOOL AttrJoinType::WritePreChildrenWeb(BaseCamelotFilter* pFilter)

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/5/96
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
-

Reimplemented from Node.

Definition at line 2896 of file lineattr.cpp.

02897 {
02898 #ifdef DO_EXPORT
02899     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
02900 
02901     CamelotFileRecord Rec(pFilter,TAG_JOINSTYLE,TAG_JOINSTYLE_SIZE);
02902 
02903     BOOL ok = Rec.Init();
02904     if (ok) ok = Rec.WriteBYTE(BYTE(Value.JoinType));
02905     if (ok) ok = pFilter->Write(&Rec);
02906 
02907     return ok;
02908 #else
02909     return FALSE;
02910 #endif
02911 }


Member Data Documentation

JoinTypeAttribute AttrJoinType::Value
 

Definition at line 648 of file lineattr.h.


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