#include <styles.h>
Inheritance diagram for RecordReferencingExporter:
Protected Member Functions | |
RecordReferencingExporter (BaseCamelotFilter &FilterToUse) | |
RecordReferencingExporter (const RecordReferencingExporter &Other) | |
Let's us know we should be copying this. | |
const RecordReferencingExporter & | operator= (const RecordReferencingExporter &Other) |
virtual | ~RecordReferencingExporter () |
Deletes the internal data structures. | |
virtual XFileRef | WriteItem (const RecordReferenceItem &TentativeExportItem) |
Provides support for derived classes using record references. Attempts to write out an export item, but will just return an XFileRef if the record has already been written for the item. Derived classes should create a suitable item on the stack, and call this function to do the spade work. | |
virtual XFileRef | WriteRecord (const RecordReferenceItem &ItemToExport)=0 |
virtual BOOL | AddExportedItem (RecordReferenceItem &NewItem) |
Adds the RecordReferenceItem to the list of exported items. You can override it if you want. | |
virtual const RecordReferenceItem * | FindExportedItem (const RecordReferenceItem &ItemToFind) |
Looks for the given item in the list of exported items. If you're worried about efficiency override it. | |
BaseCamelotFilter & | GetFilter () |
Private Attributes | |
BaseCamelotFilter & | m_Filter |
List | m_ExportedItems |
Definition at line 352 of file styles.h.
|
Definition at line 357 of file styles.h. 00357 : m_Filter(FilterToUse) {}
|
|
Let's us know we should be copying this.
Definition at line 1840 of file styles.cpp. 01840 : 01841 m_Filter(Other.m_Filter) 01842 { 01843 TRACE( _T("RecordReferencingExporter - Copy constructor not implemented")); 01844 }
|
|
Deletes the internal data structures.
Definition at line 1822 of file styles.cpp. 01823 { 01824 m_ExportedItems.DeleteAll(); 01825 }
|
|
Adds the RecordReferenceItem to the list of exported items. You can override it if you want.
Definition at line 1864 of file styles.cpp. 01865 { 01866 m_ExportedItems.AddHead(&NewItem); 01867 01868 return TRUE; 01869 }
|
|
Looks for the given item in the list of exported items. If you're worried about efficiency override it.
Definition at line 1882 of file styles.cpp. 01883 { 01884 const RecordReferenceItem* pFoundItem = NULL; // return this 01885 01886 RecordReferenceItem* pCurrentItem = (RecordReferenceItem*)m_ExportedItems.GetHead(); 01887 01888 while (pCurrentItem != NULL && pFoundItem == NULL) 01889 { 01890 if (ItemToFind == *pCurrentItem) 01891 { 01892 pFoundItem = pCurrentItem; 01893 } 01894 else 01895 { 01896 pCurrentItem = (RecordReferenceItem*)m_ExportedItems.GetNext(pCurrentItem); 01897 } 01898 } 01899 01900 return pFoundItem; 01901 }
|
|
Definition at line 374 of file styles.h. 00374 { return m_Filter; }
|
|
Definition at line 1846 of file styles.cpp. 01847 { 01848 TRACE( _T("RecordReferencingExporter - Assignment operator not implemented")); 01849 return *this; 01850 }
|
|
Provides support for derived classes using record references. Attempts to write out an export item, but will just return an XFileRef if the record has already been written for the item. Derived classes should create a suitable item on the stack, and call this function to do the spade work.
Definition at line 1924 of file styles.cpp. 01925 { 01926 #ifdef DO_EXPORT 01927 XFileRef RecordReference = XFILEREF_ERROR; // return this 01928 01929 const RecordReferenceItem* const pExistingItem = FindExportedItem(TentativeExportItem); 01930 if (pExistingItem == NULL) 01931 { 01932 // The item hasn't been exported, so do it now 01933 RecordReference = WriteRecord(TentativeExportItem); 01934 if (RecordReference != XFILEREF_ERROR) 01935 { 01936 RecordReferenceItem* pNewItem = TentativeExportItem.CreateCopy(RecordReference); 01937 if (pNewItem != NULL) 01938 { 01939 AddExportedItem(*pNewItem); 01940 } 01941 else 01942 { 01943 RecordReference = XFILEREF_ERROR; 01944 } 01945 } 01946 } 01947 else // the record has already been written, so just get the reference 01948 { 01949 RecordReference = pExistingItem->GetRecordRef(); 01950 } 01951 01952 return RecordReference; 01953 #else 01954 return 0L; 01955 #endif 01956 }
|
|
Implemented in StylesExporter. |
|
|
|
|