ExportedColours Class Reference

Encapsulate the process of maintaining an list of colours already exported from the current document out to file. More...

#include <expcol.h>

Inheritance diagram for ExportedColours:

CCObject SimpleCCObject List of all members.

Public Member Functions

 ExportedColours ()
 Construct the class which encapsulates a list of exported colours.
 ~ExportedColours ()
 Destroy the class which encapsulates a list of exported colours.
BOOL AddColour (IndexedColour *pNewCol, INT32 RecordNumber)
 Add the specified colour to the list of already exported colours.
BOOL AddColour (PColourRGBT *pNewRGBCol, INT32 RecordNumber)
 Add the specified colour to the list of already exported colours.
ExportColourGetColour (IndexedColour *pSearchCol)
 Find an indexed colour in the exported list.
ExportColourGetColour (PColourRGBT *pNewRGBCol)
 Find a simpple RGB colour in the exported list.

Protected Attributes

ExportColourList Colours

Detailed Description

Encapsulate the process of maintaining an list of colours already exported from the current document out to file.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/5/96
See also:
NewExportColour; ExportColourList

Definition at line 184 of file expcol.h.


Constructor & Destructor Documentation

ExportedColours::ExportedColours  ) 
 

Construct the class which encapsulates a list of exported colours.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/5/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-
See also:
ExportedColours

Definition at line 265 of file expcol.cpp.

00266 {
00267 }

ExportedColours::~ExportedColours  ) 
 

Destroy the class which encapsulates a list of exported colours.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/5/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-
See also:
ExportedColours

Definition at line 283 of file expcol.cpp.

00284 {
00285 }


Member Function Documentation

BOOL ExportedColours::AddColour PColourRGBT pNewRGBCol,
INT32  RecordNumber
 

Add the specified colour to the list of already exported colours.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/6/96
Parameters:
pNewRGBCol - the simple RGB colour to put in the list. [INPUTS] RecordNumber - the number of the record that this colour definition has been saved in.
Returns:
TRUE if the colour could be added; FALSE if not

Errors: -

See also:
ExportColourList;

Definition at line 331 of file expcol.cpp.

00332 {
00333     // Add the colour onto our list
00334     ExportColour * pExpCol = Colours.AddColour(pNewRGBCol, RecordNumber);
00335     if (pExpCol)
00336         return TRUE;
00337     
00338     return FALSE;
00339 }

BOOL ExportedColours::AddColour IndexedColour pNewCol,
INT32  RecordNumber
 

Add the specified colour to the list of already exported colours.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/5/96
Parameters:
pNewCol - the colour to put in the list. [INPUTS] RecordNumber - the number of the record that this colour definition has been saved in.
Returns:
TRUE if the colour could be added; FALSE if not

Errors: -

See also:
ExportColourList;

Definition at line 304 of file expcol.cpp.

00305 {
00306     // Add the colour onto our list
00307     ExportColour * pExpCol = Colours.AddColour(pNewCol, RecordNumber);
00308     if (pExpCol)
00309         return TRUE;
00310     
00311     return FALSE;
00312 }

ExportColour * ExportedColours::GetColour PColourRGBT pSearchRGBCol  ) 
 

Find a simpple RGB colour in the exported list.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/6/96
Parameters:
pSearchRGBCol - the simple RGB colour to search for in the list. [INPUTS]
Returns:
if the item is found then returns - Pointer to the exported colour list item if the item is not found then returns - NULL.
See also:
ExportColourList

Definition at line 391 of file expcol.cpp.

00392 {
00393     if (pSearchRGBCol == NULL)
00394     {
00395         ERROR3("ExportedColours::GetColour (Simple )- searching for a null indexed colour!");
00396     }
00397 
00398     ExportColour* pExportedColour = (ExportColour *)Colours.GetHead();
00399     while (pExportedColour)
00400     {
00401         // Only check if this is a simple colour
00402         if (pExportedColour->pCol == NULL)
00403         {
00404             // Compare the simple RGB colours and return the match if they are the same
00405             if (
00406                 pExportedColour->SimpleRGBColour.Red == pSearchRGBCol->Red &&
00407                 pExportedColour->SimpleRGBColour.Green == pSearchRGBCol->Green &&
00408                 pExportedColour->SimpleRGBColour.Blue == pSearchRGBCol->Blue &&
00409                 pExportedColour->SimpleRGBColour.Transparent == pSearchRGBCol->Transparent
00410                )
00411                 return pExportedColour;
00412         }
00413         
00414         // Try the next colour in the list
00415         pExportedColour = (ExportColour *)Colours.GetNext(pExportedColour);
00416     }
00417 
00418     // No - return failure.
00419     return NULL;
00420 }

ExportColour * ExportedColours::GetColour IndexedColour pSearchCol  ) 
 

Find an indexed colour in the exported list.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/5/96
Parameters:
pSearchCol - the colour to search for in the list. [INPUTS]
Returns:
if the item is found then returns - Pointer to the exported colour list item if the item is not found then returns - NULL.
See also:
ExportColourList

Definition at line 355 of file expcol.cpp.

00356 {
00357     if (pSearchCol == NULL)
00358     {
00359         ERROR3("ExportedColours::GetColour - searching for a null indexed colour!");
00360     }
00361 
00362     ExportColour* pExportedColour = (ExportColour *)Colours.GetHead();
00363     while (pExportedColour)
00364     {
00365         // Compare the indexed colour pointers and return the match if they are the same
00366         if (pExportedColour->pCol == pSearchCol)
00367             return pExportedColour;
00368         
00369         // Try the next colour in the list
00370         pExportedColour = (ExportColour *)Colours.GetNext(pExportedColour);
00371     }
00372 
00373     // No - return failure.
00374     return NULL;
00375 }


Member Data Documentation

ExportColourList ExportedColours::Colours [protected]
 

Definition at line 206 of file expcol.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