Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

vconvert.h File Reference

Go to the source code of this file.

Classes

class  PColourConverterRegistration
class  PColourConverter
class  PSynonymColour
class  PSynonymColourRegistration

Defines

#define _PCONVERT
#define PCOLOUR_CONVERTER2(cls, ancestor, src, dst)
#define PCOLOUR_CONVERTER(cls, src, dst)   PCOLOUR_CONVERTER2(cls,PColourConverter,src,dst)
#define PSYNONYM_COLOUR_CONVERTER(from, to)   static PSynonymColourRegistration p_##from##_##to##_registration_instance(#from,#to)


Define Documentation

#define _PCONVERT
 

#define PCOLOUR_CONVERTER cls,
src,
dst   )     PCOLOUR_CONVERTER2(cls,PColourConverter,src,dst)
 

Declare a colour converter class with Convert() function. This should only be used once and at the global scope level for each converter. It declares everything needs so only the body of the Convert() function need be added.

#define PCOLOUR_CONVERTER2 cls,
ancestor,
src,
dst   ) 
 

Value:

class cls : public ancestor { \
  public: \
  cls(const PString & srcFmt, const PString & dstFmt, unsigned w, unsigned h) \
    : ancestor(srcFmt, dstFmt, w, h) { } \
  virtual BOOL Convert(const BYTE *, BYTE *, PINDEX * = NULL); \
}; \
static class cls##_Registration : public PColourConverterRegistration { \
  public: \
  cls##_Registration() \
    : PColourConverterRegistration(src,dst) { } \
  virtual PColourConverter * Create(unsigned w, unsigned h) const; \
} p_##cls##_registration_instance; \
PColourConverter * cls##_Registration::Create(unsigned w, unsigned h) const \
  { PINDEX tab = Find('\t'); return new cls(Left(tab), Mid(tab+1), w, h); } \
BOOL cls::Convert(const BYTE *srcFrameBuffer, BYTE *dstFrameBuffer, PINDEX * bytesReturned)
Declare a colour converter class with Convert() function. This should only be used once and at the global scope level for each converter. It declares everything needs so only the body of the Convert() function need be added.

#define PSYNONYM_COLOUR_CONVERTER from,
to   )     static PSynonymColourRegistration p_##from##_##to##_registration_instance(#from,#to)
 

Define synonym colour format. This is a class that defines for which no conversion is required between the specified colour format names.


Generated on Wed Sep 28 10:27:34 2005 for PWLib by  doxygen 1.4.4