00001 #ifndef COLUMN_H
00002 #define COLUMN_H
00003
00004 #include "global.h"
00005
00006 #include <vector>
00007 using namespace std;
00008
00017
00018
00019 class Column {
00020
00021 public:
00022
00026 Column();
00027
00028
00029
00030
00034 ~Column();
00035
00039 Column operator=(const Column &c);
00040
00044 Column(const Column &c);
00045
00046 int setCharData(char * data, int *status);
00047 int setUnicodeData (unsigned short *data, int size, int *status);
00048 int setRef(char * ref, int *status);
00049
00053 int getLogicalArray(Bool *&b , int &numOfElements, int *status) ;
00054
00058 int getBitArray(char *&c, int &numOfElements, int *status) ;
00059
00063 int getByteArray(unsigned char *&c, int &numOfElements, int *status) ;
00064
00068 int getShortArray(short *&array,int &numOfElements, int *status) ;
00069
00073 int getIntArray(int *&array,int &numOfElements, int *status) ;
00074
00078 int getLongArray(long *&array,int &numOfElements, int *status) ;
00079
00083 int getCharArray(char *&array,int &numOfElements, int *status) ;
00084
00088 int getUnicodeArray(unsigned short *&array, int &numOfElements, int *status) ;
00089
00093 int getFloatArray(float *&array, int &numOfElements, int *status) ;
00094
00098 int getDoubleArray(double *&array, int &numOfElements, int *status) ;
00099
00103 int getFloatComplexArray(float *&array, int &numOfElements, int *status) ;
00104
00108 int getDoubleComplexArray(double *&array,int &numOfElements, int *status) ;
00109
00113 int getRef(char * &ref, int * status);
00114
00115
00116
00117
00118 private:
00119 char * m_data;
00120 char * m_ref;
00121 unsigned short * m_unicodeData;
00122 int m_size;
00123 bool m_isUnicode;
00124
00125 vector <char *> getArrayOfStrings(char *data, int &numberOfElets);
00126 int getData(char *&c, int &len, int *status);
00127 void cleanup();
00128 void makecopy(const Column &c);
00129 void init(void);
00130 void trim(char *&str);
00131
00132
00133 };
00134
00135 #endif