Public Member Functions | Protected Attributes

OCIPL::SqlInt Struct Reference

int wrapper with indicator variable More...

#include <ocipl.h>

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

List of all members.

Public Member Functions

 SqlInt ()
 SqlInt (int value)
 SqlInt (int value, OCIInd ind)
 SqlInt (const SqlInt &other)
 operator int () const
int get_int (int null=INT_NULL) const
int * get_ref ()
const int * get_ptr () const
tstring str () const
bool is_null () const
bool is_not_null () const
const SqlIndind () const
SqlIndind ()

Protected Attributes

int _value
SqlInd _ind

Detailed Description

int wrapper with indicator variable

Definition at line 1295 of file ocipl.h.


Constructor & Destructor Documentation

OCIPL::SqlInt::SqlInt (  ) [inline]

Definition at line 1298 of file ocipl.h.

    {
    }
OCIPL::SqlInt::SqlInt ( int  value ) [inline]

Definition at line 1303 of file ocipl.h.

     :  _value(value)
    {
        _ind.set();
    }
OCIPL::SqlInt::SqlInt ( int  value,
OCIInd  ind 
) [inline]

Definition at line 1310 of file ocipl.h.

     :  SqlValue(ind),
        _value(value)
    {
    }
OCIPL::SqlInt::SqlInt ( const SqlInt other ) [inline]

Definition at line 1317 of file ocipl.h.

     :  SqlValue(other),
        _value(other._value)
    {
    }

Member Function Documentation

int OCIPL::SqlInt::get_int ( int  null = INT_NULL ) const [inline]

Definition at line 1329 of file ocipl.h.

    {
        return _ind.is_not_null()? _value: null;
    }
const int* OCIPL::SqlInt::get_ptr (  ) const [inline]

Definition at line 1341 of file ocipl.h.

Referenced by OCIPL::BindInput::BindInput().

    {
        return &_value;
    }

Here is the caller graph for this function:

int* OCIPL::SqlInt::get_ref (  ) [inline]

Definition at line 1335 of file ocipl.h.

Referenced by OCIPL::BindOutput::BindOutput(), and OCIPL::DefinePar::DefinePar().

    {
        return &_value;
    }

Here is the caller graph for this function:

SqlInd& OCIPL::SqlValue::ind (  ) [inline, inherited]

Definition at line 1245 of file ocipl.h.

{return _ind;}
const SqlInd& OCIPL::SqlValue::ind (  ) const [inline, inherited]
bool OCIPL::SqlValue::is_not_null (  ) const [inline, inherited]

Definition at line 1242 of file ocipl.h.

Referenced by operator int().

{return _ind.is_not_null();}

Here is the caller graph for this function:

bool OCIPL::SqlValue::is_null (  ) const [inline, inherited]

Definition at line 1241 of file ocipl.h.

{return _ind.is_null();}
OCIPL::SqlInt::operator int (  ) const [inline]

Definition at line 1324 of file ocipl.h.

References OCIPL::INT_NULL, and OCIPL::SqlValue::is_not_null().

    {
        return _ind.is_not_null()? _value: INT_NULL;
    }

Here is the call graph for this function:

tstring OCIPL::SqlInt::str (  ) const [inline]

Definition at line 1347 of file ocipl.h.

References _stprintf_s1, TCHAR, and TEXT.

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

Member Data Documentation

SqlInd OCIPL::SqlValue::_ind [protected, inherited]
int OCIPL::SqlInt::_value [protected]

Definition at line 1358 of file ocipl.h.


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