TiXI
3.3.0
|
Functions | |
DLL_EXPORT ReturnCode | tixiAddDoubleListWithAttributes (const TixiDocumentHandle handle, const char *parentPath, const char *listName, const char *childName, const char *childAttributeName, const double *values, const char *format, const char **attributes, int nValues) |
High level routine to write a list of elements with attributes. More... | |
DLL_EXPORT ReturnCode | tixiGetVectorSize (const TixiDocumentHandle handle, const char *vectorPath, int *nElements) |
Retrieves the size of an Vector. More... | |
DLL_EXPORT ReturnCode | tixiGetFloatVector (const TixiDocumentHandle handle, const char *vectorPath, double **vectorArray, const int eNumber) |
Retrieves a vector. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayDimensions (const TixiDocumentHandle handle, const char *arrayPath, int *dimensions) |
Retrieves the number of dimensions of an Array. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayDimensionSizes (const TixiDocumentHandle handle, const char *arrayPath, int *sizes, int *linearArraySize) |
Retrieves the sizes of all dimensions of the array definition, and the overall array size (product of all dimensions's sizes). More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayDimensionNames (const TixiDocumentHandle handle, const char *arrayPath, char **dimensionNames) |
Retrieves the names of all dimensions. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayDimensionValues (const TixiDocumentHandle handle, const char *arrayPath, const int dimension, double *dimensionValues) |
Retrieves the selected dimension's values (e.g. separate allowed angles etc.). More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayParameters (const TixiDocumentHandle handle, const char *arrayPath, int *parameters) |
Retrieves the number of parameters of an array. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayParameterNames (const TixiDocumentHandle handle, const char *arrayPath, char **parameterNames) |
Retrieves names of all parameters. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArray (const TixiDocumentHandle handle, const char *arrayPath, const char *elementName, int arraySize, double **values) |
Reads in an array. The memory management of the array is done by tixi. More... | |
DEPRECATED DLL_EXPORT double | tixiGetArrayValue (const double *array, const int *dimSize, const int *dimPos, const int dims) |
Getter function to take one multidimensionally specified element from a complete array, retrieved earlier. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayElementCount (const TixiDocumentHandle handle, const char *arrayPath, const char *elementName, int *elements) |
Helper function. More... | |
DEPRECATED DLL_EXPORT ReturnCode | tixiGetArrayElementNames (const TixiDocumentHandle handle, const char *arrayPath, const char *elementType, char **elementNames) |
Helper function. More... | |
DLL_EXPORT ReturnCode | tixiAddPoint (const TixiDocumentHandle handle, const char *pointParentPath, double x, double y, double z, const char *format) |
Adds an element containing the 3D cartesian coordinates of a point. More... | |
DLL_EXPORT ReturnCode | tixiGetPoint (const TixiDocumentHandle handle, const char *pointParentPath, double *x, double *y, double *z) |
Reads a point element but ignores error if an incomplete point is encountered. More... | |
DLL_EXPORT ReturnCode | tixiCheckAttribute (TixiDocumentHandle handle, const char *elementPath, const char *attributeName) |
Checks the existence of an element's attribute. More... | |
These functions operate on more complex data structures than the elementary get/add function so.
DLL_EXPORT ReturnCode tixiAddDoubleListWithAttributes | ( | const TixiDocumentHandle | handle, |
const char * | parentPath, | ||
const char * | listName, | ||
const char * | childName, | ||
const char * | childAttributeName, | ||
const double * | values, | ||
const char * | format, | ||
const char ** | attributes, | ||
int | nValues | ||
) |
High level routine to write a list of elements with attributes.
Adds a list of elements with the same name containd in an element with the name listName to the element specified by parentPath.
Fortran syntax:
tixi_add_double_list_with_attributes( integer handle, character*n parent_path, character*n list_name, character*n child_name, character*n child_attribute_name, real values, character*n format, character*n attributes, integer n_values, integer error )
[in] | handle | file handle as returned by tixiCreateDocument |
[in] | parentPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | listName | name of the element containing the list |
[in] | childName | name of the child elements of the element listName |
[in] | childAttributeName | name of the attribute to be assigned to each child |
[in] | values | array of double holding the element values to be added ("text" content between the tags) |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
[in] | attributes | array of pointers to strings holding the attribute values (vs. attribute name which is the same for each list entry) |
[in] | nValues | number of values in the list |
DLL_EXPORT ReturnCode tixiAddPoint | ( | const TixiDocumentHandle | handle, |
const char * | pointParentPath, | ||
double | x, | ||
double | y, | ||
double | z, | ||
const char * | format | ||
) |
Adds an element containing the 3D cartesian coordinates of a point.
An element with the following structure is added:
<x> </x> <y> </y> <z> </z>
Fortran syntax:
tixi_add_point( integer handle, character*n pointParentPath, real x, real y, real z, character*n format, integer error )
[in] | handle | as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | pointParentPath | an XPath compliant path to an element into which the point elements are to be inserted in the document specified by handle (see section XPath Examples). |
[in] | x | x coordinate of the point |
[in] | y | y coordinate of the point |
[in] | z | z coordinate of the point |
[in] | format | format string used to convert number into a string. The format string usage is identical to format strings in printf. If format is NULL "%g" will be used to format the string. |
DLL_EXPORT ReturnCode tixiCheckAttribute | ( | TixiDocumentHandle | handle, |
const char * | elementPath, | ||
const char * | attributeName | ||
) |
Checks the existence of an element's attribute.
Fortran syntax:
tixi_check_attribute( integer handle, character*n element_path, character*n attribute_name, integer error )
[in] | handle | handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | elementPath | an XPath compliant path to an element in the document specified by handle (see section XPath Examples above). |
[in] | attributeName | name of the attribute to be added to the element |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArray | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
const char * | elementName, | ||
int | arraySize, | ||
double ** | values | ||
) |
Reads in an array. The memory management of the array is done by tixi.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array ( integer handle, character*n arrayPath, character*n element, double *values)
[in] | handle | file handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | arrayPath | an XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples). |
[in] | elementName | name of the sub tag that contains the array |
[in] | arraySize | Total size of the array. Size must be determined by calling tixiGetArrayDimensionSizes and must equal the product of all dimensions' sizes |
[out] | values | Pointer to a double array, containg all values for this dimension. The array is allocated and freed by tixi. The size of the array corresponds to the parameter arraySize |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionNames | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
char ** | dimensionNames | ||
) |
Retrieves the names of all dimensions.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array_dimension_names ( integer handle, character*n arrayPath, char*n*m dimensionNames)
[in] | handle | file handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | arrayPath | an XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples). |
[out] | dimensionNames | array of strings |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensions | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
int * | dimensions | ||
) |
Retrieves the number of dimensions of an Array.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
Returns the number of separate dimensions defined in sub-tags of the array in CPACS. For each dimension there is a finite set of allowed values that can be retrieved by "tixiGetArrayValues".
Example:
This is a typical array definition, to be found under, e.g., the xpath "//aeroPerformanceMap":
Fortran syntax:
tixi_get_array_dimensions( integer handle, character*n arrayPath, integer* dimensions )
[in] | handle | as returned by tixiCreateDocument |
[in] | arrayPath | an XPath-compliant path to an element holding the sub elements that define the dimensions in the document specified by the handle (see section XPath Examples). |
[out] | dimensions | number of array dimensions |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionSizes | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
int * | sizes, | ||
int * | linearArraySize | ||
) |
Retrieves the sizes of all dimensions of the array definition, and the overall array size (product of all dimensions's sizes).
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array_dimension_sizes ( integer handle, character*n arrayPath, int*n sizes, int* arraySizes )
[in] | handle | as returned by tixiCreateDocument |
[in] | arrayPath | an XPath-compliant path to the top XML element holding the sub-tags of the array definition in the document specified by the handle (see section XPath Examples). |
[out] | sizes | an integer array containing the size of each dimension |
[out] | linearArraySize | product over all sizes (for complete array size) |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayDimensionValues | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
const int | dimension, | ||
double * | dimensionValues | ||
) |
Retrieves the selected dimension's values (e.g. separate allowed angles etc.).
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array_dimension_values ( integer handle, character*n arrayPath, int* dimension, double *dimensionValues)
[in] | handle | file handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | arrayPath | an XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples). |
[in] | dimension | which dimension to return meaning values for |
[out] | dimensionValues | all values for this dimension. The return array's Size should be determined by a prior call to tixiGetArrayDimensionSizes() |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementCount | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
const char * | elementName, | ||
int * | elements | ||
) |
Helper function.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
Returns the number of sub elements in CPACS arrays (either vector or array type).
For an array use example, please check tixiGetArrayDimensions(). The result for elementName="angleOfAttack" would be 11.
Fortran syntax:
tixi_get_array_element_count( integer handle, character*n arrayPath, character*n elementName, integer* elements )
[in] | handle | as returned by tixiCreateDocument |
[in] | arrayPath | an XPath compliant path to an element holding the sub elements that define the dimensions in the document specified by handle (see section XPath Examples). |
[in] | elementName | The name of the sub element under the given xpath. |
[out] | elements | number of array parameters (separated by ";") |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayElementNames | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
const char * | elementType, | ||
char ** | elementNames | ||
) |
Helper function.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
Returns the tag names of sub elements of mapType given.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array_element_names( integer handle, character*n arrayPath, character*n elementName, character*n*m elementNames)
[in] | handle | as returned by tixiCreateDocument |
[in] | arrayPath | an XPath compliant path to an element holding the sub elements that define the dimensions in the document specified by handle (see section XPath Examples). |
[in] | elementType | mapType to get names for (either "vector" for a dimension or "array" for the data field) |
[out] | elementNames | string names of all tags found for the given type. |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameterNames | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
char ** | parameterNames | ||
) |
Retrieves names of all parameters.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array_parameter_names ( integer handle, character*n arrayPath, character*n*m parameterNames)
[in] | handle | as returned by tixiCreateDocument |
[in] | arrayPath | an XPath compliant path to an element holding the sub-tags of the array definition in the document specified by handle (see section XPath Examples). |
[out] | parameterNames | string array containing names of each parameter |
DEPRECATED DLL_EXPORT ReturnCode tixiGetArrayParameters | ( | const TixiDocumentHandle | handle, |
const char * | arrayPath, | ||
int * | parameters | ||
) |
Retrieves the number of parameters of an array.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Returns the number of different parameters (cutting all dimensions) defined in sub-tags in CPACS. Parameters are the tags with the attribute 'mapType="array"'.
Fortran syntax:
tixi_get_array_parameters( integer handle, character*n arrayPath, integer* parameters )
[in] | handle | as returned by tixiCreateDocument |
[in] | arrayPath | an XPath compliant path to an element holding the sub elements that define the dimensions in the document specified by handle (see section XPath Examples). |
[out] | parameters | number of array parameters |
DEPRECATED DLL_EXPORT double tixiGetArrayValue | ( | const double * | array, |
const int * | dimSize, | ||
const int * | dimPos, | ||
const int | dims | ||
) |
Getter function to take one multidimensionally specified element from a complete array, retrieved earlier.
DEPRECATED: This is a CPACS specific function, that is no longer needed in CPACS versions >= 3.
For an array use example, please check tixiGetArrayDimensions()
Fortran syntax:
tixi_get_array_value ( double*n array, integer*n dimSize, integer*n dimPos, integer *dims)
[in] | array | the array as returned by tixiGetArray() |
[in] | dimSize | the array of dimensions' sizes as returned by tixiGetArrayDimensionSizes() |
[in] | dimPos | the index of each dimension to fetch from the array |
[in] | dims | the number of dimensions of the array as returned by tixiGetArrayDimensions() |
DLL_EXPORT ReturnCode tixiGetFloatVector | ( | const TixiDocumentHandle | handle, |
const char * | vectorPath, | ||
double ** | vectorArray, | ||
const int | eNumber | ||
) |
Retrieves a vector.
A vector is read and its contents are stored into an 1D-array. The memory necessary for the array is automatically allocated. The number of elements in the vector could be read via a call to "tixiGetVectorSize".
tixi_get_float_vector( integer handle, character*n vectorPath, real array, integer eNumber)
[in] | handle | file handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | vectorPath | an XPath compliant path to an element holding the vector in the document specified by handle (see section XPath Examples). |
[out] | vectorArray | a pointer address for an array that should hold the vector elements |
[in] | eNumber | maximal number of elements that shout be read from this vector. |
DLL_EXPORT ReturnCode tixiGetPoint | ( | const TixiDocumentHandle | handle, |
const char * | pointParentPath, | ||
double * | x, | ||
double * | y, | ||
double * | z | ||
) |
Reads a point element but ignores error if an incomplete point is encountered.
An element with the following structure is expected as child of the element specified by pointParentPath
<x> </x> <y> </y> <z> </z>
Reads a point element.
An element with the following structure is expected as child of the element specified by pointParentPath. Some or even all coordinate entries may be missing. The value of a missing coordiante is unchanged on output. This feature can be used to provide default values for non existing coordinate elements.
The coordinates are returned in the x, y, and z arguments.
Fortran syntax:
tixi_get_point( integer handle, character*n pointParentPath, integer index, real x, real y, real z, integer error )
[in] | handle | as returned by tixiOpenDocument |
[in] | pointParentPath | an XPath compliant path to an element containing point elements in the document specified by handle (see section XPath Examples). |
[out] | x | x coordinate of the point |
[out] | y | y coordinate of the point |
[out] | z | z coordinate of the point |
DLL_EXPORT ReturnCode tixiGetVectorSize | ( | const TixiDocumentHandle | handle, |
const char * | vectorPath, | ||
int * | nElements | ||
) |
Retrieves the size of an Vector.
Returns the size of semicolon separated elementf in an vector. The node containung the vector has to be tagged via the xml attribute <<mapType="vector">>.
tixi_get_vector_size( integer handle, character*n vectorPath, integer nElements, integer error)
[in] | handle | file handle as returned by tixiOpenDocument, tixiOpenDocumentRecursive, tixiOpenDocumentFromHTTP, tixiCreateDocument or tixiImportFromString |
[in] | vectorPath | an XPath compliant path to an element holding the vector in the document specified by handle (see section XPath Examples). |
[out] | nElements | number of vector elements |