CommonAttributeItem Class Reference

This ListItem is used by Range::FindCommonAttributes. More...

#include <attrmgr.h>

Inheritance diagram for CommonAttributeItem:

ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 CommonAttributeItem (CCRuntimeClass *AtrType, NodeAttribute *pAttrib=NULL, Range::CommonAttribResult status=Range::ATTR_NONE)
 ~CommonAttributeItem ()
 CommonAttributeItem destructor.
BOOL InitSafeAttrItem (CCRuntimeClass *AtrType, NodeAttribute *pAttrib=NULL, Range::CommonAttribResult status=Range::ATTR_NONE)
 Initialises a CommonAttributeItem. If pAttrib is non NULL then a copy of the item is stored. This makes the function useful for caching 'safe' attribute details.
void ClearResults ()

Public Attributes

CCRuntimeClassAttrType
NodeAttributepAttr
Range::CommonAttribResult Status

Private Attributes

BOOL pAttrIsCopy

Detailed Description

This ListItem is used by Range::FindCommonAttributes.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/8/94
See also:
NodeRenderableInk::FactorOutCommonAttributes

Range::FindCommonAttributes

CommonAttributeSet

Definition at line 459 of file attrmgr.h.


Constructor & Destructor Documentation

CommonAttributeItem::CommonAttributeItem CCRuntimeClass AtrType,
NodeAttribute pAttrib = NULL,
Range::CommonAttribResult  status = Range::ATTR_NONE
[inline]
 

Definition at line 463 of file attrmgr.h.

00465         { AttrType = AtrType; pAttr = pAttrib; Status = status; pAttrIsCopy = FALSE; };

CommonAttributeItem::~CommonAttributeItem  ) 
 

CommonAttributeItem destructor.

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

Definition at line 4115 of file attrmgr.cpp.

04116 {
04117     if (pAttrIsCopy && pAttr) 
04118         delete pAttr;
04119 }; 


Member Function Documentation

void CommonAttributeItem::ClearResults  )  [inline]
 

Definition at line 476 of file attrmgr.h.

00476                         { if (pAttrIsCopy && pAttr)
00477                         delete pAttr; 
00478                      pAttr = NULL; 
00479                      Status = Range::ATTR_NONE; };

BOOL CommonAttributeItem::InitSafeAttrItem CCRuntimeClass AtrType,
NodeAttribute pAttrib = NULL,
Range::CommonAttribResult  status = Range::ATTR_NONE
 

Initialises a CommonAttributeItem. If pAttrib is non NULL then a copy of the item is stored. This makes the function useful for caching 'safe' attribute details.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/9/95
Parameters:
AttrType,: The attributes type [INPUTS] pAttrib: Attribute pointer status: Status
- [OUTPUTS]
Returns:
FALSE if we run out of memory. The AttributeItem's values will remain unchanged in this circumstance.
See also:
CommonAttrSet

Definition at line 4085 of file attrmgr.cpp.

04087 {
04088     if (pAttrib)
04089     {
04090         // Try to make a copy of the attribute
04091         NodeAttribute* pAttrCopy = (NodeAttribute*) (pAttrib->SimpleCopy());
04092         if (!pAttrCopy)
04093             return FALSE;
04094         pAttr = pAttrCopy;      
04095     }
04096     else
04097         pAttr = NULL;
04098         
04099     AttrType = AtrType; 
04100     Status = status; 
04101     pAttrIsCopy = TRUE; // Indicate that a copy of the attribute is stored
04102     return TRUE;
04103 } 


Member Data Documentation

CCRuntimeClass* CommonAttributeItem::AttrType
 

Definition at line 479 of file attrmgr.h.

NodeAttribute* CommonAttributeItem::pAttr
 

Definition at line 482 of file attrmgr.h.

BOOL CommonAttributeItem::pAttrIsCopy [private]
 

Definition at line 504 of file attrmgr.h.

Range::CommonAttribResult CommonAttributeItem::Status
 

Definition at line 485 of file attrmgr.h.


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