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 #ifndef INC_SML_RASTEROBJECT_H
00026 #define INC_SML_RASTEROBJECT_H
00027
00028 #ifndef INC_SML_OBJECT_H
00029 #include <sml/object.h>
00030 #endif
00031
00032 #ifndef INC_RVC_IMAGE_H
00033 #include <rvc/image.h>
00034 #endif
00035
00036 #ifdef RVCSYSDLL
00037 #define RVCSYSLIBEXPORT MI_DLLEXPORT
00038 #define RVCSYSLIBCLASSEXPORT MI_DLLCLASSEXPORT
00039 #else
00040 #define RVCSYSLIBEXPORT MI_DLLIMPORT
00041 #define RVCSYSLIBCLASSEXPORT MI_DLLCLASSIMPORT
00042 #endif
00043
00044
00045 #ifndef GENERATING_DOXYGEN_OUTPUT
00046 namespace RVC {
00047 class RASTER;
00048 class RASTERHANDLE;
00049 }
00050 #endif
00051
00052 namespace SML {
00053 #ifndef GENERATING_DOXYGEN_OUTPUT
00054 class RASTBUF;
00055 #endif
00056
00057
00062 class RVCSYSLIBCLASSEXPORT RASTEROBJECT : public OBJECT {
00063 public:
00064
00066 int GetCurLin (
00067 ) const;
00068
00070 int GetCurCol (
00071 ) const;
00072
00079 RVC::RASTER* GetInterface (
00080 ) const;
00081
00084 bool GetNullKnown (
00085 ) const;
00086
00089 double GetNullValue (
00090 ) const;
00091
00093 DEPRECATED int GetNumBits (
00094 ) const;
00095
00097 int GetNumCols (
00098 ) const;
00099
00101 int GetNumLins (
00102 ) const;
00103
00106 bool GetUseNull (
00107 ) const;
00108
00110 DEPRECATED int GetDataType (
00111 ) const;
00112
00114 void InvalidateImageStats (
00115 );
00116
00118 void SetCurCol (
00119 int col
00120 );
00121
00123 void SetCurLin (
00124 int lin
00125 );
00126
00127
00129 void SetHistoRead (
00130 bool known
00131 );
00132
00139 void SetInterface (
00140 RVC::RASTER* obj
00141 );
00142
00143 void SetMaxValue (
00144 double val
00145 );
00146
00147 void SetMinValue (
00148 double val
00149 );
00150
00151 void SetNullKnown (
00152 bool known
00153 );
00154
00155 void SetNullValue (
00156 double val
00157 );
00158
00159 void SetUseNull (
00160 bool use
00161 );
00162
00163 void SetupRaster (
00164 );
00165
00167 int Flush (
00168 );
00169
00172 double ReadCell (
00173 int lin,
00174 int col
00175 );
00176
00178 int ReadCell (
00179 int lin,
00180 int col,
00181 double* pval
00182 );
00183
00185 int WriteCell (
00186 int lin,
00187 int col,
00188 double val
00189 );
00190
00192 int WriteSpan (
00193 int lin,
00194 int startcol,
00195 int endcol,
00196 double val
00197 );
00198
00199 private:
00200 #ifndef GENERATING_DOXYGEN_OUTPUT
00202 RASTEROBJECT (
00203 CONTEXT* context
00204 );
00205
00207 virtual ~RASTEROBJECT (
00208 );
00209
00210 virtual int v_OpenLow (
00211 int mode
00212 );
00213
00214 virtual void v_CloseLow (
00215 );
00216
00217 virtual RVC::OBJTYPE v_GetObjType (
00218 ) const;
00219
00220 int AddBuffer (
00221 );
00222
00223 int FindBuffer (
00224 int lin,
00225 int col,
00226 UINT32 flags,
00227 RASTBUF** pbuf
00228 );
00229
00230 RVC::RASTERHANDLE* GetHandle (
00231 ) const { return m_handle; }
00232
00233 INT32 m_numlins;
00234 INT32 m_numcols;
00235 INT32 m_TileCols;
00236 INT32 m_datatype;
00237 INT32 m_numbits;
00238
00239 RASTBUF *m_pBufList;
00240 int m_hit, m_miss, m_numbufs;
00241 double m_nullval;
00242 double m_min, m_max;
00243 bool m_UseNull;
00244 bool m_bUserSetUseNull;
00245 bool m_NullKnown;
00246 RVC::RASTERHANDLE* m_handle;
00247 RVC::RASTERHANDLE* m_NullMaskHandle;
00248
00249 friend class CONTEXT;
00250 friend class OBJECT;
00251 friend class VM;
00252 #endif // GENERATING_DOXYGEN_OUTPUT
00253 };
00254 }
00255
00256
00257 typedef SML::RASTEROBJECT SMLRASTEROBJECT;
00258
00259
00260
00261 #define QQCurRastSymLin(sym) ((sym)->m_obj->GetCurElemNum((ELEMTYPE)0))
00262 #define QQCurRastSymCol(sym) ((sym)->m_obj->GetCurElemNum((ELEMTYPE)1))
00263
00264
00265 #undef RVCSYSLIBEXPORT
00266 #undef RVCSYSLIBCLASSEXPORT
00267
00268 #endif // INC_SML_RASTEROBJECT_H
00269
00270