00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef INC_MI32_ANYRASTV_H
00034 #define INC_MI32_ANYRASTV_H
00035
00036 #ifndef INC_STRING_H
00037 #include <string.h>
00038 #define INC_STRING_H
00039 #endif
00040
00041 #ifndef INC_MI32_COMPLEX_H
00042 #include <mi32/complex.h>
00043 #endif
00044
00045 union ANYRASTVALUE {
00046 UINT8 ubyte;
00047 INT8 byte;
00048 UINT16 uint2;
00049 INT16 int2;
00050 UINT32 uint4;
00051 INT32 int4;
00052 FLOAT float4;
00053 DOUBLE float8;
00054 UINT8 RGB[3];
00055 UINT8 BGR[3];
00056 UINT8 CMYK[4];
00057 UINT8 KCMY[4];
00058 UINT8 RGBA[4];
00059 UINT8 ARGB[4];
00060 FCOMPLEXRI comp4;
00061 DCOMPLEXRI comp8;
00062 FCOMPLEXMP comp4mp;
00063 DCOMPLEXMP comp8mp;
00064 UINT8 space[32];
00065
00066 ANYRASTVALUE (
00067 ) {
00068 memset(this, 0, sizeof(*this));
00069 }
00070
00071 ANYRASTVALUE (
00072 const ANYRASTVALUE& rhs
00073 ) {
00074 memcpy(this, &rhs, sizeof(*this));
00075 }
00076
00077 ANYRASTVALUE& operator= (
00078 const ANYRASTVALUE& rhs
00079 ) {
00080 if (this != &rhs) memcpy(this, &rhs, sizeof(*this));
00081 return (*this);
00082 }
00083
00084 bool operator== (
00085 const ANYRASTVALUE& rhs
00086 ) {
00087 return (memcmp(this, &rhs, sizeof(ANYRASTVALUE)) == 0);
00088 }
00089
00090 bool operator!= (
00091 const ANYRASTVALUE& rhs
00092 ) {
00093 return (memcmp(this, &rhs, sizeof(ANYRASTVALUE)) != 0);
00094 }
00095
00096 void Clear (
00097 ) {
00098 memset(this, 0, sizeof(*this));
00099 return;
00100 }
00101
00102 };
00103
00104 #endif