AttrQuality Class Reference

Quality NodeAttribute class. More...

#include <qualattr.h>

Inheritance diagram for AttrQuality:

NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrQuality ()
 Default constructor for Quality Attribute class.
 AttrQuality (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a Quality Attribute.
void Render (RenderRegion *pRender)
 Renders a quality 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 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 AttrIndex GetAttributeIndex ()
void ShowDebugTreeDetails () const
void GetDebugDetails (StringBase *Str)
 For obtaining debug information about the Node.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual BOOL CanBeAppliedToObject ()
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the quality record to the filter. DOESN'T WRITE ANYTHING OUT IN THE WEB FORMAT ***.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
 Writes the quality attribute record to the filter.

Static Public Member Functions

static DocColourGetColour ()

Public Attributes

QualityAttribute Value

Private Member Functions

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

Private Attributes

DocColour Colour

Static Private Attributes

static DocColourpCurrentColour = NULL

Detailed Description

Quality NodeAttribute class.

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

Definition at line 149 of file qualattr.h.


Constructor & Destructor Documentation

AttrQuality::AttrQuality  ) 
 

Default constructor for Quality Attribute class.

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

Definition at line 505 of file quality.cpp.

00506 {
00507 }

AttrQuality::AttrQuality Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
 

Creates a Quality Attribute.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/04/94
Parameters:
See base class [INPUTS]
See also:
NodeAttribute

Definition at line 485 of file quality.cpp.

00491              : NodeAttribute(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
00492 {                         
00493 } 


Member Function Documentation

virtual BOOL AttrQuality::CanBeAppliedToObject  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 176 of file qualattr.h.

00176 { return FALSE; };

void AttrQuality::CopyNodeContents AttrQuality 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:
23/04/94
Parameters:
NodeCopy - A copy of this node. [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Definition at line 614 of file quality.cpp.

00615 {
00616     NodeAttribute::CopyNodeContents( NodeCopy );
00617     
00618     // Copy contents specific to derived class here
00619     NodeCopy->Value.QualityValue = Value.QualityValue;
00620 } 

virtual AttrIndex AttrQuality::GetAttributeIndex  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 167 of file qualattr.h.

00167 { return ATTR_QUALITY; }

UINT32 AttrQuality::GetAttrNameID void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

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

Reimplemented from NodeAttribute.

Definition at line 595 of file quality.cpp.

00596 {
00597     return (_R(IDS_QUALITY)); 
00598 }               

static DocColour* AttrQuality::GetColour  )  [inline, static]
 

Definition at line 178 of file qualattr.h.

00178 { return pCurrentColour; }

void AttrQuality::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 668 of file quality.cpp.

00669 {
00670 #ifdef _DEBUG
00671     NodeAttribute::GetDebugDetails( Str );
00672 
00673     String_256 TempStr;
00674     TempStr._MakeMsg( TEXT("\r\nQuality=#1%ld\r\n"), Value.QualityValue.GetQuality() );
00675     (*Str) += TempStr;
00676 #endif
00677 }

UINT32 AttrQuality::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

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

Reimplemented from Node.

Definition at line 692 of file quality.cpp.

00693 {     
00694     return (sizeof(AttrQuality)); 
00695 }  

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

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

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/04/94
Parameters:
Atrib,: The attribute to compare, which must be an AttrQuality [INPUTS]
Returns:
Non-zero if objects are equal, zero if not.

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

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 575 of file quality.cpp.

00576 {
00577     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrQuality)), 
00578         "Trying to compare two objects with different types"); 
00579     AttrQuality* Attr = (AttrQuality*) &Attrib;
00580     return (Attr->Value.QualityValue == Value.QualityValue);
00581 } 

void AttrQuality::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 636 of file quality.cpp.

00637 {
00638     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
00639     ENSURE(IS_A(pNodeCopy, AttrQuality), "PolyCopyNodeContents given wrong dest node type");
00640 
00641     if (IS_A(pNodeCopy, AttrQuality))
00642         CopyNodeContents((AttrQuality*)pNodeCopy);
00643 }

void AttrQuality::Render RenderRegion pRender  )  [virtual]
 

Renders a quality attribute.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/04/94
Parameters:
pRender - the render region to render the attribute into. [INPUTS]

Reimplemented from NodeAttribute.

Definition at line 520 of file quality.cpp.

00521 {
00522     pRender->SetQuality(&Value, FALSE);
00523 
00524     Layer* pLayer = (Layer*)FindParent(CC_RUNTIME_CLASS(Layer));
00525     if (pLayer != NULL)
00526     {
00527         // Copy layer's colour
00528         Colour = *(pLayer->GetGuideColour());
00529 
00530         // Make static reference point to this colour
00531         pCurrentColour = &Colour;
00532     }
00533 }

void AttrQuality::ShowDebugTreeDetails  )  const
 

Node * AttrQuality::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:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/04/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 550 of file quality.cpp.

00551 {
00552     AttrQuality* NodeCopy = new AttrQuality();
00553     if (NodeCopy == NULL)
00554         return NULL; 
00555     CopyNodeContents(NodeCopy);
00556     return NodeCopy;
00557 } 

BOOL AttrQuality::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Writes the quality attribute record to the filter.

> virtual BOOL AttrQuality::WritePreChildrenNative(BaseCamelotFilter* pFilter)

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/7/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 733 of file quality.cpp.

00734 {
00735 #ifdef DO_EXPORT
00736     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
00737 
00738     BOOL ok = TRUE;
00739 
00740     CXaraFileRecord Rec(TAG_QUALITY,TAG_QUALITY_SIZE);
00741 
00742     if (ok) ok = Rec.Init();
00743     if (ok) ok = Rec.WriteINT32(Value.QualityValue.GetQuality());
00744     if (ok) ok = pFilter->Write(&Rec);
00745 
00746     return ok;
00747 #else
00748     return FALSE;
00749 #endif
00750 }

BOOL AttrQuality::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the quality record to the filter. DOESN'T WRITE ANYTHING OUT IN THE WEB FORMAT ***.

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

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/7/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 715 of file quality.cpp.

00716 {
00717     return FALSE;
00718 }


Member Data Documentation

DocColour AttrQuality::Colour [private]
 

Definition at line 189 of file qualattr.h.

DocColour * AttrQuality::pCurrentColour = NULL [static, private]
 

Definition at line 190 of file qualattr.h.

QualityAttribute AttrQuality::Value
 

Definition at line 193 of file qualattr.h.


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