FieldML 0.5
Defines | Typedefs | Enumerations | Functions
fieldml_api.h File Reference
#include <stdint.h>

Go to the source code of this file.

Defines

#define FML_INVALID_HANDLE   -1
 The valid used to indicate a missing object or failed object instantiation.
#define FML_MAJOR_VERSION   0
#define FML_MINOR_VERSION   4
#define FML_DOT_VERSION   0
#define FML_ERR_NO_ERROR   0
 The API call was successful.
#define FML_OK   0
 The API call was successful.
#define FML_ERR_UNKNOWN_HANDLE   1000
 An unknown session handle was used.
#define FML_ERR_UNKNOWN_OBJECT   1001
 An unknown object handle was used.
#define FML_ERR_INVALID_OBJECT   1002
 An object handle referred to an object of the wrong type.
#define FML_ERR_MISCONFIGURED_OBJECT   1003
 An object handle referred to an object with an invalid combination of attributes.
#define FML_ERR_ACCESS_VIOLATION   1004
 An attempt was made to modify a read-only object (e.g. imported from another region).
#define FML_ERR_NAME_COLLISION   1005
 An attempt was made to create an object with a name that was already in use.
#define FML_ERR_INVALID_REGION   1006
 An attempt was made to access an invalid region. This usually indicates a failure to deserialise a FieldML file.
#define FML_ERR_NONLOCAL_OBJECT   1007
 An attempt was made to reference a non-local object (i.e. one that has not been imported).
#define FML_ERR_CYCLIC_DEPENDENCY   1008
 An attempt was made to create a cyclic dependency.
#define FML_ERR_INVALID_INDEX   1009
 An attempt was made to use an out-of-bounds index.
#define FML_ERR_READ_ERR   1010
 A read error was encountered during IO.
#define FML_ERR_INVALID_PARAMETERS   1100
 A general-purpose error code indicating that some parameters to the API call were invalid.
#define FML_ERR_INVALID_PARAMETER_1   1101
 A general-purpose error code indicating that the first parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_2   1102
 A general-purpose error code indicating that the second parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_3   1103
 A general-purpose error code indicating that the third parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_4   1104
 A general-purpose error code indicating that the fourth parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_5   1105
 A general-purpose error code indicating that the fifth parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_6   1106
 A general-purpose error code indicating that the sixth parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_7   1107
 A general-purpose error code indicating that the seventh parameter to the API call was invalid.
#define FML_ERR_INVALID_PARAMETER_8   1108
 A general-purpose error code indicating that the eigth parameter to the API call was invalid.
#define FML_ERR_UNSUPPORTED   2000
 Used for operations that are valid, but not yet implemented.

Typedefs

typedef int32_t FmlSessionHandle
 A handle to a FieldML session. Almost all FieldML API calls require a session handle.
typedef int32_t FmlObjectHandle
 A handle to a FieldML object.
typedef int32_t FmlErrorNumber
 A FieldML error code.
typedef int32_t FmlBoolean
 A pseudo-boolean. 0 = false, 1 = true. FmlBoolean-valued functions also return -1 to indictate an error.
typedef int32_t FmlEnsembleValue
 An integer-valued ensemble member identifier.

Enumerations

enum  FieldmlEnsembleMembersType {
  FML_ENSEMBLE_MEMBER_UNKNOWN, FML_ENSEMBLE_MEMBER_RANGE, FML_ENSEMBLE_MEMBER_LIST_DATA, FML_ENSEMBLE_MEMBER_RANGE_DATA,
  FML_ENSEMBLE_MEMBER_STRIDE_RANGE_DATA
}
enum  FieldmlDataDescriptionType { FML_DATA_DESCRIPTION_UNKNOWN, FML_DATA_DESCRIPTION_DENSE_ARRAY, FML_DATA_DESCRIPTION_DOK_ARRAY }
enum  FieldmlDataResourceType { FML_DATA_RESOURCE_UNKNOWN, FML_DATA_RESOURCE_HREF, FML_DATA_RESOURCE_INLINE }
enum  FieldmlDataSourceType { FML_DATA_SOURCE_UNKNOWN, FML_DATA_SOURCE_ARRAY }
enum  FieldmlHandleType {
  FHT_UNKNOWN, FHT_ENSEMBLE_TYPE, FHT_CONTINUOUS_TYPE, FHT_MESH_TYPE,
  FHT_BOOLEAN_TYPE, FHT_ARGUMENT_EVALUATOR, FHT_EXTERNAL_EVALUATOR, FHT_REFERENCE_EVALUATOR,
  FHT_PARAMETER_EVALUATOR, FHT_PIECEWISE_EVALUATOR, FHT_AGGREGATE_EVALUATOR, FHT_CONSTANT_EVALUATOR,
  FHT_DATA_RESOURCE, FHT_DATA_SOURCE
}

Functions

