Class Hierarchy   Class Index   Method Index  

CHMtable.h

00001 #ifndef __CHM_TABLE__
00002 #define __CHM_TABLE__
00003 
00004 //---------------------------------------------------------------------------
00005 // Module: CHMtable
00006 //
00007 // Description:
00008 //
00009 // This is a thin interface class to the real underlying table class
00010 // This approach is taken to hide the implementation of the HL7 Chameleon
00011 // library from the client application - thus enabling easy upgrading without
00012 // recompilation or relinking.
00013 //
00014 //---------------------------------------------------------------------------
00015 
00016 #include <CHM/CHMminCInclude.h>
00017 #include <CHM/CHMdataType.h>
00018 
00019 CHM_DLL_FUNC(CHMtableCreate)
00020 (
00021    CHMtableHandle* Handle
00022 );
00023 
00024 CHM_DLL_FUNC(CHMtableAddRef)
00025 (
00026    CHMtableHandle Handle
00027 );
00028 
00029 CHM_DLL_FUNC(CHMtableRelease)
00030 (
00031    CHMtableHandle Handle
00032 );
00033 
00034 CHM_DLL_FUNC(CHMtableName)
00035 (
00036    CHMtableHandle  Handle,
00037    char**       pName
00038 );
00039 
00040 CHM_DLL_FUNC(CHMtableGetTableGrammar)
00041 (
00042     CHMtableHandle Handle,
00043     CHMtableGrammarHandle* ppTableGrammar 
00044 );
00045 
00046 CHM_DLL_FUNC(CHMtableSubTable)
00047 (
00048    CHMtableHandle  Handle,
00049    size_t          RowIndex,
00050    size_t          TableIndex,
00051    CHMtableHandle* pSubTable
00052 );
00053 
00054 CHM_DLL_FUNC(CHMtableGetSubTableIndex)
00055 (
00056     CHMtableHandle Handle,
00057     const char*    pSubTableName,
00058     size_t*        pSubTableIndex
00059 );
00060 
00061 CHM_DLL_FUNC(CHMtableCountOfColumn)
00062 (
00063    CHMtableHandle Handle,
00064    size_t*        Count
00065 );
00066 
00067 CHM_DLL_FUNC(CHMtableCountOfRow)
00068 (
00069    CHMtableHandle Handle,
00070    size_t*        Count
00071 );
00072 
00073 CHM_DLL_FUNC(CHMtableCountOfSubTable)
00074 (
00075    CHMtableHandle Handle,
00076    size_t*        Count
00077 );
00078 
00079 CHM_DLL_FUNC(CHMtableColumnType)
00080 (
00081    CHMtableHandle Handle,
00082    size_t         ColumnIndex,
00083    CHMdataType*   pDataType
00084 );
00085 
00086 CHM_DLL_FUNC(CHMtableColumnName)
00087 (
00088    CHMtableHandle Handle,
00089    size_t         ColumnIndex,
00090    const char**   ppColumnName
00091 );
00092 
00093 CHM_DLL_FUNC(CHMtableColumnIndex)
00094 (
00095    CHMtableHandle Handle,
00096    const char*    pColumnName,
00097    size_t*        pColumnIndex
00098 );
00099 
00100 CHM_DLL_FUNC(CHMtableIsNull)
00101 (
00102    CHMtableHandle Handle,
00103    size_t         ColumnIndex,
00104    size_t         RowIndex,
00105    CHMboolean*    pIsNull
00106 );
00107 
00108 CHM_DLL_FUNC(CHMtableState)
00109 (
00110    CHMtableHandle Handle,
00111    size_t         ColumnIndex,
00112    size_t         RowIndex,
00113    size_t*        pState
00114 );
00115 
00116 CHM_DLL_FUNC(CHMtableSetNull)
00117 (
00118    CHMtableHandle Handle,
00119    size_t         ColumnIndex,
00120    size_t         RowIndex
00121 );
00122 
00123 CHM_DLL_FUNC(CHMtableGetStringA)
00124 (
00125    CHMtableHandle  Handle,
00126    size_t          ColumnIndex,
00127    size_t          RowIndex,
00128    const char**    pString
00129 );
00130 
00131 CHM_DLL_FUNC(CHMtableGetStringW)
00132 (
00133    CHMtableHandle  Handle,
00134    size_t          ColumnIndex,
00135    size_t          RowIndex,
00136    const wchar_t** pString
00137 );
00138 
00139 CHM_DLL_FUNC(CHMtableGetDouble)
00140 (
00141    CHMtableHandle  Handle,
00142    size_t          ColumnIndex,
00143    size_t          RowIndex,
00144    double*         pValue
00145 );
00146 
00147 CHM_DLL_FUNC(CHMtableGetInteger)
00148 (
00149    CHMtableHandle  Handle,
00150    size_t          ColumnIndex,
00151    size_t          RowIndex,
00152    long*           pInteger
00153 );
00154    
00155 CHM_DLL_FUNC(CHMtableGetDateTime)
00156 (
00157    CHMtableHandle     Handle,
00158    size_t             ColumnIndex,
00159    size_t             RowIndex,
00160    CHMdateTimeHandle* pDateTime
00161 );
00162 
00163 CHM_DLL_FUNC(CHMtableSetStringA)
00164 (
00165    CHMtableHandle Handle,
00166    size_t         ColumnIndex,
00167    size_t         RowIndex,
00168    const char*    Value
00169 );
00170 
00171 CHM_DLL_FUNC(CHMtableSetStringW)
00172 (
00173    CHMtableHandle Handle,
00174    size_t         ColumnIndex,
00175    size_t         RowIndex,
00176    const wchar_t* Value
00177 );
00178 
00179 CHM_DLL_FUNC(CHMtableSetDouble)
00180 (
00181    CHMtableHandle Handle,
00182    size_t         ColumnIndex,
00183    size_t         RowIndex,
00184    double         Value
00185 );
00186 
00187 CHM_DLL_FUNC(CHMtableSetInteger)
00188 (
00189    CHMtableHandle Handle,
00190    size_t         ColumnIndex,
00191    size_t         RowIndex,
00192    long           Value
00193 );
00194 
00195 CHM_DLL_FUNC(CHMtableSetDateTime)
00196 (
00197    CHMtableHandle    Handle,
00198    size_t            ColumnIndex,
00199    size_t            RowIndex,
00200    CHMdateTimeHandle Value
00201 );
00202 
00203 CHM_DLL_FUNC(CHMtableAddRow)
00204 (
00205    CHMtableHandle    Handle
00206 );
00207 
00208 // user must free buffer from the dump function
00209 // use the free function below.
00210 CHM_DLL_FUNC(CHMtableDump)
00211 (
00212    CHMtableHandle Handle,
00213    char**         ppDumpString
00214 );
00215 
00216 CHM_DLL_FUNC(CHMtableDumpW)
00217 (
00218    CHMtableHandle Handle,
00219    wchar_t**      ppDumpString
00220 );
00221 
00222 CHM_DLL_FUNC(CHMtableFreeBuffer)
00223 (
00224    char** ppString
00225 );
00226 
00227 CHM_DLL_FUNC(CHMtableFreeBufferW)
00228 (
00229    wchar_t** ppString
00230 );
00231 
00232 CHM_DLL_FUNC(CHMtableGetColumnIsKey)
00233 (
00234    CHMtableHandle Handle,
00235    size_t ColumnIndex,
00236    size_t* pIsKey
00237 );
00238 
00239 CHM_DLL_FUNC(CHMtableGetKeyColumnIndex)
00240 (
00241    CHMtableHandle Handle,
00242    size_t*        pKeyColumnIndex
00243 );
00244 
00245 CHM_DLL_FUNC(CHMtableSetKeyColumnIndex)
00246 (
00247    CHMtableHandle Handle,
00248    size_t         KeyColumnIndex
00249 );
00250 
00251 #endif // end of defensive include