xml::xsilStd Class Reference
[Utility operators and manipulators.]

#include <XsilStd.hh>

List of all members.

Public Types

enum  DataType {
  kTimeSeries = 0, kSpectrum = 1, kTransferFunction = 2, kCoefficients = 3,
  kHistogram = 4
}
 xml data type More...

Static Public Member Functions

static bool GetDataType (const char *graphtype, DataType &type, int &subtype)
static bool GetGraphType (DataType type, int subtype, std::string &graphtype)
static std::string Typename (DataType type)
static DataType Typeid (const char *type)
static int DataSubtypeXY (DataType type, int subtype)
static bool analyzeName (const std::string &name, std::string &n, int &index1, int &index2)
static std::string makeName (const std::string &Name, int index1=-1, int index2=-1)
static bool GetDataInfo (const char *xml, datainfo &info)
static bool GetDataInfo (const BasicDataDescriptor *desc, int &dim1, int &dim2, bool &complex, bool &XYdata)
static bool GetDataInfo (const BasicDataDescriptor *desc, int &dim1, int &dim2, bool &complex, bool &XYdata, const float **dataptr, bool &cpy, bool compress=false, bool forceXY=false)
static bool GetDataInfo (const BasicDataDescriptor *desc, int &dim1, int &dim2, bool &complex, bool &XYdata, const double **dataptr, bool &cpy, bool compress=false, bool forceXY=false)

Classes

class  datainfo
 Data information structure. More...


Detailed Description

Utility functions for dealing with data objects which follow the xml representation described in LIGO-T000067.

brief Utility functions for XML standard objects

Author:
Written June 2000 by Daniel Sigg
Version:
1.0

Member Enumeration Documentation

enum xml::xsilStd::DataType

xml data type

Enumerator:
kTimeSeries  Time series.
kSpectrum  Spectrum.
kTransferFunction  Transfer function.
kCoefficients  Coefficients.
kHistogram  Histogram.


Member Function Documentation

static bool xml::xsilStd::GetDataType ( const char *  graphtype,
DataType type,
int &  subtype 
) [static]

Get the data type and subtype associated with the graph type. The returned type assumes Y data only. Use DataTypeXY to translate to XY data arrays. brief Get type/subtype.

Parameters:
graphtype Graph type
type XML data object type (return)
subtype XML data object subtype (return)
Returns:
true if successful

static bool xml::xsilStd::GetGraphType ( DataType  type,
int  subtype,
std::string &  graphtype 
) [static]

Get the graph type associated with the type and subtype. brief Get graph type.

Parameters:
type XML data object type
subtype XML data object subtype
graphtype Graph type (return)
Returns:
true if successful

static std::string xml::xsilStd::Typename ( DataType  type  )  [static]

Returns the corresponding type name. brief Get type name.

Parameters:
type XML data object type
Returns:
type name

static DataType xml::xsilStd::Typeid ( const char *  type  )  [static]

Returns the corresponding type id. brief Get type id.

Parameters:
type XML data object type
Returns:
type name

static int xml::xsilStd::DataSubtypeXY ( DataType  type,
int  subtype 
) [static]

Returns the subtype for XY data. brief Get XY subtype.

Parameters:
type XML data object type
subtype XML data object subtype
Returns:
subtype

static bool xml::xsilStd::analyzeName ( const std::string &  name,
std::string &  n,
int &  index1,
int &  index2 
) [static]

Separates a name into character string and indices. brief Analyze name.

Parameters:
name Name to analyze
n character string (return)
index1 first index or -1 (return)
index2 second index or -1 (return)
Returns:
true if successful

static std::string xml::xsilStd::makeName ( const std::string &  Name,
int  index1 = -1,
int  index2 = -1 
) [static]

Makes a name from a character string and indices. brief Make name.

Parameters:
Name character string
index1 first index or -1
index2 second index or -1
Returns:
Name with indices

static bool xml::xsilStd::GetDataInfo ( const char *  xml,
datainfo info 
) [static]

Returns information about a data object based on an xml stream describing the object. brief Get data descriptor information.

Parameters:
xml xml data stream
info data info structure (return)
Returns:
true if successful

static bool xml::xsilStd::GetDataInfo ( const BasicDataDescriptor *  desc,
int &  dim1,
int &  dim2,
bool &  complex,
bool &  XYdata 
) [static]

Returns information about a data descriptor. The second dimension is the number of data points, whereas the first dimension describes the number of arrays. brief Get data descriptor information.

Parameters:
desc Data descriptor
dim1 Dimension 1 (return)
dim2 Dimension 2 (return)
complex true if complex data (return)
XYdata true if XY data format (return)
Returns:
true if successful

static bool xml::xsilStd::GetDataInfo ( const BasicDataDescriptor *  desc,
int &  dim1,
int &  dim2,
bool &  complex,
bool &  XYdata,
const float **  dataptr,
bool &  cpy,
bool  compress = false,
bool  forceXY = false 
) [static]

Returns information about a data descriptor. The second dimension is the number of data points, whereas the first dimension describes the number of arrays. If copy is true, the returned data pointer is a copy of the data and must be freed by the user!

brief Get data descriptor information.

Parameters:
desc Data descriptor
dim1 Dimension 1 (return)
dim2 Dimension 2 (return)
complex true if complex data (return)
XYdata true if XY data format (return)
dataptr Pointer to float array (return)
cpy true if data is copy (return)
compress if true, multiple referenced objects are dealt as one
forceXY force X-Y mode?
Returns:
true if successful

static bool xml::xsilStd::GetDataInfo ( const BasicDataDescriptor *  desc,
int &  dim1,
int &  dim2,
bool &  complex,
bool &  XYdata,
const double **  dataptr,
bool &  cpy,
bool  compress = false,
bool  forceXY = false 
) [static]

Returns information about a data descriptor. The second dimension is the number of data points, whereas the first dimension describes the number of arrays. If copy is true, the returned data pointer is a copy of the data and must be freed by the user!

brief Get data descriptor information.

Parameters:
desc Data descriptor
dim1 Dimension 1 (return)
dim2 Dimension 2 (return)
complex true if complex data (return)
XYdata true if XY data format (return)
dataptr Pointer to double array (return)
cpy true if data is copy (return)
compress if true multiple referenced objects are dealt as one
forceXY force X-Y mode?
Returns:
true if successful


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