MultiCommonAttrItem Class Reference

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

#include <attraggl.h>

Inheritance diagram for MultiCommonAttrItem:

ListItem CCObject SimpleCCObject List of all members.

Public Types

enum  CAResult {
  AA_INVALID = 0, AA_NONE = 1, AA_SINGLE, AA_COMMON,
  AA_MANY
}

Public Member Functions

 MultiCommonAttrItem (AttributeIdentifier AttrType, NodeAttribute *const pAttr=NULL)
 MultiCommonAttrItem constructor.
 ~MultiCommonAttrItem ()
 MultiCommonAttrItem destructor.
void ClearResults ()
 ???
AttributeIdentifier GetAttrID () const
const CAResultGetStatus () const
NodeAttributeGetNode () const
void SetStatus (const CAResult &Status)
void SetNode (NodeAttribute *const pAttr)
AppliedAttributeCreateVisibleAppliedAttribute () const
 This will be superseded (replace this class with the AppliedAttribute class).

Private Member Functions

 CC_DECLARE_MEMDUMP (MultiCommonAttrItem)

Private Attributes

CAResult m_Status
AttributeIdentifier m_AttrType
NodeAttributem_pAttr
BOOL m_AttrIsCopy

Detailed Description

This ListItem is used by Range::FindCommonAttributes.

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

Definition at line 466 of file attraggl.h.


Member Enumeration Documentation

enum MultiCommonAttrItem::CAResult
 

Enumerator:
AA_INVALID 
AA_NONE 
AA_SINGLE 
AA_COMMON 
AA_MANY 

Definition at line 477 of file attraggl.h.

00477                   {     AA_INVALID = 0,     // indicates uninitialized data
00478                         AA_NONE = 1, 
00479                         AA_SINGLE,
00480                         AA_COMMON,
00481                         AA_MANY
00482                     };


Constructor & Destructor Documentation

MultiCommonAttrItem::MultiCommonAttrItem AttributeIdentifier  AttrType,
NodeAttribute *const   pAttr = NULL
 

MultiCommonAttrItem constructor.

Definition at line 451 of file attraggl.cpp.

00452                                                                         :
00453     m_AttrType(AttrType)
00454 {
00455     m_pAttr         = pAttr;
00456     m_Status        = (pAttr == NULL) ? AA_NONE : AA_SINGLE;
00457     m_AttrIsCopy    = FALSE;
00458 }

MultiCommonAttrItem::~MultiCommonAttrItem  ) 
 

MultiCommonAttrItem destructor.

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

Definition at line 470 of file attraggl.cpp.

00471 {
00472     if (m_AttrIsCopy && m_pAttr != NULL)
00473     {
00474         delete m_pAttr;
00475         m_pAttr = NULL;
00476     }
00477 }


Member Function Documentation

MultiCommonAttrItem::CC_DECLARE_MEMDUMP MultiCommonAttrItem   )  [private]
 

void MultiCommonAttrItem::ClearResults  ) 
 

???

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

Definition at line 490 of file attraggl.cpp.

00491 {
00492     if (m_AttrIsCopy && m_pAttr != NULL)
00493     {
00494         delete m_pAttr;
00495         m_pAttr = NULL;
00496     }
00497     m_pAttr = NULL; 
00498     m_Status = AA_NONE;
00499 }

AppliedAttribute * MultiCommonAttrItem::CreateVisibleAppliedAttribute  )  const
 

This will be superseded (replace this class with the AppliedAttribute class).

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/07/97

Definition at line 512 of file attraggl.cpp.

00513 {
00514     AppliedAttribute* pAppliedAttribute = NULL;
00515 
00516     switch (GetStatus())
00517     {
00518         case MultiCommonAttrItem::AA_NONE:
00519             TRACE( wxT("MultiCommonAttrItem::CreateVisibleAppliedAttribute() - MultiCommonAttrItem::AA_NONE\n") );
00520             break;
00521 
00522         case MultiCommonAttrItem::AA_SINGLE:
00523         {
00524             NodeAttribute* const pAttr = GetNode();
00525             ENSURE_NOT_NULL(pAttr);
00526             pAppliedAttribute = new SingletonAppliedAttribute(*pAttr);
00527             break;
00528         }
00529         case MultiCommonAttrItem::AA_COMMON:
00530         {
00531             NodeAttribute* const pAttr = GetNode();
00532             ENSURE_NOT_NULL(pAttr);
00533             pAppliedAttribute = new CommonAppliedAttribute(*pAttr);
00534             break;
00535         }
00536         case MultiCommonAttrItem::AA_MANY:
00537         {
00538             // There's more than one, they're all different, but we have one for the 
00539             // description
00540             NodeAttribute* const pAttr = GetNode();
00541             ENSURE_NOT_NULL(pAttr);
00542             pAppliedAttribute = new MultiAppliedAttribute(*pAttr);
00543             break;
00544         }
00545         case MultiCommonAttrItem::AA_INVALID:
00546             ERROR3("AA_INVALID received - why? Alex put this in to suppress compiler warning");
00547             break;
00548     }
00549 
00550     return pAppliedAttribute;
00551 }

AttributeIdentifier MultiCommonAttrItem::GetAttrID  )  const [inline]
 

Definition at line 484 of file attraggl.h.

00484 {   return m_AttrType;  }

NodeAttribute* MultiCommonAttrItem::GetNode  )  const [inline]
 

Definition at line 486 of file attraggl.h.

00486 {   return m_pAttr; }

const CAResult& MultiCommonAttrItem::GetStatus  )  const [inline]
 

Definition at line 485 of file attraggl.h.

00485 {   return m_Status;    }

void MultiCommonAttrItem::SetNode NodeAttribute *const   pAttr  )  [inline]
 

Definition at line 489 of file attraggl.h.

00489 {   m_pAttr = pAttr;    }

void MultiCommonAttrItem::SetStatus const CAResult Status  )  [inline]
 

Definition at line 488 of file attraggl.h.

00488 {   m_Status = Status;  }


Member Data Documentation

BOOL MultiCommonAttrItem::m_AttrIsCopy [private]
 

Definition at line 498 of file attraggl.h.

AttributeIdentifier MultiCommonAttrItem::m_AttrType [private]
 

Definition at line 495 of file attraggl.h.

NodeAttribute* MultiCommonAttrItem::m_pAttr [private]
 

Definition at line 496 of file attraggl.h.

CAResult MultiCommonAttrItem::m_Status [private]
 

Definition at line 494 of file attraggl.h.


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