StylesExporter Class Reference

#include <styles.h>

Inheritance diagram for StylesExporter:

RecordReferencingExporter List of all members.

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

Stylesm_Styles

Detailed Description

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/07/96
See also:
Styles

Definition at line 394 of file styles.h.


Constructor & Destructor Documentation

StylesExporter::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.

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

Definition at line 2032 of file styles.cpp.

02032                                                                                      : 
02033     RecordReferencingExporter(FilterToUse),
02034     m_Styles(StylesToExport)
02035 {
02036 }


Member Function Documentation

XFileRef StylesExporter::WriteRecord const RecordReferenceItem ItemToExport  )  [protected, virtual]
 

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.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/07/97
Notes: Called from RecordReferencingExporter::WriteItem, so look there for further info.

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 }

XFileRef StylesExporter::WriteStyle const WizOpStyle StyleToWrite  )  [virtual]
 

Attempts to write a WizOpStyle via the filter given in this object's constructor.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/07/97
Returns:
A Record Number to use as a reference (or XFILEREF_ERROR if it failed)
See Also: Styles::GetRecordRefForStyle which delegates all responsibility to this member.

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 }


Member Data Documentation

Styles& StylesExporter::m_Styles [private]
 

Definition at line 409 of file styles.h.


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