DataBuffer.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_IMAGE_DATABUFFER_H
00002 #define JAVA_AWT_IMAGE_DATABUFFER_H 1
00003 
00004 #ifndef JAVA_LANG_OBJECT_H
00005 #include <java_lang/Object.h>
00006 #endif /* JAVA_LANG_OBJECT_H */
00007 #ifndef JAVA_AWT_SPEC
00008 #include <java_awt/Spec.h>
00009 #endif /* JAVA_AWT_SPEC */
00010 
00011 namespace java {
00012   namespace awt {
00013     namespace image {
00014 
00015       class JAVA_AWT_SPEC DataBuffer : virtual public Object {
00016 
00017       public:
00018 
00019         enum DATA_BUFFER_TYPE {
00020 
00022           TYPE_BYTE,
00023 
00025           TYPE_SHORT,
00026 
00028           TYPE_INT,
00029 
00031           TYPE_FLOAT,
00032 
00034           TYPE_DOUBLE,
00035 
00037           TYPE_UNDEFINED = 32,
00038  
00039         };
00040 
00047         static jint getDataTypeSize(jint type);
00048 
00052         virtual jint getDataType() const;
00053 
00057         virtual jint getSize() const;
00058 
00062         virtual jint getNumBanks() const;
00063 
00068         virtual jint getOffset(jint bank = 0) const;
00069 
00073         virtual const Array<jint>& getOffsets() const;
00074 
00085         virtual jint getElem(jint i, jint bank = 0) const = 0;
00086 
00097         virtual void setElem(jint i, jint val, jint bank = 0) = 0;
00098 
00112         virtual jfloat getElemFloat(jint i, jint bank = 0) const;
00113 
00126         virtual void setElemFloat(jint i, jfloat val, jint bank = 0);
00127 
00140         virtual jdouble getElemDouble(jint i, jint bank = 0) const;
00141 
00154         virtual void setElemDouble(jint i, jdouble val, jint bank = 0);
00155 
00156       protected:
00157 
00167         DataBuffer(jint dataType, jint size, jint numBank = 1, jint offset = 0);
00168 
00182         DataBuffer(jint dataType, jint size, jint numBank, const Array<jint>& offsets);
00183 
00185         jint dataType;
00186  
00188         jint size;
00189 
00191         jint banks;
00192 
00194         Array<jint> offsets;
00195 
00196         REGISTER_MEMBERS;
00197 
00198       };
00199 
00200     } // namespace image
00201   } // namespace awt
00202 } // namespace java
00203 
00204 #endif /* JAVA_AWT_IMAGE_DATABUFFER_H */

Generated on Fri May 16 11:54:42 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3