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

BFile.h

00001 #ifndef __BFILE_H_
00002 #define __BFILE_H_
00003 
00004 #include "ocicpp.h"
00005 #include "OraError.h"
00006 
00007 namespace OCICPP {
00008 
00009 class BFile {
00010 private:
00011     OCILobLocator *lob;
00012     OCIError *errhp;
00013     OCISvcCtx *svchp;
00014     int type; /* FILE */
00015     unsigned len; /* Overall length */
00016     unsigned offset; /* Current offset default 1 */
00017     bool needLobFree;
00018 public:
00019     BFile();
00020     BFile(OCISvcCtx *svcctx,OCILobLocator *lob_desc,OCIError *err);
00021     void init(OCISvcCtx *svcctx,OCILobLocator *lob_desc,OCIError *err);
00022     void init(OCIEnv *env,OCISvcCtx *,OCIError *err,const string &dir,const string &fname);
00023     ~BFile();
00024     void drop();
00025     void seek(unsigned offset,int dir); /* Set's the current position
00026                                  dir is SET or CUR or END
00027                                  similair to stdc seek call 
00028                               */
00029     unsigned tell();
00030     void open();
00031     void close();
00032     
00033     unsigned read(void *buff,int blen); /* returns number of bytes or chracters actually read 
00034                                                     if offset -1 use internal offset set by seek
00035                                                  */
00036     unsigned getLen() const;
00037     friend class Lob;
00038     friend class TLob;
00039 };  
00040     
00041 }
00042 
00043 #endif  
00044 

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