BevelRecordHandler Class Reference

Handles the reading of all bevel attribute records in the v2 file format. More...

#include <nodebev.h>

Inheritance diagram for BevelRecordHandler:

CamelotRecordHandler CXaraFileRecordHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 BevelRecordHandler ()
 Constructor.
 ~BevelRecordHandler ()
 Destructor.
virtual UINT32GetTagList ()
 Gets the tag list for this handler to handle.
virtual BOOL HandleRecord (CXaraFileRecord *pCXaraFileRecord)
 Handles the bevel record - basically creates a BevelController node & creates all the attributes.

Private Member Functions

 CC_DECLARE_DYNCREATE (BevelRecordHandler)

Private Attributes

NodeBevelController * m_pBevelController
NodeBevelm_pBevelInk

Detailed Description

Handles the reading of all bevel attribute records in the v2 file format.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
See also:
-

Definition at line 401 of file nodebev.h.


Constructor & Destructor Documentation

BevelRecordHandler::BevelRecordHandler  ) 
 

Constructor.

Author:
Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/07/05
Parameters:
- [INPUTS]
Returns:

Definition at line 3285 of file nodebev.cpp.

03286 {
03287 }

BevelRecordHandler::~BevelRecordHandler  ) 
 

Destructor.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Definition at line 3298 of file nodebev.cpp.

03299 {
03300 }


Member Function Documentation

BevelRecordHandler::CC_DECLARE_DYNCREATE BevelRecordHandler   )  [private]
 

UINT32 * BevelRecordHandler::GetTagList  )  [virtual]
 

Gets the tag list for this handler to handle.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Implements CXaraFileRecordHandler.

Definition at line 3311 of file nodebev.cpp.

03312 {
03313     static const UINT32 TagList[] = {TAG_BEVEL,
03314                                     TAG_BEVATTR_INDENT,
03315                                     TAG_BEVATTR_LIGHTANGLE,
03316                                     TAG_BEVATTR_CONTRAST,
03317                                     TAG_BEVATTR_TYPE,
03318                                     TAG_BEVELINK, 
03319                                     CXFRH_TAG_LIST_END};
03320     return (UINT32*)&TagList;
03321 }

BOOL BevelRecordHandler::HandleRecord CXaraFileRecord pCXaraFileRecord  )  [virtual]
 

Handles the bevel record - basically creates a BevelController node & creates all the attributes.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/98
Parameters:
- [INPUTS]
Returns:

Implements CXaraFileRecordHandler.

Definition at line 3333 of file nodebev.cpp.

03334 {
03335     // load in the bevel information and the source path for the node
03336     // create the bevel node and include in the tree
03337 
03338 //  AttrBevelIndent *     pBevIndent = NULL;
03339 //  AttrBevelLightAngle * pBevLightAngle = NULL;
03340 //  AttrBevelContrast *   pBevContrast = NULL;
03341 //  AttrBevelType *       pBevType = NULL;
03342 
03343     INT32 value = 0;
03344 
03345     if (pCXaraFileRecord->GetTag() == TAG_BEVEL)
03346     {
03347         m_pBevelController = new NodeBevelController();
03348 
03349         if (!m_pBevelController)
03350         {
03351             ERROR(_R(IDE_NOMORE_MEMORY), FALSE);
03352         }
03353 
03354         BOOL ok = m_pBevelController->LoadBevelFromRecord(pCXaraFileRecord);
03355         if (!ok)
03356         {
03357             delete m_pBevelController ;
03358             m_pBevelController = NULL;
03359             return FALSE;
03360         }
03361     
03362         // insert it into the tree
03363         InsertNode(m_pBevelController);
03364     }
03365     else if (pCXaraFileRecord->GetTag() == TAG_BEVELINK)
03366     {
03367         // create the bevel node an insert it
03368         m_pBevelInk = new NodeBevel;
03369 
03370         if (!m_pBevelInk)
03371         {
03372             ERROR(_R(IDE_NOMORE_MEMORY), FALSE);            
03373         }
03374 
03375         InsertNode(m_pBevelInk);
03376         m_pBevelInk->InvalidateMe();
03377     }
03378     else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_INDENT)
03379     {
03380         // read the record
03381         if (!pCXaraFileRecord->ReadINT32(&value))
03382             return FALSE;
03383     }
03384     else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_LIGHTANGLE)
03385     {
03386         // read the record
03387         if (!pCXaraFileRecord->ReadINT32(&value))
03388             return FALSE;
03389     }
03390     else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_CONTRAST)
03391     {
03392         // read the record
03393         if (!pCXaraFileRecord->ReadINT32(&value))
03394             return FALSE;
03395     }
03396     else if (pCXaraFileRecord->GetTag() == TAG_BEVATTR_TYPE)
03397     {
03398         // read the record
03399         if (!pCXaraFileRecord->ReadINT32(&value))
03400             return FALSE;
03401     }
03402     
03403     return TRUE;
03404 }


Member Data Documentation

NodeBevelController* BevelRecordHandler::m_pBevelController [private]
 

Definition at line 415 of file nodebev.h.

NodeBevel* BevelRecordHandler::m_pBevelInk [private]
 

Definition at line 416 of file nodebev.h.


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