Logo
~Database~
~ C++ ~
~Contact~

DSQLHRES Class Reference

#include <Query.h>

Collaboration diagram for DSQLHRES:

Collaboration graph
List of all members.

Public Member Functions

 DSQLHRES (int)
 ~DSQLHRES ()
void add_col (SQLHCOL *)

Public Attributes

SQLSMALLINT m_num_cols
SQLHCOL ** m_cols

Private Attributes

SQLHCOLm_colbase
int m_qcols

Detailed Description

Definition at line 107 of file Query.h.


Constructor & Destructor Documentation

DSQLHRES::DSQLHRES int   ) 
 

Definition at line 1060 of file Query.cpp.

References m_colbase, m_cols, and m_qcols.

01060                         : m_num_cols((SQLSMALLINT)q)
01061 {
01062         m_colbase = NULL;
01063         m_cols = new SQLHCOL *[q + 1];
01064         for (int i = 0; i <= q; i++)
01065         {
01066                 m_cols[i] = NULL;
01067         }
01068         m_qcols = 0;
01069 }

DSQLHRES::~DSQLHRES  ) 
 

Definition at line 1072 of file Query.cpp.

References m_colbase, and m_cols.

01073 {
01074         SQLHCOL *tmp;
01075 
01076         while (m_colbase)
01077         {
01078                 tmp = m_colbase -> next;
01079                 // ta bort members i m_colbase
01080                 delete m_colbase -> buffer;
01081                 if (m_colbase -> tmpstr)
01082                 {
01083                         delete m_colbase -> tmpstr;
01084                 }
01085                 // ta bort m_colbase
01086                 delete m_colbase;
01087                 m_colbase = tmp;
01088         }
01089         delete m_cols;
01090 }


Member Function Documentation

void DSQLHRES::add_col SQLHCOL  ) 
 

Definition at line 1093 of file Query.cpp.

References m_colbase, m_cols, and m_qcols.

01094 {
01095         SQLHCOL *q = m_colbase;
01096 
01097         item -> next = NULL;
01098         if (!q)
01099         {
01100                 m_colbase = item;
01101         }
01102         else
01103         {
01104                 while (q -> next)
01105                 {
01106                         q = q -> next;
01107                 }
01108                 q -> next = item;
01109         }
01110         m_qcols++;
01111         m_cols[m_qcols] = item;
01112 }


Member Data Documentation

SQLHCOL* DSQLHRES::m_colbase [private]
 

Definition at line 119 of file Query.h.

Referenced by add_col(), DSQLHRES(), and ~DSQLHRES().

SQLHCOL** DSQLHRES::m_cols
 

Definition at line 116 of file Query.h.

Referenced by add_col(), DSQLHRES(), and ~DSQLHRES().

SQLSMALLINT DSQLHRES::m_num_cols
 

Definition at line 115 of file Query.h.

int DSQLHRES::m_qcols [private]
 

Definition at line 120 of file Query.h.

Referenced by add_col(), and DSQLHRES().


The documentation for this class was generated from the following files:
Page, code, and content Copyright (C) 2006 by Anders Hedström