Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

fbwrap::FBwBlob Class Reference

#include <FBwBlob.h>

List of all members.

Public Methods

 FBwBlob (FBwDb *pdb)
 Constructor.

 FBwBlob (FBwDb *pdb, string Tabla, string Columna)
 Constructor.

void WriteSegment (const char *buffer, int size)
 Writes a segment of data to blob.

void Write (const string &value)
 Writes a string to a blob.

int ReadSegment ()
 Reads a segment of data into internal segment buffer.

int ReadSegment (char *buffer, int seglen)
 Reads a segment of data into an external buffer.

int Read (char *b, int len)
 Reads data into an external buffer.

int Size ()
 Returns Total blob size.

void SetDB (FBwDb *pdb)
 Sets database pointer.

bool Open (ISC_QUAD *pblob_id)
 open blob

bool Rewind ()
 Reopens current blob for reading.

bool Create (ISC_QUAD *pblob_id)
 creates new blob

bool Close ()
 closes blob

bool Cancel ()
 cancels blob creation

char * GetSegmentBuffer ()
 gets pointer to internal segment buffer

int GetSegmentLength ()
 gets segment length

bool IsOpened ()
 checks wether the blob is open or not

bool eof ()
 checks wether we have read all blob data

ISC_QUAD * GetBlobId ()
 Gets blob ID.

virtual ~FBwBlob ()
 Destructor.

bool Error ()
 flags any error condition


Protected Methods

void AllocSegBuf ()
 creates internal segment buffer

void GetBlobInfo ()
 Gets blob information.


Detailed Description

Blob interface


Constructor & Destructor Documentation

fbwrap::FBwBlob::FBwBlob FBwDb   pdb
 

Constructor.

Constructor for generic blob not bounded to any particular column

Parameters:
pdb:  pointer to database

fbwrap::FBwBlob::FBwBlob FBwDb   pdb,
string    Tabla,
string    Columna
 

Constructor.

Constructor for blob binded to a particular column

Parameters:
pdb:  pointer to database
Tabla:  table name
Columna:  column name

fbwrap::FBwBlob::~FBwBlob   [virtual]
 

Destructor.

as side efect the blob is closed if it was opened


Member Function Documentation

bool fbwrap::FBwBlob::Create ISC_QUAD *    pblob_id
 

creates new blob

Creates a new blob suitable for writing data on it

Parameters:
pblob_id:  holds blob id of the new blob after create

bool fbwrap::FBwBlob::eof   [inline]
 

checks wether we have read all blob data

Test wether we have read all blob data

Returns :
true if blob has no more data to read

bool fbwrap::FBwBlob::Error   [inline]
 

flags any error condition

Returns :
true if last operation ended in an error condition

ISC_QUAD* fbwrap::FBwBlob::GetBlobId   [inline]
 

Gets blob ID.

Usefull for obtaining blob id when created

bool fbwrap::FBwBlob::IsOpened   [inline]
 

checks wether the blob is open or not

Returns :
true if blob is opened

bool fbwrap::FBwBlob::Open ISC_QUAD *    pblob_id
 

open blob

Open blob for reading

Parameters:
pblob_id:  blob id

int fbwrap::FBwBlob::Read char *    b,
int    len
 

Reads data into an external buffer.

Reads at most len bytes of data into buffer b

Parameters:
buffer:  buffer for data read
len:  number of bytes to read
Returns :
bytes actually read

int fbwrap::FBwBlob::ReadSegment char *    buffer,
int    seglen
 

Reads a segment of data into an external buffer.

Reads a segment of data to an external buffer. Parameter seglen must be greater or equal to the blob segment size. In case the segment length is greater than seglen, ReadSegment will read at most seglen bytes and the next call to ReadSegment will read de rest of the segment.

Parameters:
buffer:  buffer for data read
seglen:  Segment length
Returns :
bytes actually read


The documentation for this class was generated from the following files:
Generated on Fri Jan 31 08:30:04 2003 for fbwrap by doxygen1.2.17