Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Examples  

TLob.h

00001 #ifndef __TLOB_H_
00002 #define __TLOB_H_
00003 
00004 #include "BFile.h"
00005 #include "Lob.h"
00006 #include "ocicpp.h"
00007 #include "OraError.h"
00008 
00009 #if ( OCILIBVERMAJOR>=8 && OCILIBVERMINOR>=1 ) || DOXYGEN
00010 
00011 namespace OCICPP {
00012 
00013 class TLob {
00014 private:
00015     OCILobLocator *lob;
00016     OCIError *errhp;
00017     OCISvcCtx *svchp;
00018     int type; /* CLOB or BLOB */
00019     unsigned len; /* Overall length */
00020     unsigned offset; /* Current offset default 1 */
00021     int cache; /* CACHE_ON or CACHE_OFF not supported yet */
00022 public:
00023     TLob();
00024     OCICPP::TLob::TLob(OCIEnv *env,OCISvcCtx *svcctx,OCIError *err,int lob_type,int cache_mode);
00025     void init(OCIEnv *envhp,OCISvcCtx *svcctx,OCIError *err,int lob_type,int cache_mode);
00026     ~TLob();
00027     void drop();
00028     void seek(unsigned offset,int dir); /* Set's the current position
00029                                  dir is SET or CUR or END
00030                                  similair to stdc seek call 
00031                               */
00032     unsigned tell();
00033     unsigned read(void *buff,int blen); /* returns number of bytes or chracters actually read */
00034     unsigned write(const void *buff,int blen);
00035     void trunc(unsigned); /* Truncate lob */
00036     void loadFromBFile(BFile &bfile,unsigned int amount,unsigned int dst_offset,unsigned int src_offset);
00037     void setCacheMode(int mode); /* mode is CACHE_ON or CACHE_OFF */
00038     unsigned getLen() const;
00039     void copyFrom(Lob &src_lob,unsigned amount,unsigned dst_off,unsigned src_off);
00040     void copyFrom(TLob &src_lob,unsigned amount,unsigned dst_off,unsigned src_off);
00041     void copyFrom(BFile &src_file,unsigned amount,unsigned dst_off,unsigned src_off);       
00042     
00043     friend class Lob;
00044 };  
00045     
00046 }
00047 
00048 #endif
00049 
00050 #endif

Generated at Tue Jun 12 10:37:29 2001 for OCI C++ Library by doxygen1.2.4-20010128 written by Dimitri van Heesch, © 1997-2001