Namespaces | Defines | Functions | Variables

ocipl.cpp File Reference

OCIPL implementation file. More...

#include "ocipl.h"
#include <sstream>
#include <locale>
#include <assert.h>
#include <time.h>
#include <sql2oci.h>
Include dependency graph for ocipl.cpp:

Go to the source code of this file.


namespace  OCIPL


#define _olint


char * strupr (char *s)
size_t max_strlen (const char *s, size_t max_len)
char * max_strdup (const char *s, size_t max_len)
void OCIPL::throw_oci_exception (OCIError *errh, sword res)
void OCIPL::throw_oci_exception (OCIEnv *envh, sword res)
int OCIPL::number_to_int (const oraclenumber &val, OCIError *errh)
double OCIPL::number_to_double (const oraclenumber &val, OCIError *errh)
tstring OCIPL::number_to_str (const oraclenumber &val, OCIError *errh, const TCHAR *fmt, const TCHAR *nls_fmt)
tstring OCIPL::ocidate_to_string (const OCIDate &date)
tstring OCIPL::ocidate_to_short_string (const OCIDate &date)
struct tm * OCIPL::ocidate_to_gmt (const OCIDate &date)
struct tm * OCIPL::ocidate_to_lctime (const OCIDate &date)
time_t OCIPL::ocidate_to_time_t (const OCIDate &date)
tstring OCIPL::ocidatetime_to_string (const ocidatetime &date)
const TCHAR * OCIPL::get_oci_ptype_str (ub1 type)
static tstring OCIPL::tokenize (const TCHAR **ptr, const TCHAR *sep)
static tstring OCIPL::tokenize (const TCHAR **ptr, const TCHAR *sep, TCHAR key)



Detailed Description

OCIPL implementation file.

Definition in file ocipl.cpp.

Define Documentation

#define _olint

Definition at line 46 of file ocipl.cpp.


Definition at line 43 of file ocipl.cpp.

Function Documentation

char* max_strdup ( const char *  s,
size_t  max_len 

Definition at line 79 of file ocipl.cpp.

References max_strlen().

Referenced by OCIPL::OciException::OciException().

    if (!s)
        return NULL;

    size_t l = max_strlen(s, max_len);
    char* ret = (char*) malloc(l+1);

    strncpy_s(ret, l+1, s, l);
    strncpy(ret, s, l);
    ret[l] = '\0';

    return ret;

Here is the call graph for this function:

Here is the caller graph for this function:

size_t max_strlen ( const char *  s,
size_t  max_len 

Definition at line 66 of file ocipl.cpp.

Referenced by max_strdup(), and OCIPL::OciException::OciException().

    if (!s)
        return 0;

    size_t cnt = 0;

    while(cnt<max_len && *s)
        ++cnt, ++s;

    return cnt;

Here is the caller graph for this function:

char* strupr ( char *  s )

Definition at line 57 of file ocipl.cpp.

    for(char*p=s; *p; ++p)
        *p = toupper(*p);

    return s;