Calculates the required buffer size for reading one row of the current table. Also calculates the offsets to all the columns
128 for (map<string, CCfits::Column*>::iterator it=colMap.begin(); it != colMap.end(); it++)
130 int width = it->second->width();
131 switch (it->second->type())
134 case CCfits::Tushort:
136 sizes[it->second->index()] =
sizeof(char)*width;
140 sizes[it->second->index()] =
sizeof(int)*width;
144 sizes[it->second->index()] =
sizeof(int)*width;
146 case CCfits::Tlonglong:
147 sizes[it->second->index()] =
sizeof(
long long)*width;
150 sizes[it->second->index()] =
sizeof(float)*width;
152 case CCfits::Tdouble:
153 sizes[it->second->index()] =
sizeof(double)*width;
157 case CCfits::Tlogical:
158 case CCfits::Tstring:
159 case CCfits::Tcomplex:
160 case CCfits::Tdblcomplex:
163 case CCfits::VTlogical:
164 case CCfits::VTushort:
165 case CCfits::VTshort:
168 case CCfits::VTulong:
170 case CCfits::VTlonglong:
171 case CCfits::VTfloat:
172 case CCfits::VTdouble:
173 case CCfits::VTcomplex:
174 case CCfits::VTdblcomplex:
175 cout <<
"Data type not implemented yet." << endl;
176 return vector<int>();
179 cout <<
"THIS SHOULD NEVER BE REACHED" << endl;
180 return vector<int>();
185 for (map<int,int>::iterator it=sizes.begin(); it != sizes.end(); it++)
187 result.push_back(size);
189 if (it->first != checkIndex)
191 cout <<
"Expected index " << checkIndex <<
" found " << it->first << endl;
195 result.push_back(size);