FmlSessionHandle Fieldml_CreateFromFile (const char *filename)
FmlSessionHandle Fieldml_Create (const char *location, const char *name)
FmlErrorNumber Fieldml_SetDebug (FmlSessionHandle handle, int debug)
FmlErrorNumber Fieldml_GetLastError (FmlSessionHandle handle)
FmlErrorNumber Fieldml_WriteFile (FmlSessionHandle handle, const char *filename)
void Fieldml_Destroy (FmlSessionHandle handle)
FmlErrorNumber Fieldml_FreeString (char *string)
char * Fieldml_GetRegionName (FmlSessionHandle handle)
int Fieldml_CopyRegionName (FmlSessionHandle handle, char *buffer, int bufferLength)
char * Fieldml_GetRegionRoot (FmlSessionHandle handle)
int Fieldml_CopyRegionRoot (FmlSessionHandle handle, char *buffer, int bufferLength)
int Fieldml_GetErrorCount (FmlSessionHandle handle)
char * Fieldml_GetError (FmlSessionHandle handle, int index)
int Fieldml_CopyError (FmlSessionHandle handle, int errorIndex, char *buffer, int bufferLength)
FmlErrorNumber Fieldml_ClearErrors (FmlSessionHandle handle)
int Fieldml_GetTotalObjectCount (FmlSessionHandle handle)
FmlObjectHandle Fieldml_GetObjectByIndex (FmlSessionHandle handle, const int objectIndex)
int Fieldml_GetObjectCount (FmlSessionHandle handle, FieldmlHandleType type)
FmlObjectHandle Fieldml_GetObject (FmlSessionHandle handle, FieldmlHandleType objectType, int objectIndex)
FieldmlHandleType Fieldml_GetObjectType (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetObjectByName (FmlSessionHandle handle, const char *name)
FmlObjectHandle Fieldml_GetObjectByDeclaredName (FmlSessionHandle handle, const char *name)
FmlBoolean Fieldml_IsObjectLocal (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlBoolean isDeclaredOnly)
char * Fieldml_GetObjectName (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyObjectName (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength)
char * Fieldml_GetObjectDeclaredName (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyObjectDeclaredName (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength)
FmlErrorNumber Fieldml_SetObjectInt (FmlSessionHandle handle, FmlObjectHandle objectHandle, int value)
int Fieldml_GetObjectInt (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetTypeComponentEnsemble (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_GetTypeComponentCount (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_CreateEnsembleType (FmlSessionHandle handle, const char *name)
FmlObjectHandle Fieldml_CreateBooleanType (FmlSessionHandle handle, const char *name)
FmlObjectHandle Fieldml_CreateContinuousType (FmlSessionHandle handle, const char *name)
FmlObjectHandle Fieldml_CreateContinuousTypeComponents (FmlSessionHandle handle, FmlObjectHandle typeHandle, const char *name, const int count)
FmlObjectHandle Fieldml_CreateMeshType (FmlSessionHandle handle, const char *name)
FmlObjectHandle Fieldml_CreateMeshElementsType (FmlSessionHandle handle, FmlObjectHandle meshHandle, const char *name)
FmlObjectHandle Fieldml_CreateMeshChartType (FmlSessionHandle handle, FmlObjectHandle meshHandle, const char *name)
FmlObjectHandle Fieldml_GetMeshChartType (FmlSessionHandle handle, FmlObjectHandle meshHandle)
FmlObjectHandle Fieldml_GetMeshChartComponentType (FmlSessionHandle handle, FmlObjectHandle meshHandle)
FmlObjectHandle Fieldml_GetMeshElementsType (FmlSessionHandle handle, FmlObjectHandle meshHandle)
FmlObjectHandle Fieldml_GetMeshShapes (FmlSessionHandle handle, FmlObjectHandle meshHandle)
FmlErrorNumber Fieldml_SetMeshShapes (FmlSessionHandle handle, FmlObjectHandle meshHandle, FmlObjectHandle shapesHandle)
FmlBoolean Fieldml_IsEnsembleComponentType (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetValueType (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_CreateArgumentEvaluator (FmlSessionHandle handle, const char *name, FmlObjectHandle valueType)
FmlObjectHandle Fieldml_CreateExternalEvaluator (FmlSessionHandle handle, const char *name, FmlObjectHandle valueType)
FmlObjectHandle Fieldml_CreateParameterEvaluator (FmlSessionHandle handle, const char *name, FmlObjectHandle valueType)
FmlErrorNumber Fieldml_SetParameterDataDescription (FmlSessionHandle handle, FmlObjectHandle objectHandle, FieldmlDataDescriptionType description)
FmlObjectHandle Fieldml_GetDataSource (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetKeyDataSource (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_SetDataSource (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle dataSource)
FmlErrorNumber Fieldml_SetKeyDataSource (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle dataSource)
FieldmlDataDescriptionType Fieldml_GetParameterDataDescription (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_AddDenseIndexEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle indexHandle, FmlObjectHandle orderHandle)
FmlErrorNumber Fieldml_AddSparseIndexEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle indexHandle)
int Fieldml_GetParameterIndexCount (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlBoolean isSparse)
FmlObjectHandle Fieldml_GetParameterIndexEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, int index, FmlBoolean isSparse)
FmlObjectHandle Fieldml_GetParameterIndexOrder (FmlSessionHandle handle, FmlObjectHandle objectHandle, int index)
FmlObjectHandle Fieldml_CreatePiecewiseEvaluator (FmlSessionHandle handle, const char *name, FmlObjectHandle valueType)
FmlObjectHandle Fieldml_CreateAggregateEvaluator (FmlSessionHandle handle, const char *name, FmlObjectHandle valueType)
FmlErrorNumber Fieldml_SetIndexEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, int index, FmlObjectHandle evaluatorHandle)
FmlErrorNumber Fieldml_SetDefaultEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle evaluator)
FmlObjectHandle Fieldml_GetDefaultEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_SetEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlEnsembleValue element, FmlObjectHandle evaluator)
int Fieldml_GetEvaluatorCount (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlEnsembleValue Fieldml_GetEvaluatorElement (FmlSessionHandle handle, FmlObjectHandle objectHandle, int evaluatorIndex)
FmlObjectHandle Fieldml_GetEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, int evaluatorIndex)
FmlObjectHandle Fieldml_GetElementEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlEnsembleValue elementNumber, FmlBoolean allowDefault)
int Fieldml_GetIndexEvaluatorCount (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetIndexEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, int indexNumber)
FmlObjectHandle Fieldml_CreateReferenceEvaluator (FmlSessionHandle handle, const char *name, FmlObjectHandle sourceEvaluator)
FmlObjectHandle Fieldml_GetReferenceSourceEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_AddArgument (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle evaluatorHandle)
int Fieldml_GetArgumentCount (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlBoolean isBound, FmlBoolean isUsed)
FmlObjectHandle Fieldml_GetArgument (FmlSessionHandle handle, FmlObjectHandle objectHandle, int argumentIndex, FmlBoolean isBound, FmlBoolean isUsed)
FmlErrorNumber Fieldml_SetBind (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle argumentHandle, FmlObjectHandle sourceHandle)
int Fieldml_GetBindCount (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetBindArgument (FmlSessionHandle handle, FmlObjectHandle objectHandle, int bindIndex)
FmlObjectHandle Fieldml_GetBindEvaluator (FmlSessionHandle handle, FmlObjectHandle objectHandle, int bindIndex)
FmlObjectHandle Fieldml_GetBindByArgument (FmlSessionHandle handle, FmlObjectHandle objectHandle, FmlObjectHandle argumentHandle)
FieldmlEnsembleMembersType Fieldml_GetEnsembleMembersType (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_SetEnsembleMembersDataSource (FmlSessionHandle handle, FmlObjectHandle objectHandle, FieldmlEnsembleMembersType type, int count, FmlObjectHandle dataSourceHandle)
FmlErrorNumber Fieldml_SetEnsembleMembersRange (FmlSessionHandle handle, FmlObjectHandle objectHandle, const FmlEnsembleValue minElement, const FmlEnsembleValue maxElement, const int stride)
int Fieldml_GetMemberCount (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlEnsembleValue Fieldml_GetEnsembleMembersMin (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlEnsembleValue Fieldml_GetEnsembleMembersMax (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_GetEnsembleMembersStride (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_AddImportSource (FmlSessionHandle handle, const char *href, const char *regionName)
FmlObjectHandle Fieldml_AddImport (FmlSessionHandle handle, int importSourceIndex, const char *localName, const char *remoteName)
int Fieldml_GetImportSourceCount (FmlSessionHandle handle)
int Fieldml_CopyImportSourceHref (FmlSessionHandle handle, int importSourceIndex, char *buffer, int bufferLength)
int Fieldml_CopyImportSourceRegionName (FmlSessionHandle handle, int importSourceIndex, char *buffer, int bufferLength)
int Fieldml_GetImportCount (FmlSessionHandle handle, int importSourceIndex)
int Fieldml_CopyImportLocalName (FmlSessionHandle handle, int importSourceIndex, int importIndex, char *buffer, int bufferLength)
int Fieldml_CopyImportRemoteName (FmlSessionHandle handle, int importSourceIndex, int importIndex, char *buffer, int bufferLength)
FmlObjectHandle Fieldml_GetImportObject (FmlSessionHandle handle, int importSourceIndex, int importIndex)
FmlObjectHandle Fieldml_CreateHrefDataResource (FmlSessionHandle handle, const char *name, const char *format, const char *href)
FmlObjectHandle Fieldml_CreateInlineDataResource (FmlSessionHandle handle, const char *name)
FieldmlDataResourceType Fieldml_GetDataResourceType (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_CreateArrayDataSource (FmlSessionHandle handle, const char *name, FmlObjectHandle resourceHandle, const char *location, int rank)
int Fieldml_GetDataSourceCount (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlObjectHandle Fieldml_GetDataSourceByIndex (FmlSessionHandle handle, FmlObjectHandle objectHandle, int index)
FmlObjectHandle Fieldml_GetDataSourceResource (FmlSessionHandle handle, FmlObjectHandle objectHandle)
char * Fieldml_GetArrayDataSourceLocation (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyArrayDataSourceLocation (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength)
int Fieldml_GetArrayDataSourceRank (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_GetArrayDataSourceRawSizes (FmlSessionHandle handle, FmlObjectHandle objectHandle, int *sizes)
FmlErrorNumber Fieldml_SetArrayDataSourceRawSizes (FmlSessionHandle handle, FmlObjectHandle objectHandle, int *sizes)
FmlErrorNumber Fieldml_GetArrayDataSourceOffsets (FmlSessionHandle handle, FmlObjectHandle objectHandle, int *offsets)
FmlErrorNumber Fieldml_SetArrayDataSourceOffsets (FmlSessionHandle handle, FmlObjectHandle objectHandle, int *offsets)
FmlErrorNumber Fieldml_GetArrayDataSourceSizes (FmlSessionHandle handle, FmlObjectHandle objectHandle, int *sizes)
FmlErrorNumber Fieldml_SetArrayDataSourceSizes (FmlSessionHandle handle, FmlObjectHandle objectHandle, int *sizes)
FieldmlDataSourceType Fieldml_GetDataSourceType (FmlSessionHandle handle, FmlObjectHandle objectHandle)
FmlErrorNumber Fieldml_AddInlineData (FmlSessionHandle handle, FmlObjectHandle objectHandle, const char *data, const int length)
FmlErrorNumber Fieldml_SetInlineData (FmlSessionHandle handle, FmlObjectHandle objectHandle, const char *data, const int length)
int Fieldml_GetInlineDataLength (FmlSessionHandle handle, FmlObjectHandle objectHandle)
char * Fieldml_GetInlineData (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyInlineData (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength, int offset)
char * Fieldml_GetDataResourceHref (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyDataResourceHref (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength)
char * Fieldml_GetDataResourceFormat (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyDataResourceFormat (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength)
int Fieldml_CreateConstantEvaluator (FmlSessionHandle handle, const char *name, const char *literal, FmlObjectHandle valueType)
char * Fieldml_GetConstantEvaluatorValueString (FmlSessionHandle handle, FmlObjectHandle objectHandle)
int Fieldml_CopyConstantEvaluatorValueString (FmlSessionHandle handle, FmlObjectHandle objectHandle, char *buffer, int bufferLength)

Detailed Description

API notes:

If a function returns a FmlSessionHandle or FmlObjectHandle, it will return FML_INVALID_HANDLE on error.

All FieldML objects are referred to only by their handle.

All handles are internally type-checked. If an inappropriate handle is passed to a function, the function will return -1, NULL or FML_INVALID_HANDLE as applicable, and the lastError value set.

For each string-getter, there is a corresponding string-copier. The string-copier copies the relevant string into a provided buffer and returns the number of characters copied. In cases where the getter returns NULL, the corresponding copier returns 0.

All object names must be unique within their region.

Note:
String getters are being considered for deprecation.

Enumeration Type Documentation

Describes the format of the data associated with a ParameterEvaluator.

See also:
Fieldml_SetParameterDataDescription
Fieldml_GetParameterDataDescription
Enumerator:
FML_DATA_DESCRIPTION_UNKNOWN 

The data's format is unknown.

FML_DATA_DESCRIPTION_DENSE_ARRAY 

The data is a fully-populated array.

FML_DATA_DESCRIPTION_DOK_ARRAY 

The data is a (potentially) sparse array represented by an array of keys and a separate array of values.

Describes the type of external data encapsulated by a DataResource object.

Note:
Currently, only local files (via href) and inline text is supported, but it is intended that support for additional types (such as web-based resources) will be added.
See also:
Fieldml_GetDataResourceType
Fieldml_CreateHrefDataResource
Fieldml_CreateInlineDataResource
Enumerator:
FML_DATA_RESOURCE_UNKNOWN 

The data's type is unknown.

FML_DATA_RESOURCE_HREF 

The data is a resource specified by an href.

FML_DATA_RESOURCE_INLINE 

The data is inline text.

Describes the type of data encapsulated by a DataSource object, and therefore what attribute can be used with that DataSource.

See also:
Fieldml_GetDataSourceType
Fieldml_CreateArrayDataSource
Enumerator:
FML_DATA_SOURCE_UNKNOWN 

The data source's type is unknown.

FML_DATA_SOURCE_ARRAY 

The data source is an array. The array dimensions are given by the associated raw source in the resource data itself.

Describes the means by which ensemble type members are described.

See also:
Fieldml_GetEnsembleMembersType
Fieldml_SetEnsembleMembersDataSource
Fieldml_GetDataSource
Fieldml_GetEnsembleMembersMin
Fieldml_GetEnsembleMembersMax
Fieldml_GetEnsembleMembersStride
Enumerator:
FML_ENSEMBLE_MEMBER_UNKNOWN 

Member definition is not yet known.

FML_ENSEMBLE_MEMBER_RANGE 

Members are defined directly via a min/max/stride triple, without using a data source.

FML_ENSEMBLE_MEMBER_LIST_DATA 

Members are defined by a data source containing a list of integers.

FML_ENSEMBLE_MEMBER_RANGE_DATA 

Members are defined by a data source containing a list of min/max integer pairs, with an assumed stride of 1.

FML_ENSEMBLE_MEMBER_STRIDE_RANGE_DATA 

Members are defined by a data source containing a list of min/max/stride integer triples.

Describes the various types of FieldML object.

See also:
Fieldml_GetObject
Fieldml_GetObjectCount
Fieldml_GetObjectType
Fieldml_CreateEnsembleType
Fieldml_CreateContinuousType
Fieldml_CreateMeshType
Fieldml_CreateArgumentEvaluator
Fieldml_CreateExternalEvaluator
Fieldml_CreateReferenceEvaluator
Fieldml_CreateParameterEvaluator
Fieldml_CreatePiecewiseEvaluator
Fieldml_CreateAggregateEvaluator
Fieldml_CreateHrefDataResource
Fieldml_CreateInlineDataResource
Fieldml_CreateArrayDataSource
Enumerator:
FHT_UNKNOWN 

The object's type is unknown.

FHT_ENSEMBLE_TYPE 

The object is an EnsembleType.

FHT_CONTINUOUS_TYPE 

The object is a ContinuousType.

FHT_MESH_TYPE 

The object is a MeshType.

FHT_BOOLEAN_TYPE 

The object is a BooleanType.

FHT_ARGUMENT_EVALUATOR 

The object is an ArgumentEvaluator.

FHT_EXTERNAL_EVALUATOR 

The object is an ExternalEvaluator.

FHT_REFERENCE_EVALUATOR 

The object is a ReferenceEvaluator.

FHT_PARAMETER_EVALUATOR 

The object is a ParameterEvaluator.

FHT_PIECEWISE_EVALUATOR 

The object is a PiecewiseEvaluator.

FHT_AGGREGATE_EVALUATOR 

The object is a AggregateEvaluator.

FHT_CONSTANT_EVALUATOR 

The object is a ConstantEvaluator.

FHT_DATA_RESOURCE 

The object is a DataResource.

FHT_DATA_SOURCE 

The object is a DataSource.


Function Documentation

FmlErrorNumber Fieldml_AddArgument ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
FmlObjectHandle  evaluatorHandle 
)

Add an argument evaluator to the list of argument evaluators used by the given evaluator. Arguments can only be directly set for external and argument evaluators, because they represent abstractions. However, the arguments for all types of evaluator is accessible via the relevant functions.

See also:
Fieldml_GetArgumentCount
Fieldml_GetArgument

Adds a dense index evaluator to the given parameter evaluator's data description. The given evaluator must be ensemble-valued. If the order is FML_INVALID_HANDLE, the integer ordering will be used when deserializing data. Otherwise, the order must refer to a data source containing an ordering for the index evaluator's type. For an n-member ensemble, this must be a list of n unique members of the ensemble.

See also:
Fieldml_SetParameterDataDescription
Fieldml_GetParameterIndexCount
Fieldml_GetParameterIndexEvaluator
Fieldml_GetParameterIndexOrder
Fieldml_AddSparseIndexEvaluator
FmlObjectHandle Fieldml_AddImport ( FmlSessionHandle  handle,
int  importSourceIndex,
const char *  localName,
const char *  remoteName 
)

Import a FieldML object from the given import source into the current region. The local name must be locally unique (i.e. no other local names or imports may have that name). The remote name must be an object that has either been declared in, or imported into the import source region.

See also:
Fieldml_AddImportSource
int Fieldml_AddImportSource ( FmlSessionHandle  handle,
const char *  href,
const char *  regionName 
)

Add an import source for the current region. The href will typically be the location of another FieldML resource. The API will attempt to parse the given FieldML resource. If the parsing process fails for any reason (e.g. non-existant file, invalid FieldML), -1 will be returned.

Returns:
An import index to use with subsequent import API calls, or -1 on error.
Note:
Attempting to add the same import source more than once will succeed, but will result in the same index being returned each time.
The string 'http://www.fieldml.org/resources/xml/0.5/fieldml_library.xml' will direct the API to use an internally-cached version of fieldml_library.xml.
At the moment, only filenames are supported.
See also:
Fieldml_AddImport
Fieldml_CopyImportSourceHref
Fieldml_CopyImportSourceRegionName
Fieldml_GetImportCount
Fieldml_CopyImportLocalName
Fieldml_CopyImportRemoteName
Fieldml_GetImportObject
FmlErrorNumber Fieldml_AddInlineData ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
const char *  data,
const int  length 
)

Appends the given string to the given data resource's inline data. The data resource's type must be FieldmlDataResourceType::FML_DATA_RESOURCE_INLINE.

See also:
Fieldml_CreateInlineDataResource

Adds a sparse index evaluator to the given parameter evaluator's data description. The given evaluator must be ensemble-valued.

See also:
Fieldml_SetParameterDataDescription
Fieldml_GetParameterIndexCount
Fieldml_GetParameterIndexEvaluator
Fieldml_AddDenseIndexEvaluator

Clears the given session's parsing errors and error number.

See also:
Fieldml_GetErrorCount
Fieldml_GetError
Fieldml_CopyRegionName
Fieldml_GetLastError
int Fieldml_CopyArrayDataSourceLocation ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength 
)

Copies the location of the given array data source into the given buffer.

See also:
Fieldml_CreateArrayDataSource
int Fieldml_CopyConstantEvaluatorValueString ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength 
)

Copies the string describing the given constant evaluator's value into the given buffer.

See also:
Fieldml_CreateConstantEvaluator
Fieldml_GetConstantEvaluatorValueString
int Fieldml_CopyDataResourceFormat ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength 
)

Copies the given data resource's format into the given buffer. The data resource's type must be FieldmlDataResourceType::FML_DATA_RESOURCE_ARRAY.

See also:
Fieldml_CreateArrayDataResource
int Fieldml_CopyDataResourceHref ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength 
)

Copies the given data resource's href into the given buffer. The data resource's type must be FieldmlDataResourceType::FML_DATA_RESOURCE_HREF.

See also:
Fieldml_CopyRegionName
Fieldml_CreateHrefDataResource
int Fieldml_CopyError ( FmlSessionHandle  handle,
int  errorIndex,
char *  buffer,
int  bufferLength 
)

Copies the nth parsing-error string for the given handle.

See also:
Fieldml_GetErrorCount
Fieldml_GetError
Fieldml_CopyRegionName
int Fieldml_CopyImportLocalName ( FmlSessionHandle  handle,
int  importSourceIndex,
int  importIndex,
char *  buffer,
int  bufferLength 
)

Copies the local name of the given imported object into the given buffer.

See also:
Fieldml_AddImport
Fieldml_CopyRegionName
int Fieldml_CopyImportRemoteName ( FmlSessionHandle  handle,
int  importSourceIndex,
int  importIndex,
char *  buffer,
int  bufferLength 
)

Copies the remote name of the given imported object into the given buffer.

See also:
Fieldml_AddImport
Fieldml_CopyRegionName
int Fieldml_CopyImportSourceHref ( FmlSessionHandle  handle,
int  importSourceIndex,
char *  buffer,
int  bufferLength 
)

Copies the given import source's href into the given buffer.

See also:
Fieldml_AddImportSource
Fieldml_CopyRegionName
int Fieldml_CopyImportSourceRegionName ( FmlSessionHandle  handle,
int  importSourceIndex,
char *  buffer,
int  bufferLength 
)

Copies the given import source's region name into the given buffer.

See also:
Fieldml_AddImportSource
Fieldml_CopyRegionName
int Fieldml_CopyInlineData ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength,
int  offset 
)

Copies a section of the data resource's inline data into the given buffer, starting from the given offset, and ending either when the buffer is full, or the end of the inline data is reached.

See also:
Fieldml_CopyRegionName
Fieldml_CreateInlineDataResource
int Fieldml_CopyObjectDeclaredName ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength 
)

Copies the given object's declared name into the given buffer.

See also:
Fieldml_CopyRegionName
Fieldml_GetObjectDeclaredName
int Fieldml_CopyObjectName ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
char *  buffer,
int  bufferLength 
)

Copies the given object's local name into the given buffer.

See also:
Fieldml_CopyRegionName
Fieldml_GetObjectName
int Fieldml_CopyRegionName ( FmlSessionHandle  handle,
char *  buffer,
int  bufferLength 
)

Copies the name of the region into the provided buffer. If the buffer is too short, as much data as possible will be copied.

Returns:
The length of the resulting string, or -1 on error.
Note:
The bufferLength includes the terminating null character.
It is recommended that FieldML object names be less than 128 characters.
int Fieldml_CopyRegionRoot ( FmlSessionHandle  handle,
char *  buffer,
int  bufferLength 
)

Copies the region root into the provided buffer. If the buffer is too short, as much data as possible will be copied.

Returns:
The length of the resulting string, or -1 on error.
Note:
The bufferLength includes the terminating null character.
See also:
Fieldml_GetRegionRoot
FmlSessionHandle Fieldml_Create ( const char *  location,
const char *  name 
)

Creates an empty FieldML handle.

Data files will be created at the given location.

Note:
Currently, only local directory locations are supported. This will be changed in later versions.
See also:
Fieldml_Destroy
FmlObjectHandle Fieldml_CreateAggregateEvaluator ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  valueType 
)

Creates a new aggregate evaluator. Aggregate evaluators construct a multi-component continuous value from the values a set of scalar-valued evaluators. For each component index in the output value's type, an evaluator must be specified, or a default evaluator must be available.

The value type of the index evaluator must be an ensemble that is commensurable with the index ensemble of the value type of the aggregate evaluator itself.

See also:
Fieldml_SetIndexEvaluator
Fieldml_SetDefaultEvaluator
Fieldml_SetEvaluator
FmlObjectHandle Fieldml_CreateArgumentEvaluator ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  valueType 
)

Creates an argument evaluator. An argument evaluator is a placeholder evaluator, and can be used as the source paramter for a bind just like any other evaluator. However, only argument evaluators can be the target of a bind.

See also:
Fieldml_SetBind
FmlObjectHandle Fieldml_CreateArrayDataSource ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  resourceHandle,
const char *  location,
int  rank 
)

Creates a new array-based data source, exposing data represented by the given data resource as a multi-dimensional contiguous array and the given rank. The location string's interpretation varies depending on the data resources format. e.g. For text-based resources, it is the line-number at which the data starts. For HDF5-based resources, it is the name of the dataset.

ArrayDataSources represent a contiguous sub-array within the raw array (i.e. the actual on-disk data). The sizes and offsets of this sub-array can be set via the API. Initially, both sizes and offsets are set to zero (Zero sizes are interpreted as the maximum possible size). The size of the raw array may also be specified.

For text-based arrays, the raw size must be set.

See also:
Fieldml_GetDataSourceResource
Fieldml_SetArrayDataSourceRawSizes
Fieldml_SetArrayDataSourceSizes
Fieldml_SetArrayDataSourceOffsets
FmlObjectHandle Fieldml_CreateBooleanType ( FmlSessionHandle  handle,
const char *  name 
)

Creates a boolean type with the given name.

int Fieldml_CreateConstantEvaluator ( FmlSessionHandle  handle,
const char *  name,
const char *  literal,
FmlObjectHandle  valueType 
)

Creates a new constant evaluator whose value is determined by the given literal.

See also:
Fieldml_GetConstantEvaluatorValueString
FmlObjectHandle Fieldml_CreateContinuousType ( FmlSessionHandle  handle,
const char *  name 
)

Creates a continuous type with the given name. Multi-component continuous types can be formed with a subsequent call to Fieldml_CreateContinuousTypeComponents()

See also:
Fieldml_CreateContinuousTypeComponents
FmlObjectHandle Fieldml_CreateContinuousTypeComponents ( FmlSessionHandle  handle,
FmlObjectHandle  typeHandle,
const char *  name,
const int  count 
)

Create the indexing ensemble for the given continuous type. The result is a newly initialized ensemble type, which must be configured in the same manner as a 'top level' ensemble.

Note:
A continuous type need not have an indexing ensemble, in which case it is equivalent to a scalar value type.
See also:
Fieldml_CreateContinuousType
Fieldml_CreateEnsembleType
Fieldml_GetTypeComponentEnsemble
FmlObjectHandle Fieldml_CreateEnsembleType ( FmlSessionHandle  handle,
const char *  name 
)

Creates an ensemble type with the given name.

Note:
The ensemble's members must be declared either via Fieldml_SetEnsembleMembersDataSource() or Fieldml_SetEnsembleMembersRange().
See also:
Fieldml_SetEnsembleMembersDataSource
Fieldml_SetEnsembleMembersRange
Fieldml_GetDataSource
FmlObjectHandle Fieldml_CreateExternalEvaluator ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  valueType 
)

Creates an external evaluator. An external evaluator's behaviour is defined by the author of the FieldML document in which it appears, rather than in terms of other FieldML objects. Currently, the only option is 'definition by specification'. However, it is anticipated that it will be possible to define an external evaluator's behavour inline using a non-FieldML markup language.

Note:
Typically, external evaluators will have arguments specified by Fieldml_AddArgument()
See also:
Fieldml_AddArgument
FmlSessionHandle Fieldml_CreateFromFile ( const char *  filename)

Parses the given XML file, and returns a handle to the parsed data. This handle is then used for all subsequent API calls. If an error is encountered, a valid session handle will still be returned, but can only be used to obtain detailed error information. Almost all other FieldML API calls will fail.

Note:
At the moment, the debug flag can only be set after a parse. Errors during the parse can be obtained via the error log, but at the moment they're all just strings.
Currently, only local filenames are supported. This will be changed in later versions.
See also:
Fieldml_Destroy
FmlObjectHandle Fieldml_CreateHrefDataResource ( FmlSessionHandle  handle,
const char *  name,
const char *  format,
const char *  href 
)

Creates a new href-based inline data resource. Currently, the resource must be a local file. The contents of the file can be access via FieldML IO reader and writer calls. The format can be an aribitrary string. The resulting data resource object can then have one or more data sources associated with it.

See also:
Fieldml_CreateInlineDataResource
Fieldml_CreateArrayDataSource

Creates a new text-based inline data resource. The resource will initially be an empty string, but its contents can be set either directly via Fieldml_AddInlineData calls, or indirectly via FieldML writer calls. The text data will be serialized as character data in the FieldML document. The resulting data resource object can then have one or more data sources associated with it.

See also:
Fieldml_CreateHrefDataSource
Fieldml_CreateArrayDataSource
FmlObjectHandle Fieldml_CreateMeshChartType ( FmlSessionHandle  handle,
FmlObjectHandle  meshHandle,
const char *  name 
)

Create the chart type for the given mesh type. The result is a newly initialized continuous type, which must be configured in the same manner as a 'top level' continuous type, including its indexing ensemble.

Note:
A mesh type must have a chart type, and will be considered misconfigured if not.
See also:
Fieldml_CreateContinuousType
Fieldml_CreateMeshType
Fieldml_GetMeshChartType
FmlObjectHandle Fieldml_CreateMeshElementsType ( FmlSessionHandle  handle,
FmlObjectHandle  meshHandle,
const char *  name 
)

Create the element ensemble for the given mesh type. The result is a newly initialized ensemble type, which must be configured in the same manner as a 'top level' ensemble.

Note:
A mesh type must have an element ensemble, and will be considered misconfigured if not.
See also:
Fieldml_CreateEnsembleType
Fieldml_CreateMeshType
FmlObjectHandle Fieldml_CreateMeshType ( FmlSessionHandle  handle,
const char *  name 
)

Creates a mesh type with the given name. Each mesh has its own unique element and chart type, which can be accessed by the relevant functions. Because the chart and element types have a name based on the mesh name, care must be taken to ensure that neither the mesh's name, nor it's element or chart type names are already in use. If they are, this function will return an error.

The mesh's element and chart type must be defined using Fieldml_CreateMeshElementsType() and Fieldml_CreateMeshChartType() respectively.

See also:
Fieldml_CreateMeshElementsType
Fieldml_CreateMeshChartType
Fieldml_GetMeshChartType
Fieldml_GetMeshElementsType
FmlObjectHandle Fieldml_CreateParameterEvaluator ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  valueType 
)

Creates a new parameter evaluator. A parameter evaluator presents a data source as an indexable data store.

Note:
Currently, the value type must either be a scalar continuous types or an ensemble type.
See also:
Fieldml_SetParameterDataDescription
Fieldml_SetDataSource
FmlObjectHandle Fieldml_CreatePiecewiseEvaluator ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  valueType 
)

Creates a new piecewise evaluator. Piecewise evaluators delegate their evaluation based on the value of their index evaluator, analogous to a switch statement in C. Evaluators delegated to by the piecewise evaluator must all have a value type commensurable with the piecewise itself. Piecewise evaluators need not be defined for all possible index values, and a default may be specified. Piecewise evaluators must have an index evaluator, and will be considered misconfigured otherwise.

See also:
Fieldml_SetIndexEvaluator
Fieldml_SetDefaultEvaluator
Fieldml_SetEvaluator
FmlObjectHandle Fieldml_CreateReferenceEvaluator ( FmlSessionHandle  handle,
const char *  name,
FmlObjectHandle  sourceEvaluator 
)

Creates a reference evaluator. Reference evaluators delegate their evaluation directly to another evaluator, but can bind argument evaluators before doing so.

Note:
A reference evaluator's value type is the same as the value type of its source evaluator.
See also:
Fieldml_GetReferenceSourceEvaluator

Frees all resources associated with the given handle. The handle will become invalid after this call.

See also:
Fieldml_Create
Fieldml_CreateFromFile
FmlErrorNumber Fieldml_FreeString ( char *  string)

Frees any string returned by a char* valued Fieldml_Get* function.

See also:
Fieldml_GetRegionName
FmlObjectHandle Fieldml_GetArgument ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  argumentIndex,
FmlBoolean  isBound,
FmlBoolean  isUsed 
)
Returns:
The nth argument evaluator used by the given evaluator, subject to the given qualifiers.
See also:
Fieldml_AddArgument
Fieldml_GetArgumentCount
int Fieldml_GetArgumentCount ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
FmlBoolean  isBound,
FmlBoolean  isUsed 
)
Returns:
The number of argument evaluators used by the given evaluator, subject to the given qualifiers.
See also:
Fieldml_AddArgument
Fieldml_GetArgument
Returns:
The location of the given array data source. The interpretation of this value depends on the format of the associated resource.
See also:
Fieldml_CreateArrayDataSource
Fieldml_FreeString
FmlErrorNumber Fieldml_GetArrayDataSourceOffsets ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int *  offsets 
)

