#include <styles.h>
Inheritance diagram for StylesExporter:
Public Member Functions | |
StylesExporter (Styles &StylesToExport, BaseCamelotFilter &FilterToUse) | |
Default constructor to ensure the data members are set up correctly. We need a Styles collection and a Filter to export by. | |
virtual XFileRef | WriteStyle (const WizOpStyle &StyleToWrite) |
Attempts to write a WizOpStyle via the filter given in this object's constructor. | |
Protected Member Functions | |
virtual XFileRef | WriteRecord (const RecordReferenceItem &ItemToExport) |
Provides implementation for the base class pure function to write the given RecordReferenceItem (i.e. StyleRecordReference) via the filter given in this object's constructor. | |
Private Attributes | |
Styles & | m_Styles |
Definition at line 394 of file styles.h.
|
Default constructor to ensure the data members are set up correctly. We need a Styles collection and a Filter to export by.
Definition at line 2032 of file styles.cpp. 02032 : 02033 RecordReferencingExporter(FilterToUse), 02034 m_Styles(StylesToExport) 02035 { 02036 }
|
|
Provides implementation for the base class pure function to write the given RecordReferenceItem (i.e. StyleRecordReference) via the filter given in this object's constructor.
Implements RecordReferencingExporter. Definition at line 2083 of file styles.cpp. 02084 { 02085 #ifdef DO_EXPORT 02086 XFileRef RecordNumber = XFILEREF_ERROR; // return this (initialized to error) 02087 02088 ENSURE_KIND((&ItemToExport), StyleRecordReference); 02089 02090 // Add a description of the TAG_WIZOP_STYLE record for older importers 02091 GetFilter().AddTagDescription(TAG_WIZOP_STYLE, _R(IDS_TAG_WIZOP_STYLE)); 02092 02093 CamelotFileRecord Rec(&GetFilter(), TAG_WIZOP_STYLE, CXF_UNKNOWN_SIZE); 02094 02095 BOOL ok = Rec.Init(); 02096 02097 WizOpStyle& StyleToExport = (WizOpStyle&)((StyleRecordReference&)ItemToExport).GetStyle(); 02098 02099 if (ok) 02100 { 02101 String_64 InternalName = StyleToExport.GetWizOp().GetInternalName(); 02102 ok = Rec.WriteUnicode((TCHAR*)InternalName); 02103 } 02104 if (ok) 02105 { 02106 String_256 Question = StyleToExport.GetQuestion(); 02107 ok = Rec.WriteUnicode((TCHAR*)Question); 02108 } 02109 if (ok) 02110 { 02111 String_64 Param = StyleToExport.GetParam(); 02112 ok = Rec.WriteUnicode((TCHAR*)Param); 02113 } 02114 if (ok) 02115 { 02116 String_64 StyleName = StyleToExport.GetName(); 02117 ok = Rec.WriteUnicode((TCHAR*)StyleName); 02118 } 02119 02120 if (ok) 02121 { 02122 RecordNumber = GetFilter().WriteDefinitionRecord(&Rec); 02123 } 02124 return RecordNumber; 02125 #else 02126 return XFILEREF_ERROR; 02127 #endif 02128 }
|
|
Attempts to write a WizOpStyle via the filter given in this object's constructor.
Definition at line 2056 of file styles.cpp. 02057 { 02058 XFileRef RecordReference = XFILEREF_ERROR; // return this 02059 02060 StyleRecordReference RecordReferenceItem(StyleToWrite); 02061 02062 RecordReference = WriteItem(RecordReferenceItem); 02063 02064 return RecordReference; 02065 }
|
|
|