CDRAttributeStore Class Reference

A storage object for attributes from a CDR file import. More...

#include <cdrfiltr.h>

Inheritance diagram for CDRAttributeStore:

List CCObject SimpleCCObject CDRArrowheadStore CDRBitmapStore CDRFontnameStore List of all members.

Public Member Functions

virtual BOOL AddChunkToStore (RIFFFile *RIFF)
 Stores attibute chunks for the CDRFilter class.
ADDR Find (DWORD reference, INT32 *Size)
 Finds a chunk in the store of objects using the reference given.
ADDR Find (WORD reference, INT32 *Size)
 Finds a chunk in the store of objects using the reference given.

Private Member Functions

 CC_DECLARE_MEMDUMP (CDRAttributeStore)

Detailed Description

A storage object for attributes from a CDR file import.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
22 03 95

Definition at line 137 of file cdrfiltr.h.


Member Function Documentation

BOOL CDRAttributeStore::AddChunkToStore RIFFFile RIFF  )  [virtual]
 

Stores attibute chunks for the CDRFilter class.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
22 03 95
Parameters:
A RIFFFile object [INPUTS]
Returns:
error flag
See also:
CDRFilter

Reimplemented in CDRArrowheadStore.

Definition at line 4784 of file cdrfiltr.cpp.

04785 {
04786     if(RIFF->GetObjType() != RIFFOBJECTTYPE_CHUNK)
04787     {
04788         ERROR2(FALSE, "CDRAttributeStore::AddChunkToStore called without a chunk in the RIFFFile");
04789     }
04790 
04791     // get a new item obect
04792     CDRAttributeStoredItem *Item = new CDRAttributeStoredItem;
04793 
04794     if(Item == 0)
04795         return FALSE;
04796 
04797     // get the data of the RIFF chunk
04798     if(!Item->Aquire(RIFF))
04799     {
04800         delete Item;
04801         return FALSE;
04802     }
04803 
04804     Item->Size = RIFF->GetObjSize();
04805 
04806     // and add the new item to the list
04807     AddTail(Item);
04808 
04809     return TRUE;
04810 }

CDRAttributeStore::CC_DECLARE_MEMDUMP CDRAttributeStore   )  [private]
 

ADDR CDRAttributeStore::Find WORD  Reference,
INT32 *  Size
 

Finds a chunk in the store of objects using the reference given.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
22 03 95
Parameters:
reference to the object (WORD) [INPUTS]
Returns:
error flag
See also:
CDRFilter

Definition at line 4864 of file cdrfiltr.cpp.

04865 {
04866     CDRAttributeStoredItem *Item;
04867 
04868     if(IsEmpty())
04869         return 0;       // no items in the list
04870     
04871     Item = (CDRAttributeStoredItem *)GetHead();
04872 
04873     // scan though the list looking for the reference
04874     while(Item != 0)
04875     {
04876         if(CDRDATA_WORD(*((WORD *)(Item->Block))) == Reference)
04877         {
04878             *Size = Item->Size;
04879             return Item->Block;
04880         }
04881 
04882         Item = (CDRAttributeStoredItem *)GetNext(Item);
04883     }
04884 
04885     return 0;
04886 }

ADDR CDRAttributeStore::Find DWORD  Reference,
INT32 *  Size
 

Finds a chunk in the store of objects using the reference given.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
22 03 95
Parameters:
reference to the object (DWORD) [INPUTS]
Returns:
error flag
See also:
CDRFilter

Definition at line 4826 of file cdrfiltr.cpp.

04827 {
04828     CDRAttributeStoredItem *Item;
04829 
04830     if(IsEmpty())
04831         return 0;       // no items in the list
04832     
04833     Item = (CDRAttributeStoredItem *)GetHead();
04834 
04835     // scan though the list looking for the reference
04836     while(Item != 0)
04837     {
04838         if(CDRDATA_DWORD(*((DWORD *)(Item->Block))) == Reference)
04839         {
04840             *Size = Item->Size;
04841             return Item->Block;
04842         }
04843 
04844         Item = (CDRAttributeStoredItem *)GetNext(Item);
04845     }
04846 
04847     return 0;
04848 }


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