Get the offsets of the array data accessible via the given data source. The offsets argument must contain a number of values equal to the data source's rank.

See also:
Fieldml_CreateArrayDataSource
Fieldml_SetArrayDataSourceOffsets
Returns:
The array rank for the given array data source.
See also:
Fieldml_CreateArrayDataSource

Get the raw size of the given array data source. This is optional for self-describing data-resource, but must be set plain-text data resources. The sizes argument must be large enough to take a number of values equal to the data source's rank.

See also:
Fieldml_CreateArrayDataSource
Fieldml_SetArrayDataSourceRawSizes
FmlErrorNumber Fieldml_GetArrayDataSourceSizes ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int *  sizes 
)

Get the sizes of the array data accessible via the given data source. Offsets are initialised to zero. Values of zero will be interpreted as the maximum possible size given the arrays raw size, and the data sources own offsets and size.

See also:
Fieldml_SetArrayDataSourceSizes
FmlObjectHandle Fieldml_GetBindArgument ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  bindIndex 
)
Returns:
The argument evaulator used by the nth bind in the given evaluator.
See also:
Fieldml_GetBindCount
Fieldml_SetBind
Returns:
The argument evaluator to which to given evaluator is bound to in the given evaluator.
See also:
Fieldml_SetBind
int Fieldml_GetBindCount ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The number of binds specified for the given evaluator.
See also:
Fieldml_SetBind
FmlObjectHandle Fieldml_GetBindEvaluator ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  bindIndex 
)
Returns:
The source evaluator used by the nth bind of the given evaluator.
See also:
Fieldml_GetBindCount
Fieldml_SetBind
Returns:
The string describing the value of the given constant evaluator.
See also:
Fieldml_CreateConstantEvaluator
char* Fieldml_GetDataResourceFormat ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The data format of the given data resource's format into the given buffer. The data resource's type must be FieldmlDataResourceType::FML_DATA_RESOURCE_ARRAY.
See also:
Fieldml_CreateArrayDataResource
char* Fieldml_GetDataResourceHref ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The href of the data resource's file. The data resource's type must be FieldmlDataResourceType::FML_DATA_RESOURCE_HREF.
See also:
Fieldml_GetRegionName
Fieldml_FreeString
Fieldml_CreateHrefDataResource
Returns:
The type of the given data resource.
See also:
Fieldml_CreateHrefDataResource
Fieldml_CreateInlineDataResource
Returns:
The data source used by the given object.
See also:
Fieldml_SetDataSource
Fieldml_SetEnsembleMembersDataSource
Returns:
The nth data source associated with the given data resource.
See also:
Fieldml_CreateArrayDataSource
Fieldml_GetDataSourceCount
int Fieldml_GetDataSourceCount ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The number of data sources associated with the given data resource.
See also:
Fieldml_CreateArrayDataSource
Fieldml_GetDataSourceByIndex
Returns:
The data resource used by the given data source.
See also:
Fieldml_CreateArrayDataSource
Fieldml_CreateHrefDataResource
Fieldml_CreateInlineDataResource
Returns:
The data source type of the given data source.
See also:
Fieldml_CreateArrayDataSource
Returns:
The default evaluator for the given piecewise or aggregate evaluator.
See also:
Fieldml_CreateAggregateEvaluator
Fieldml_CreatePiecewiseEvaluator
Fieldml_SetDefaultEvaluator
FmlObjectHandle Fieldml_GetElementEvaluator ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
FmlEnsembleValue  elementNumber,
FmlBoolean  allowDefault 
)
Returns:
The evaluator for the given index value in the given piecewise or aggregate evaluator, or FML_INVALID_HANDLE if there is none defined.
See also:
Fieldml_SetEvaluator
Returns:
The maximum possible ensemble member used when directly declaring ensemble members.
Note:
If the corresponding stride is not 1, a member with this value may not actually exist.
Only valid if the ensemble's members type is ::MEMBER_RANGE.
See also:
Fieldml_SetEnsembleMembersRange
Returns:
The minimum ensemble member used when directly declaring ensemble members.
Note:
Only valid if the ensemble's members type is ::MEMBER_RANGE.
See also:
Fieldml_SetEnsembleMembersRange
Returns:
The stride used when directly declaring ensemble members. Only valid if the ensemble's members type is ::MEMBER_RANGE.
See also:
Fieldml_SetEnsembleMembersRange
Returns:
The EnsembleMembersType describing the means by which the members of the given ensemble are specified.
See also:
Fieldml_SetEnsembleMembersDataSource
Fieldml_SetEnsembleMembersRange
char* Fieldml_GetError ( FmlSessionHandle  handle,
int  index 
)
Returns:
the nth parsing-error string for the given handle.
Note:
Currently, these string are freeform, and only intended for diagnostic purposes.
See also:
Fieldml_GetErrorCount
Fieldml_GetRegionName
Fieldml_FreeString
Returns:
The number of parsing errors encountered by the given handle during FieldML file parsing.
FmlObjectHandle Fieldml_GetEvaluator ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  evaluatorIndex 
)
Returns:
The evaluator for the nth index-value to evaluator pair in the given piecewise or aggregate evaluator.
See also:
Fieldml_SetEvaluator
Fieldml_GetEvaluatorElement
Fieldml_GetElementEvaluator
Fieldml_GetEvaluatorCount
int Fieldml_GetEvaluatorCount ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The number of explicit index-value to evaluator pairings for the given piecewise or aggregate evaluator.
See also:
Fieldml_SetEvaluator
Fieldml_GetEvaluatorElement
Fieldml_GetElementEvaluator
FmlEnsembleValue Fieldml_GetEvaluatorElement ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  evaluatorIndex 
)
Returns:
The index value for the nth index-value to evaluator pair in the given piecewise or aggregate evaluator.
See also:
Fieldml_SetEvaluator
Fieldml_GetElementEvaluator
Fieldml_GetEvaluatorCount
int Fieldml_GetImportCount ( FmlSessionHandle  handle,
int  importSourceIndex 
)
Returns:
The number of objects imported into the current region from the given import source.
See also:
Fieldml_AddImportSource
Fieldml_AddImport
FmlObjectHandle Fieldml_GetImportObject ( FmlSessionHandle  handle,
int  importSourceIndex,
int  importIndex 
)
Returns:
The handle for given imported object.
See also:
Fieldml_AddImport
Returns:
The number of import sources used by the current region.
See also:
Fieldml_AddImportSource
FmlObjectHandle Fieldml_GetIndexEvaluator ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  indexNumber 
)
Returns:
The evaluator of the nth index used by the given evaluator.
Note:
Only defined for piecewise, aggregate and parameter evaluators.
See also:
Fieldml_GetIndexEvaluatorCount
Returns:
The number of index evaluators used by the given evaluator.
Note:
For piecewise or aggreate evaluators, this is currently always one. For parameter evaluators, it depends on the data format.
See also:
Fieldml_GetIndexEvaluator
char* Fieldml_GetInlineData ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
A pointer to the data resource's inline data.
Warning:
This is obviously dangerous and should be replaced with something safer. It is recommended that Fieldml_OpenReader() and associated API be used instead.
See also:
Fieldml_GetRegionName
Fieldml_FreeString
Fieldml_CreateInlineDataResource
int Fieldml_GetInlineDataLength ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The number of characters in the data resource's inline data.
See also:
Fieldml_CreateInlineDataResource
Returns:
The data source for key values required by the given object.
Note:
Currently, this only applies to ParameterEvaluators using the dictionary-of-keys data description.
Returns:
The error code generated by the last API call.
See also:
FML_ERR_NO_ERROR
int Fieldml_GetMemberCount ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The number of members in the given ensemble.
See also:
Fieldml_SetEnsembleMembersDataSource
Fieldml_SetEnsembleMembersRange
Returns:
The component handle of the given mesh type's chart type.
See also:
Fieldml_CreateMeshChartType
Returns:
The handle of the given mesh type's chart type. This is a unique, n-dimensional continuous type with the component type specified when the mesh was created.
See also:
Fieldml_CreateMeshChartType
Returns:
The handle of the given mesh type's element type. This is a unique ensemble type whose elements are specified by the user.
See also:
Fieldml_CreateMeshElementsType
Returns:
The bounds evaluator for the given mesh. Must be boolean-valued.

