Palette Class Reference

Something that should have been done long ago... More...

#include <gifutil.h>

List of all members.

Public Member Functions

 Palette ()
 ~Palette ()
BOOL SetSize (const UINT32 nSize)
BOOL IsConstructedOK () const
const PaletteIteratorStart () const
const PaletteIteratorEnd () const

Protected Member Functions

 Palette (const Palette &otherPalette)

Protected Attributes

LPRGBQUAD m_pColours
UINT32 m_nSize
PaletteIterator m_StartIterator
PaletteIterator m_EndIterator

Private Member Functions

 CC_DECLARE_MEMDUMP (Palette)

Private Attributes

BOOL m_bInitOK


Detailed Description

Something that should have been done long ago...

Author:
Colin
Date:
24/4/95
See also:
Everywhere

Definition at line 181 of file gifutil.h.


Constructor & Destructor Documentation

Palette::Palette  )  [inline]
 

Definition at line 186 of file gifutil.h.

00186 : m_pColours(NULL), m_nSize(0) {}

Palette::~Palette  ) 
 

Definition at line 27 of file gifutil.cpp.

00028 {
00029     if (m_pColours)
00030         delete [] m_pColours;
00031     m_pColours = NULL;          // ensure state correct
00032     m_nSize = 0;
00033 }

Palette::Palette const Palette otherPalette  )  [protected]
 

Definition at line 37 of file gifutil.cpp.

00038 {
00039     if (&otherPalette == this) return;
00040 
00041     if (otherPalette.m_nSize > m_nSize)
00042         delete [] m_pColours;
00043         m_pColours = new RGBQUAD[otherPalette.m_nSize];
00044         if (m_pColours == NULL)
00045         {
00046             m_bInitOK = FALSE;
00047             return;
00048         }
00049     m_nSize = otherPalette.m_nSize;
00050     memcpy(m_pColours, otherPalette.m_pColours, m_nSize);
00051     m_bInitOK = TRUE;
00052 }


Member Function Documentation

Palette::CC_DECLARE_MEMDUMP Palette   )  [private]
 

const PaletteIterator& Palette::End  )  const [inline]
 

Definition at line 201 of file gifutil.h.

00202     {   return m_EndIterator;   }

BOOL Palette::IsConstructedOK  )  const [inline]
 

Definition at line 194 of file gifutil.h.

00195     {   return m_bInitOK;   }

BOOL Palette::SetSize const UINT32  nNewSize  ) 
 

Author:
Colin
Date:
29/6/95
Parameters:
fd pointer to a CCLexFile to read the data from [INPUTS]
- [OUTPUTS]
Returns:
True if worked ok, False otherwise.
See also:

Definition at line 1079 of file gifutil.cpp.

01080 {
01081     if (nNewSize == m_nSize) return TRUE;
01082     if (m_pColours != NULL)
01083     {
01084         delete [] m_pColours;
01085     }
01086     if (nNewSize == 0)
01087     {
01088         m_pColours = NULL;
01089         return TRUE;
01090     }
01091     m_pColours = new RGBQUAD[nNewSize];
01092 //  m_StartIterator;
01093 //  m_EndIterator;
01094     return (m_pColours == NULL) ? FALSE : TRUE;
01095 }

const PaletteIterator& Palette::Start  )  const [inline]
 

Definition at line 198 of file gifutil.h.

00199     {   return m_StartIterator; }


Member Data Documentation

BOOL Palette::m_bInitOK [private]
 

Definition at line 215 of file gifutil.h.

PaletteIterator Palette::m_EndIterator [protected]
 

Definition at line 212 of file gifutil.h.

UINT32 Palette::m_nSize [protected]
 

Definition at line 209 of file gifutil.h.

LPRGBQUAD Palette::m_pColours [protected]
 

Definition at line 208 of file gifutil.h.

PaletteIterator Palette::m_StartIterator [protected]
 

Definition at line 211 of file gifutil.h.


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