Public Member Functions | Protected Attributes

OCIPL::SqlIntArray Struct Reference

array of integer bind variable buffers More...

#include <ocipl.h>

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

List of all members.

Public Member Functions

 SqlIntArray (int size=g_OCIPL_BULK_ROWS)
 SqlIntArray (const SqlIntArray &other)
 ~SqlIntArray ()
int get_int (int row, int null=INT_NULL) const
int * get_ref (int row)
const int * get_ptr (int row) const
tstring 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

int * _pvalues
int _count
SqlInd_pind

Detailed Description

array of integer bind variable buffers

Definition at line 1364 of file ocipl.h.


Constructor & Destructor Documentation

OCIPL::SqlIntArray::SqlIntArray ( int  size = g_OCIPL_BULK_ROWS ) [inline]

Definition at line 1367 of file ocipl.h.

     :  SqlIndArray(size),
        _pvalues(static_cast<int*>(ocipl_alloc(size*sizeof(int))))
    {
    }
OCIPL::SqlIntArray::SqlIntArray ( const SqlIntArray other ) [inline]

Definition at line 1373 of file ocipl.h.

References OCIPL::SqlIndArray::_count, and _pvalues.

     :  SqlIndArray(other),
        _pvalues(static_cast<int*>(ocipl_alloc(other._count*sizeof(int))))
    {
        if (_pvalues)
            memcpy(_pvalues, other._pvalues, other._count*sizeof(int));
    }
OCIPL::SqlIntArray::~SqlIntArray (  ) [inline]

Definition at line 1381 of file ocipl.h.

References ocipl_free.


Member Function Documentation

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:

int OCIPL::SqlIntArray::get_int ( int  row,
int  null = INT_NULL 
) const [inline]

Definition at line 1386 of file ocipl.h.

{return _pind[row].is_not_null()? _pvalues[row]: null;}
const int* OCIPL::SqlIntArray::get_ptr ( int  row ) const [inline]

Definition at line 1389 of file ocipl.h.

{return &_pvalues[row];}
int* OCIPL::SqlIntArray::get_ref ( int  row ) [inline]

Definition at line 1388 of file ocipl.h.

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

{return &_pvalues[row];}

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];}
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:

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();}
tstring OCIPL::SqlIntArray::str ( int  row ) const [inline]

Definition at line 1391 of file ocipl.h.

References _stprintf_s1, TCHAR, and TEXT.

    {
        if (_pind[row].is_not_null()) {
            TCHAR buffer[16];
            _stprintf_s1(buffer, sizeof(buffer)/sizeof(TCHAR), TEXT("%d"), _pvalues[row]);
            return buffer;
        } else
            return tstring();
    }

Member Data Documentation

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().

int* OCIPL::SqlIntArray::_pvalues [protected]

Definition at line 1402 of file ocipl.h.

Referenced by SqlIntArray().


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