Typically a piecewise indexed by the mesh elements.

See also:
Fieldml_SetMeshShapes
FmlObjectHandle Fieldml_GetObject ( FmlSessionHandle  handle,
FieldmlHandleType  objectType,
int  objectIndex 
)
Returns:
A handle to the nth object of the given type.
See also:
Fieldml_GetObjectCount
Returns:
A handle to the given declared name. This may differ from the object's local name if the object has been imported.
FmlObjectHandle Fieldml_GetObjectByIndex ( FmlSessionHandle  handle,
const int  objectIndex 
)
Returns:
A handle to the nth object.
See also:
Fieldml_GetTotalObjectCount
FmlObjectHandle Fieldml_GetObjectByName ( FmlSessionHandle  handle,
const char *  name 
)
Returns:
A handle to the object with the given local name.
See also:
Fieldml_GetObjectByDeclaredName
Fieldml_GetObjectName
Returns:
The number of objects of the given type, or zero if there are none.
See also:
Fieldml_GetObject
char* Fieldml_GetObjectDeclaredName ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The given object's declared name. This is the name the object was given in the region in which is was declared, and may differ from the the object's local name.
See also:
Fieldml_GetRegionName
Fieldml_FreeString
Fieldml_GetObjectByDeclaredName
int Fieldml_GetObjectInt ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The client-defined integer value associated with the given object.
See also:
Fieldml_SetObjectInt
char* Fieldml_GetObjectName ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle 
)
Returns:
The local name of the given object.
Note:
FieldML objects will only have a local name if they have either been imported into, or declared in the current region. Therefore an object may exist and have a declared name, even if it has no local name.
See also:
Fieldml_GetRegionName
Fieldml_FreeString
Fieldml_GetObjectDeclaredName
Returns:
The type of the given object.
Returns:
The data description type of the given parameter evaluator.
int Fieldml_GetParameterIndexCount ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
FmlBoolean  isSparse 
)
Returns:
The number of sparse or dense index evaluators of the parameter evaluator associated with the given parameter evaluator.
See also:
Fieldml_SetParameterDataDescription
Fieldml_GetParameterIndexEvaluator
Fieldml_AddDenseIndexEvaluator
Fieldml_AddSparseIndexEvaluator
FmlObjectHandle Fieldml_GetParameterIndexEvaluator ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  index,
FmlBoolean  isSparse 
)
Returns:
The handle of the nth sparse or dense index evaluator of the given parameter evaluator.
See also:
Fieldml_SetParameterDataDescription
Fieldml_GetParameterIndexCount
Fieldml_AddDenseIndexEvaluator
Fieldml_AddSparseIndexEvaluator
Returns:
The data source containing the ordering for the given dense index, or FML_INVALID_HANDLE if none was specified. For an n-member ensemble, the data source must contain n entries representing valid members of the given ensemble.
See also:
Fieldml_SetParameterDataDescription
Fieldml_AddDenseIndexEvaluator

Gets the source evaluator which the given reference evaluator delegates its evaluation to.

See also:
Fieldml_CreateReferenceEvaluator
Returns:
A newly-allocated buffer containing the name of the region, or NULL on error.
Warning:
All char* valued Fieldm_Get API calls return a newly-allocated buffer containing the string. This must be freed either by the caller (via the C standard library's free() call), or by passing the value to Fieldml_FreeString()
See also:
Fieldml_FreeString
Returns:
The root path of the current region.

NOTE: Currently, only file paths are supported. URL support will be added.

Returns:
The total number of FieldML objects, or zero if there are none.
See also:
Fieldml_GetObjectByIndex
Returns:
The number of components in the given continuous type.
Note:
Only valid for ContinuousType objects.
See also:
Fieldml_GetTypeComponentEnsemble
Returns:
The handle of the given type's component ensemble.
Note:
Only valid for ContinuousType objects.
Returns:
1 if the ensemble type is a component ensemble, 0 if not, -1 on error.
Note:
Ensembles created with the Fieldml_CreateContinuousTypeComponents() are considered to be component ensembles. Ensembles created with Fieldml_CreateEnsembleType() or Fieldml_CreateMeshElementsType() are not.
See also:
Fieldml_CreateContinuousTypeComponents
Fieldml_CreateMeshElementsType
Fieldml_CreateEnsembleType
FmlBoolean Fieldml_IsObjectLocal ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
FmlBoolean  isDeclaredOnly 
)
Returns:
1 if the given object is local, 0 if not, or -1 on error. isDeclaredOnly is true, only objects that have been declared locally will return true.
Note:
Imported objects are not considered local by this function.
FmlErrorNumber Fieldml_SetArrayDataSourceOffsets ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int *  offsets 
)

Sets the offsets of the array data accessible via the given data source. These are offsets into the containing array exposed via the data source's associated resource. Offsets are initialised to zero. The offsets argument must contain a number of values equal to the data source's rank.

See also:
Fieldml_CreateArrayDataSource
Fieldml_GetArrayDataSourceOffsets

Set the raw size of the given array data source. This is optional for self-describing data-resource, but must be set plain-text data resources. The sizes argument must contain a number of values equal to the data source's rank.

See also:
Fieldml_CreateArrayDataSource
Fieldml_SetArrayDataSourceRawSizes
FmlErrorNumber Fieldml_SetArrayDataSourceSizes ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int *  sizes 
)

Sets the sizes of the array data accessible via the given data source. Values of zero will be interpreted as the maximum possible size given the arrays raw size, and the data sources own offsets and size.

See also:
Fieldml_CreateArrayDataSource
FmlErrorNumber Fieldml_SetBind ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
FmlObjectHandle  argumentHandle,
FmlObjectHandle  sourceHandle 
)

Binds the given argument evaluator to the given source within the scope of the given evaluator. A bound argument can be re-bound, but the overriding bind's scope remains that of the enclosing evaluator.

See also:
Fieldml_GetBindCount
Fieldml_GetBindCount
Fieldml_GetBindArgument
Fieldml_GetBindEvaluator
Fieldml_GetBindByArgument

