28 #ifndef TABLES_READASCIITABLE_H
29 #define TABLES_READASCIITABLE_H
217 Char separator =
' ',
218 const String& commentMarkerRegex =
"",
219 Int firstLine = 1,
Int lastLine = -1,
229 Char separator,
const String& commentMarkerRegex,
230 Int firstLine,
Int lastLine);
258 Char separator =
' ',
259 const String& commentMarkerRegex =
"",
260 Int firstLine = 1,
Int lastLine = -1);
264 const String& tableDescName,
const char* tablename,
265 Char separator =
' ',
266 const String& commentMarkerRegex =
"",
267 Int firstLine = 1,
Int lastLine = -1);
277 Char separator =
' ',
278 const String& commentMarkerRegex =
"",
279 Int firstLine = 1,
Int lastLine = -1,
286 Char separator,
const String& commentMarkerRegex,
287 Int firstLine,
Int lastLine);
291 Char separator =
' ',
292 const String& commentMarkerRegex =
"",
293 Int firstLine = 1,
Int lastLine = -1);
296 const String& tableDescName,
const char* tablename,
297 Char separator =
' ',
298 const String& commentMarkerRegex =
"",
299 Int firstLine = 1,
Int lastLine = -1);
329 const String& commentMarkerRegex,
330 Int firstLine,
Int lastLine);
338 const String& commentMarkerRegex,
339 Int firstLine,
Int lastLine);
360 Bool testComment,
const Regex& commentMarker,
361 Int firstLine,
Int lastLine);
372 Bool testComment,
const Regex& commentMarker,
373 Int firstLine,
Int lastLine);
378 char* line,
Int lineSize,
379 Bool testComment,
const Regex& commentMarker,
380 Int firstLine,
Int lastLine);
406 const Regex& commentMarker,
407 Int firstLine,
Int lastLine);
430 Int type,
void* valueBlock);
A Vector of integers, for indexing into Array<T> objects.
static String run(const String &headerfile, const String &filein, const String &tableproto, const String &tablename, Bool autoHeader, const IPosition &autoShape, const Vector< String > &columnNames, const Vector< String > &dataTypes, Char separator, const String &commentMarkerRegex, Int firstLine, Int lastLine)
Run the readAsciiTable.
A 1-D Specialization of the Array class.
static double stringToPos(const String &pos, Bool isDMS)
Read a position using MVAngle.
Main interface class to a read/write table.
Helper class for readAsciiTable.
static void handleArray(char *string1, Int lineSize, char *first, Int &at1, Char separator, const IPosition &shape, Int varAxis, Int type, TableColumn &tabcol, rownr_t rownr)
Get the next array with the given type from the data line and put it into the table column...
ostream-like interface to creating log messages.
static String doRun(const String &headerfile, const String &filein, const String &tableproto, const String &tablename, Bool autoHeader, const IPosition &autoShape, const Vector< String > &columnNames, const Vector< String > &dataTypes, Char separator, Bool testComment, const Regex &commentMarker, Int firstLine, Int lastLine)
Do the actual run.
static Table makeTab(String &formatString, Table::TableType tableType, const String &headerfile, const String &filein, const String &tableproto, const String &tablename, Bool autoHeader, const IPosition &autoShape, const Vector< String > &columnNames, const Vector< String > &dataTypes, Char separator, Bool testComment, const Regex &commentMarker, Int firstLine, Int lastLine)
Do the actual work of making and filling the table.
static Table runt(String &formatString, Table::TableType tableType, const String &headerfile, const String &filein, const String &tableproto, const String &tablename, Bool autoHeader, const IPosition &autoShape, const Vector< String > &columnNames, const Vector< String > &dataTypes, Char separator, const String &commentMarkerRegex, Int firstLine, Int lastLine)
static Int getNext(const Char *string, Int strlen, Char *result, Int &at, Char separator)
Get the next part of the line using the separator as delimiter.
Regular expression class (based on std::regex)
bool Bool
Define the standard types used by Casacore.
Read/write access to a table column.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
A hierarchical collection of named fields of various types.
const Double second
Time interval [T]:
uInt64 rownr_t
Define the type of a row number in a table.
static void handleScalar(char *string1, Int lineSize, char *first, Int &at1, Char separator, Int type, TableColumn &tabcol, rownr_t rownr)
Handle the next scalar with the given type from the data line and put it into the table column...
String: the storage and methods of handling collections of characters.
static Bool makeBool(const String &str)
Turn the string into a Bool value.
static void handleKeyset(Int lineSize, char *string1, char *first, char *second, TableRecord &keysets, LogIO &logger, const String &fileName, ifstream &jFile, Int &lineNumber, Char separator, Bool testComment, const Regex &commentMarker, Int firstLine, Int lastLine)
Handle a keyword set.
TableType
Define the possible table types.
static Bool getLine(ifstream &file, Int &lineNumber, char *line, Int lineSize, Bool testComment, const Regex &commentMarker, Int firstLine, Int lastLine)
Get the next line.
static Bool getValue(char *string1, Int lineSize, char *first, Int &at1, Char separator, Int type, void *value)
Get the next scalar value with the given type from string1.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static IPosition getArray(char *string1, Int lineSize, char *first, Int &at1, Char separator, const IPosition &shape, Int varAxis, Int type, void *valueBlock)
Get the next array with the given type from string1.
static Int getTypeShape(const String &typestr, IPosition &shape, Int &type)
Get the shape and type from the type string.
static void getTypes(const IPosition &shape, const Char *in, Int leng, Char *string1, Char *string2, Char separator)
Derive the types from the values in the first data line.