ExportHint Class Reference

Encapsulates the Export Hint for a document. More...

#include <exphint.h>

List of all members.

Public Member Functions

 ExportHint ()
 Default constructor.
 ExportHint (const ExportHint &other)
 Copy constructor.
 ~ExportHint ()
UINT32 GetType (void)
UINT32 GetWidth (void)
UINT32 GetHeight (void)
UINT32 GetBPP (void)
const String_256GetOptionsString (void)
void SetType (UINT32 Type)
void SetWidth (UINT32 Width)
void SetHeight (UINT32 Height)
void SetBPP (UINT32 BPP)
void SetOptionsString (const String_256 &sOpt)
const ExportHintoperator= (const ExportHint &other)
 Assignment operator.
BOOL WriteExportHintRecord (BaseCamelotFilter *pFilter)
 Writes the hint to a Flare record.
BOOL InitFromRecord (CXaraFileRecord *pRecord)
 Initialises the hint from a Flare record.

Protected Attributes

UINT32 m_Type
UINT32 m_Width
UINT32 m_Height
UINT32 m_BPP
String_256 m_sOptions

Private Member Functions

 CC_DECLARE_MEMDUMP (ExportHint)


Detailed Description

Encapsulates the Export Hint for a document.

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

Definition at line 125 of file exphint.h.


Constructor & Destructor Documentation

ExportHint::ExportHint  ) 
 

Default constructor.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/07/97
See also:
-

Definition at line 132 of file exphint.cpp.

00133 {
00134     m_Type = HINTTYPE_BAD;
00135     m_Width = 0;
00136     m_Height = 0;
00137     m_BPP = 0;
00138 
00139     // The contructor of the string should ensure this but...
00140     m_sOptions.Empty();
00141 }

ExportHint::ExportHint const ExportHint other  ) 
 

Copy constructor.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/07/97
See also:
-

Definition at line 155 of file exphint.cpp.

00156 {
00157     // Use the assignment operator
00158     *(this) = other;
00159 }

ExportHint::~ExportHint  )  [inline]
 

Definition at line 134 of file exphint.h.

00134 {};


Member Function Documentation

ExportHint::CC_DECLARE_MEMDUMP ExportHint   )  [private]
 

UINT32 ExportHint::GetBPP void   )  [inline]
 

Definition at line 141 of file exphint.h.

00141 { return(m_BPP); };

UINT32 ExportHint::GetHeight void   )  [inline]
 

Definition at line 140 of file exphint.h.

00140 { return(m_Height); };

const String_256& ExportHint::GetOptionsString void   )  [inline]
 

Definition at line 142 of file exphint.h.

00142 { return(m_sOptions); };

UINT32 ExportHint::GetType void   )  [inline]
 

Definition at line 138 of file exphint.h.

00138 { return(m_Type); };

UINT32 ExportHint::GetWidth void   )  [inline]
 

Definition at line 139 of file exphint.h.

00139 { return(m_Width); };

BOOL ExportHint::InitFromRecord CXaraFileRecord pRecord  ) 
 

Initialises the hint from a Flare record.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/07/97
See also:
-

Definition at line 197 of file exphint.cpp.

00198 {
00199     String_256 sOptions;
00200 
00201     BOOL ok = pRecord->ReadUINT32(&m_Type);
00202     if (ok) ok = pRecord->ReadUINT32(&m_Width);
00203     if (ok) ok = pRecord->ReadUINT32(&m_Height);
00204     if (ok) ok = pRecord->ReadUINT32(&m_BPP);
00205     if (ok) ok = pRecord->ReadASCII(sOptions, 256);
00206 
00207     m_sOptions = sOptions;
00208 
00209     return(ok);
00210 }

const ExportHint & ExportHint::operator= const ExportHint other  ) 
 

Assignment operator.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/07/97
See also:
-

Definition at line 173 of file exphint.cpp.

00174 {
00175     m_Type = other.m_Type;
00176     m_Width = other.m_Width;
00177     m_Height = other.m_Height;
00178     m_BPP = other.m_BPP;
00179     m_sOptions = other.m_sOptions;
00180 
00181     return(*this);
00182 }

void ExportHint::SetBPP UINT32  BPP  )  [inline]
 

Definition at line 147 of file exphint.h.

00147 { m_BPP = BPP; };

void ExportHint::SetHeight UINT32  Height  )  [inline]
 

Definition at line 146 of file exphint.h.

00146 { m_Height = Height; };

void ExportHint::SetOptionsString const String_256 sOpt  )  [inline]
 

Definition at line 148 of file exphint.h.

00148 { m_sOptions = sOpt; };

void ExportHint::SetType UINT32  Type  )  [inline]
 

Definition at line 144 of file exphint.h.

00144 { m_Type = Type; };

void ExportHint::SetWidth UINT32  Width  )  [inline]
 

Definition at line 145 of file exphint.h.

00145 { m_Width = Width; };

BOOL ExportHint::WriteExportHintRecord BaseCamelotFilter pFilter  ) 
 

Writes the hint to a Flare record.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/07/97
See also:
-

Definition at line 225 of file exphint.cpp.

00226 {
00227     // If the hint hasn't been set then don't save it
00228     if (m_Type == HINTTYPE_BAD)
00229         return(TRUE);
00230     
00231     // Add a description of the TAG_EXPORT_HINT record
00232     pFilter->AddTagDescription(TAG_EXPORT_HINT, _R(IDS_TAG_EXPORT_HINT));
00233 
00234     BOOL ok = TRUE;
00235     // Create a record (variable length)
00236     CXaraFileRecord Rec(TAG_EXPORT_HINT);
00237     ok = Rec.Init();
00238 
00239     if (ok) ok = Rec.WriteUINT32(m_Type);
00240     if (ok) ok = Rec.WriteUINT32(m_Width);
00241     if (ok) ok = Rec.WriteUINT32(m_Height);
00242     if (ok) ok = Rec.WriteUINT32(m_BPP);
00243     if (ok) ok = Rec.WriteASCII(m_sOptions);
00244 
00245     INT32 RecNum = 0;
00246     if (ok) RecNum = pFilter->Write(&Rec);  // Write the record
00247     if (RecNum == 0)
00248         ok = FALSE;
00249 
00250     return(ok);
00251 }


Member Data Documentation

UINT32 ExportHint::m_BPP [protected]
 

Definition at line 163 of file exphint.h.

UINT32 ExportHint::m_Height [protected]
 

Definition at line 162 of file exphint.h.

String_256 ExportHint::m_sOptions [protected]
 

Definition at line 164 of file exphint.h.

UINT32 ExportHint::m_Type [protected]
 

Definition at line 160 of file exphint.h.

UINT32 ExportHint::m_Width [protected]
 

Definition at line 161 of file exphint.h.


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