Set the data source to be used by the given object. Currently, only parameter evaluators and ensemble types use data sources.

See also:
Fieldml_GetDataSource
Fieldml_SetEnsembleMembersDataSource
FmlErrorNumber Fieldml_SetDebug ( FmlSessionHandle  handle,
int  debug 
)

Sets/clears the debug flag. If non-zero, error encoutered by API calls are logged to stdout.

Note:
This does not include errors encountered when parsing a FieldML file.

Sets the default evaluator for the given piecewise or aggregate evaluator.

See also:
Fieldml_CreateAggregateEvaluator
Fieldml_CreatePiecewiseEvaluator
Fieldml_GetDefaultEvaluator

Sets the members type and data source for the given ensemble's member list. The ensemble type's members type must be one of ::MEMBER_LIST_DATA, ::MEMBER_RANGE_DATA or ::MEMBER_STRIDE_RANGE_DATA.

See also:
EnsembleMembersType
Fieldml_GetEnsembleMembersType
Fieldml_CreateEnsembleType
FmlErrorNumber Fieldml_SetEnsembleMembersRange ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
const FmlEnsembleValue  minElement,
const FmlEnsembleValue  maxElement,
const int  stride 
)

Sets the given ensemble's member list directly via a minimum, maximum and stride triple (the maximum is inclusive). Also sets the ensemble's members type to ::MEMBER_RANGE. This is provided as a convenience to define trivial ensembles without having to use a data source.

See also:
Fieldml_GetEnsembleMembersType
Fieldml_CreateEnsembleType

Sets an explicit index value to evaluator pairing for the given aggregate or piecewise evaluator. An evaluator need not be explicitly associated with each value that the index evaluator may yield. However, in the case of aggregate evaluators, a default must be supplied in such cases.

Setting the evaluator handle to FML_INVALID_HANDLE removes the index-evaluator association.

See also:
Fieldml_GetEvaluatorCount
Fieldml_GetEvaluatorElement
Fieldml_GetElementEvaluator
Fieldml_GetEvaluator
FmlErrorNumber Fieldml_SetIndexEvaluator ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  index,
FmlObjectHandle  evaluatorHandle 
)

Set the index evaluator for the given piecewise or aggregate evaluator. The index evaluator must be ensemble-valued.

Note:
Currently, only one index evaluator is permitted. This will be changed in later versions.
See also:
Fieldml_CreateAggregateEvaluator
Fieldml_CreatePiecewiseEvaluator
Fieldml_GetIndexEvaluator
FmlErrorNumber Fieldml_SetInlineData ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
const char *  data,
const int  length 
)

Copies the given string to the given data resource's inline data. The data resource's type must be FieldmlDataResourceType::FML_DATA_RESOURCE_INLINE.

See also:
Fieldml_CreateInlineDataResource

Sets data source for key values required by the given object.

Note:
Currently, this only applies to ParameterEvaluators using the dictionary-of-keys data description.

Sets the default bounds evaluator for the mesh. Must be boolean-valued.

Typically a piecewise indexed by the mesh elements.

See also:
Fieldml_GetMeshShapes
FmlErrorNumber Fieldml_SetObjectInt ( FmlSessionHandle  handle,
FmlObjectHandle  objectHandle,
int  value 
)

Associate a client-defined integer with the given object. This value is initialized to 0 when the object is created, but is otherwise ignored by the API.

See also:
Fieldml_GetObjectInt

Sets the description of the parameter evaluator's raw data.

See also:
Fieldml_GetParameterDataDescription
FmlErrorNumber Fieldml_WriteFile ( FmlSessionHandle  handle,
const char *  filename 
)

Writes the contents of the given FieldML handle to the given filename as an XML file.

Note:
Currently, only local filenames are supported. This will be changed in later versions.
For diagnostic purposes, errors encountered during writing will not cause the file to be deleted.
 All Files Functions Typedefs Enumerations Enumerator Defines