Public Member Functions | Protected Attributes

OCIPL::SqlStringArray Struct Reference

array of string bind variable buffers More...

#include <ocipl.h>

Inheritance diagram for OCIPL::SqlStringArray:
Inheritance graph
[legend]
Collaboration diagram for OCIPL::SqlStringArray:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SqlStringArray (int size=g_OCIPL_BULK_ROWS, int blen=OCIPL_DEFAULT_STRING_BUFFER)
 SqlStringArray (const SqlStringArray &other)
 ~SqlStringArray ()
size_t len (int row) const
size_t blen () const
size_t alen () const
void clear (int row)
void assign (int row, const TCHAR *s)
TCHAR * str (int row)
const TCHAR * c_str (int row) const
bool is_null (int idx) const
bool is_not_null (int idx) const
const SqlIndind (int idx) const
SqlIndind (int idx)
int get_buffer_count () const

Protected Attributes

size_t _blen
TCHAR * _buffer
int _count
SqlInd_pind

Detailed Description

array of string bind variable buffers

Definition at line 1488 of file ocipl.h.


Constructor & Destructor Documentation

OCIPL::SqlStringArray::SqlStringArray ( int  size = g_OCIPL_BULK_ROWS,
int  blen = OCIPL_DEFAULT_STRING_BUFFER 
) [inline]

Definition at line 1491 of file ocipl.h.

References TCHAR.

     :  SqlIndArray(size),
        _blen(blen),
        _buffer(static_cast<TCHAR*>(ocipl_alloc(size*(blen+1)*sizeof(TCHAR))))
    {
        if (_buffer)
            memset(_buffer, 0, size*(blen+1)*sizeof(TCHAR));
    }
OCIPL::SqlStringArray::SqlStringArray ( const SqlStringArray other ) [inline]

Definition at line 1500 of file ocipl.h.

References _blen, OCIPL::SqlIndArray::_count, and TCHAR.

     :  SqlIndArray(other),
        _blen(other._blen),
        _buffer(static_cast<TCHAR*>(ocipl_alloc(other._count*(other._blen+1)*sizeof(TCHAR))))
    {
        if (_buffer)
            memcpy(_buffer, 0, other._count*(other._blen+1)*sizeof(TCHAR));
    }
OCIPL::SqlStringArray::~SqlStringArray (  ) [inline]

Definition at line 1509 of file ocipl.h.

References ocipl_free.


Member Function Documentation

size_t OCIPL::SqlStringArray::alen (  ) const [inline]

Definition at line 1516 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::bind_input(), and OCIPL::DefinePar::DefinePar().

{return _blen+1;}

Here is the caller graph for this function:

void OCIPL::SqlStringArray::assign ( int  row,
const TCHAR *  s 
) [inline]

Definition at line 1520 of file ocipl.h.

References strcpy_s.

Referenced by OCIPL::SqlVariantArray::set_string().

{strcpy_s(_buffer, _blen, s);}//TODO resize buffer as needed

Here is the caller graph for this function:

size_t OCIPL::SqlStringArray::blen (  ) const [inline]

Definition at line 1515 of file ocipl.h.

{return _blen;}
const TCHAR* OCIPL::SqlStringArray::c_str ( int  row ) const [inline]

Definition at line 1523 of file ocipl.h.

References TEXT.

Referenced by OCIPL::SqlVariantArray::number(), OCIPL::SqlVariantArray::oci_date(), and OCIPL::SqlVariantArray::str().

{return is_not_null(row)? _buffer + row*(_blen+1): TEXT("");}

Here is the caller graph for this function:

void OCIPL::SqlStringArray::clear ( int  row ) [inline]

Definition at line 1518 of file ocipl.h.

{*_buffer = '\0'; _pind[row].clear();}
int OCIPL::SqlIndArray::get_buffer_count (  ) const [inline, inherited]

Definition at line 1285 of file ocipl.h.

Referenced by OCIPL::DefinePar::DefinePar().

{return _count;}

Here is the caller graph for this function:

const SqlInd& OCIPL::SqlIndArray::ind ( int  idx ) const [inline, inherited]

Definition at line 1282 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::bind_input(), and OCIPL::DefinePar::DefinePar().

{return _pind[idx];}

Here is the caller graph for this function:

SqlInd& OCIPL::SqlIndArray::ind ( int  idx ) [inline, inherited]

Definition at line 1283 of file ocipl.h.

{return _pind[idx];}
bool OCIPL::SqlIndArray::is_not_null ( int  idx ) const [inline, inherited]

Definition at line 1280 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::is_not_null(), OCIPL::SqlVariantArray::number(), OCIPL::SqlVariantArray::oci_date(), and OCIPL::SqlVariantArray::sql_date().

{return _pind[idx].is_not_null();}

Here is the caller graph for this function:

bool OCIPL::SqlIndArray::is_null ( int  idx ) const [inline, inherited]

Definition at line 1279 of file ocipl.h.

{return _pind[idx].is_null();}
size_t OCIPL::SqlStringArray::len ( int  row ) const [inline]

Definition at line 1514 of file ocipl.h.

References _tcslen.

{return is_not_null(row)? _tcslen(_buffer): 0;}
TCHAR* OCIPL::SqlStringArray::str ( int  row ) [inline]

Definition at line 1522 of file ocipl.h.

Referenced by OCIPL::SqlVariantArray::bind_input(), and OCIPL::DefinePar::DefinePar().

{return _buffer + row*(_blen+1);}   // Note: _ind is not checked by this function.

Here is the caller graph for this function:


Member Data Documentation

size_t OCIPL::SqlStringArray::_blen [protected]

Definition at line 1526 of file ocipl.h.

Referenced by SqlStringArray().

TCHAR* OCIPL::SqlStringArray::_buffer [protected]

Definition at line 1527 of file ocipl.h.

int OCIPL::SqlIndArray::_count [protected, inherited]
SqlInd* OCIPL::SqlIndArray::_pind [protected, inherited]

Definition at line 1289 of file ocipl.h.

Referenced by OCIPL::SqlIndArray::SqlIndArray().


The documentation for this struct was generated from the following file: