ctai_vector.h File Reference

Utilities for working with CTA_Vector objects. More...

Go to the source code of this file.

Functions

int CTAI_Vector_CountHandles (CTA_Vector hvec, const char *name)
 Count the number of handles with the given name in the vector (internal use only!).
CTA_Handle CTAI_Vector_FindHandle (CTA_Vector hvec, const char *name)
 Find the handle with the given name (internal use only!).
const char * CTAI_Vector_GetStringVal (CTA_Vector hvec, int i)
 Get vector value at index i as C string (internal use only!).
int CTAI_Vector_SetStringVal (CTA_Vector hvec, int i, const char *val, CTA_Datatype datatype)
 Set vector value at index i giving a C string to be converted to given data type (internal use only!).
CTA_Vector CTAI_XML_CreateVector (xmlNode *cur_node)
 Create a COSTA vector.
void CTAI_XML_WriteVector (CTA_Vector hvec, const char *id, const char *caption, CTA_Metainfo minfo, int level, xmlTextWriter *writer)
 Generate XML from one COSTA vector.
CTA_Vector CTAI_XML_CreateVector_New (xmlNode *cur_node, CTA_Metainfo minfo)
 Create a COSTA vector from XML.

Detailed Description

Utilities for working with CTA_Vector objects.

Definition in file ctai_vector.h.


Function Documentation

int CTAI_Vector_CountHandles ( CTA_Vector  hvec,
const char *  name 
)

Count the number of handles with the given name in the vector (internal use only!).

Parameters:
hvec I vector in which to search
name I name of handle(s) to find
Returns:
number of handles counted or -1 in case of an error.
CTA_Handle CTAI_Vector_FindHandle ( CTA_Vector  hvec,
const char *  name 
)

Find the handle with the given name (internal use only!).

Parameters:
hvec I vector in which to search
name I name of handle to find
Returns:
handle or CTA_NULL if not found or in case of an error
const char* CTAI_Vector_GetStringVal ( CTA_Vector  hvec,
int  i 
)

Get vector value at index i as C string (internal use only!).

Note:
Free pointer after use.
Parameters:
hvec I vector
i I index of value
Returns:
string representation of value at index i of vector
int CTAI_Vector_SetStringVal ( CTA_Vector  hvec,
int  i,
const char *  val,
CTA_Datatype  datatype 
)

Set vector value at index i giving a C string to be converted to given data type (internal use only!).

Parameters:
hvec IO handle of vector
i I index of value to set
val I string representation of value
datatype I data type of value
Returns:
CTA_OK if succesful or CTA_ILLEGAL_DATATYPE if invalid data type
CTA_Vector CTAI_XML_CreateVector ( xmlNode *  cur_node  ) 

Create a COSTA vector.

Parameters:
cur_node I Current XML node
Returns:
Handle to create or CTA_NULL in case of an error.
CTA_Vector CTAI_XML_CreateVector_New ( xmlNode *  cur_node,
CTA_Metainfo  minfo 
)

Create a COSTA vector from XML.

Parameters:
cur_node I Current XML node
minfo I/O Meta info object
Returns:
Handle to create or CTA_NULL in case of an error.
void CTAI_XML_WriteVector ( CTA_Vector  hvec,
const char *  id,
const char *  caption,
CTA_Metainfo  minfo,
int  level,
xmlTextWriter *  writer 
)

Generate XML from one COSTA vector.

Parameters:
hvec I handle of a COSTA vector
writer I the XML text writer

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1