xsil::MetaIO Class Reference
[Xsil document preparation]

#include <MetaIO.hh>

List of all members.

Public Member Functions

 MetaIO (void)
 MetaIO (const char *file, const char *table=0)
 ~MetaIO (void)
int close (void)
const char * getColumnName (int icol) const
 Get a column name.
double getFloat (const char *cname, double def=0.0) const
long getInt (const char *cname, long def=0) const
int getNColumn (void) const
 Number of columns.
int getRow (void)
std::string getString (const char *cname, const char *def="") const
const char * getTableName (void) const
const char * getTypeName (int icol) const
bool is_open (void) const
int open (const char *file, const char *table=0)


Detailed Description

MetaIO is a wrapper for the LigoTools metaio package. The package is used by various tools to read (or write?) Ligo light-weight tables. brief I/O to/from a ligo lightweight table.
Version:
1.0; Last modified February 19, 2004
Author:
John Zweizig

Constructor & Destructor Documentation

xsil::MetaIO::MetaIO ( void   ) 

Construct a MetaIO reader.

xsil::MetaIO::MetaIO ( const char *  file,
const char *  table = 0 
)

Construct a ligo-lightweight table reader.

xsil::MetaIO::~MetaIO ( void   ) 

Destroy a ligo-lightweight table reader.


Member Function Documentation

int xsil::MetaIO::close ( void   ) 

Close a Ligo-lightweight reader.

Returns:
zero if successful.

const char* xsil::MetaIO::getColumnName ( int  icol  )  const

Get a column name.

Get the name of the specified column.

Parameters:
icol Number of column.
Returns:
Pointer to name character string.

double xsil::MetaIO::getFloat ( const char *  cname,
double  def = 0.0 
) const

Get a floating point number from the specified column of the current row. If the column data type differs from the requested data type GetFloat attempts to convert the data to a double.

long xsil::MetaIO::getInt ( const char *  cname,
long  def = 0 
) const

Get a long integer number from the specified column of the current row.If the column data type differs from the requested data type GetInt attempts to convert the data to a long integer.

int xsil::MetaIO::getNColumn ( void   )  const

Number of columns.

Get the current number of columns in the table.

Returns:
Number of columns.

int xsil::MetaIO::getRow ( void   ) 

Read the next row of the table from the opened file.

Returns:
Zero if successful.

std::string xsil::MetaIO::getString ( const char *  cname,
const char *  def = "" 
) const

Get a string value from the specified column of the current row. If the column data type differs from the requested data type GetString attempts to convert the data to a string.

const char* xsil::MetaIO::getTableName ( void   )  const

Get the table name from the header information.

const char* xsil::MetaIO::getTypeName ( int  icol  )  const

Get the column type name.

bool xsil::MetaIO::is_open ( void   )  const [inline]

Test whether the parse environment is ope. Returns true if the input file is attached and open.

int xsil::MetaIO::open ( const char *  file,
const char *  table = 0 
)

The specified file is opened and the header information is read. brief Open an xml table file.

Parameters:
file Name of xml file to be processed.
table Name of table to be processed.
Returns:
Zero indicates success.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:49 2009 for dmt by  doxygen 1.5.4