OSFI-C++  3.10.0
OpenSF Integration Library
ConFM.h File Reference

Foreign-function interface to the ConFM module of OSFI-C++. More...

#include "ffi_base.h"

Go to the source code of this file.

ConFM module

Contains routines that wrap those in the ParamReader and Parameter classes. The ParamReader object must first be created using osfi_param_reader_create() and later destroyed by calling osfi_param_reader_destroy(). Note that parameter names are marshaled from C null-terminated strings to C++ strings, so NULL must not be passed because C++ is allowed to throw or die in that case.

Other than querying for the existence of a parameter, most requests will go through the osfi_confm_get_param() function, which finds a parameter in the file by its fully qualified name and returns a pointer to it. If the parameter does not exist, a null pointer is returned. Most routines that take a pointer to a Parameter object accept NULL as a valid input, logging an error and performing a sensible action: either the call is a no-op or a default value is returned (e.g. the size of a nonexisting parameter is 0 in all dimensions).

Functions that wrap methods returning array data take a pointer to a caller-allocated buffer. The buffer is not checked and must be large enough to hold the result, see the functions for the various OSFI_VEC_T types, or osfi_confm_get_dimension().

#define OSFI_DECL_SCALAR_GETTER_simple(Tname, Ttype)
 
#define OSFI_DECL_SCALAR_GETTER_str(Tname, Ttype)
 
#define OSFI_DECL_GETTERS(Tname, Ttype, kind)
 
enum  osfi_ffi_confm_val_res { OSFI_FFI_CONFM_VAL_PASSED = 1 , OSFI_FFI_CONFM_VAL_INVALID , OSFI_FFI_CONFM_VAL_ERRORS }
 
enum  osfi_confm_arrayorder { OSFI_CONFM_AO_LAST_CONTIG , OSFI_CONFM_AO_FIRST_CONTIG }
 
enum  OSFI_ParamElemType {
  OSFI_PET_INTEGER = 1 , OSFI_PET_FLOAT , OSFI_PET_BOOLEAN , OSFI_PET_STRING ,
  OSFI_PET_FILE , OSFI_PET_FOLDER , OSFI_PET_TIME
}
 
typedef struct OSFI_ParamReader_t OSFI_ParamReader
 
typedef struct OSFI_Parameter_t OSFI_Parameter
 
typedef struct OSFI_Vec_Tboolean_t OSFI_Vec_Tboolean
 
typedef struct OSFI_Vec_Tinteger_t OSFI_Vec_Tinteger
 
typedef struct OSFI_Vec_Tdouble_t OSFI_Vec_Tdouble
 
typedef struct OSFI_Vec_Ttime_t OSFI_Vec_Ttime
 
typedef struct OSFI_Vec_Tfile_t OSFI_Vec_Tfile
 
typedef struct OSFI_Vec_Tstring_t OSFI_Vec_Tstring
 
OSFI_ParamReaderosfi_param_reader_create (const char *fileName, const char *schema)
 
OSFI_ParamReaderosfi_param_reader_create_noval (const char *fileName)
 
void osfi_param_reader_destroy (OSFI_ParamReader **obj)
 
enum osfi_ffi_confm_val_res osfi_param_reader_valagainst (const OSFI_ParamReader *obj, const char *xsdFile)
 
void osfi_confm_print_parameters (const OSFI_ParamReader *obj)
 
bool osfi_confm_exist_parameter (const OSFI_ParamReader *obj, const char *paramName)
 
const OSFI_Parameterosfi_confm_get_param (const OSFI_ParamReader *obj, const char *paramName)
 
bool osfi_confm_get_scalar_boolean (const OSFI_Parameter *obj, bool *value)
 
int osfi_confm_vector_boolean_numel (const OSFI_Vec_Tboolean *v)
 
void osfi_confm_vector_boolean_destroy (OSFI_Vec_Tboolean **obj)
 
bool osfi_confm_vector_boolean_get (const OSFI_Vec_Tboolean *v, int index)
 
int osfi_confm_vector_boolean_copyall (const OSFI_Vec_Tboolean *v, bool *arr, int length)
 
OSFI_Vec_Tbooleanosfi_confm_get_vector_boolean_vals (const OSFI_Parameter *obj, int *size)
 
OSFI_Vec_Tbooleanosfi_confm_get_leaf_vector_boolean_vals (const OSFI_Parameter *obj, const int node[], int depth, int *size)
 
OSFI_Vec_Tbooleanosfi_confm_get_matrix_boolean_vals (const OSFI_Parameter *obj, enum osfi_confm_arrayorder aeo, int *size)
 
bool osfi_confm_get_scalar_integer (const OSFI_Parameter *obj, int *value)
 
int osfi_confm_vector_integer_numel (const OSFI_Vec_Tinteger *v)
 
void osfi_confm_vector_integer_destroy (OSFI_Vec_Tinteger **obj)
 
int osfi_confm_vector_integer_get (const OSFI_Vec_Tinteger *v, int index)
 
int osfi_confm_vector_integer_copyall (const OSFI_Vec_Tinteger *v, int *arr, int length)
 
OSFI_Vec_Tintegerosfi_confm_get_vector_integer_vals (const OSFI_Parameter *obj, int *size)
 
OSFI_Vec_Tintegerosfi_confm_get_leaf_vector_integer_vals (const OSFI_Parameter *obj, const int node[], int depth, int *size)
 
OSFI_Vec_Tintegerosfi_confm_get_matrix_integer_vals (const OSFI_Parameter *obj, enum osfi_confm_arrayorder aeo, int *size)
 
bool osfi_confm_get_scalar_double (const OSFI_Parameter *obj, double *value)
 
int osfi_confm_vector_double_numel (const OSFI_Vec_Tdouble *v)
 
void osfi_confm_vector_double_destroy (OSFI_Vec_Tdouble **obj)
 
double osfi_confm_vector_double_get (const OSFI_Vec_Tdouble *v, int index)
 
int osfi_confm_vector_double_copyall (const OSFI_Vec_Tdouble *v, double *arr, int length)
 
OSFI_Vec_Tdoubleosfi_confm_get_vector_double_vals (const OSFI_Parameter *obj, int *size)
 
OSFI_Vec_Tdoubleosfi_confm_get_leaf_vector_double_vals (const OSFI_Parameter *obj, const int node[], int depth, int *size)
 
OSFI_Vec_Tdoubleosfi_confm_get_matrix_double_vals (const OSFI_Parameter *obj, enum osfi_confm_arrayorder aeo, int *size)
 
bool osfi_confm_get_scalar_time (const OSFI_Parameter *obj, OSFI_TimeValue *value)
 
int osfi_confm_vector_time_numel (const OSFI_Vec_Ttime *v)
 
void osfi_confm_vector_time_destroy (OSFI_Vec_Ttime **obj)
 
OSFI_TimeValue osfi_confm_vector_time_get (const OSFI_Vec_Ttime *v, int index)
 
int osfi_confm_vector_time_copyall (const OSFI_Vec_Ttime *v, OSFI_TimeValue *arr, int length)
 
OSFI_Vec_Ttimeosfi_confm_get_vector_time_vals (const OSFI_Parameter *obj, int *size)
 
OSFI_Vec_Ttimeosfi_confm_get_leaf_vector_time_vals (const OSFI_Parameter *obj, const int node[], int depth, int *size)
 
OSFI_Vec_Ttimeosfi_confm_get_matrix_time_vals (const OSFI_Parameter *obj, enum osfi_confm_arrayorder aeo, int *size)
 
int osfi_confm_get_scalar_file (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_confm_vector_file_numel (const OSFI_Vec_Tfile *v)
 
void osfi_confm_vector_file_destroy (OSFI_Vec_Tfile **obj)
 
int osfi_confm_vector_file_get (const OSFI_Vec_Tfile *v, int index, char *buf, int bufSz)
 
bool osfi_confm_vector_file_copyall (const OSFI_Vec_Tfile *v, char **strArr, int *itemSz, int *numItems)
 
OSFI_Vec_Tfileosfi_confm_get_vector_file_vals (const OSFI_Parameter *obj, int *size)
 
OSFI_Vec_Tfileosfi_confm_get_leaf_vector_file_vals (const OSFI_Parameter *obj, const int node[], int depth, int *size)
 
OSFI_Vec_Tfileosfi_confm_get_matrix_file_vals (const OSFI_Parameter *obj, enum osfi_confm_arrayorder aeo, int *size)
 
int osfi_confm_get_scalar_string (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_confm_vector_string_numel (const OSFI_Vec_Tstring *v)
 
void osfi_confm_vector_string_destroy (OSFI_Vec_Tstring **obj)
 
int osfi_confm_vector_string_get (const OSFI_Vec_Tstring *v, int index, char *buf, int bufSz)
 
bool osfi_confm_vector_string_copyall (const OSFI_Vec_Tstring *v, char **strArr, int *itemSz, int *numItems)
 
OSFI_Vec_Tstringosfi_confm_get_vector_string_vals (const OSFI_Parameter *obj, int *size)
 
OSFI_Vec_Tstringosfi_confm_get_leaf_vector_string_vals (const OSFI_Parameter *obj, const int node[], int depth, int *size)
 
OSFI_Vec_Tstringosfi_confm_get_matrix_string_vals (const OSFI_Parameter *obj, enum osfi_confm_arrayorder aeo, int *size)
 
OSFI_Vec_Tbooleanosfi_confm_file_exist (const OSFI_Parameter *p, enum osfi_confm_arrayorder aeo, int *size)
 
int osfi_param_get_local_name (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_param_get_path (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_param_get_description (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_param_get_min_value (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_param_get_max_value (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_param_get_units (const OSFI_Parameter *obj, char *buf, int bufSz)
 
int osfi_param_get_raw_value (const OSFI_Parameter *obj, char *buf, int bufSz)
 
enum OSFI_ParamElemType osfi_param_get_element_type (const OSFI_Parameter *obj)
 
bool osfi_param_is_array (const OSFI_Parameter *obj)
 
int osfi_confm_get_num_dims (const OSFI_Parameter *obj)
 
int osfi_confm_get_dimension (const OSFI_Parameter *obj, int index)
 
int osfi_confm_get_node_dimension (const OSFI_Parameter *obj, const int node[], int depth)
 
bool osfi_confm_is_leaf (const OSFI_Parameter *obj, const int node[], int depth)
 
void osfi_confm_get_parameter (const OSFI_Parameter *obj, char *name, char *description, char *value, char *units, int dims[3], char *max, char *min, int *type)
 
void osfi_confm_print_parameter (const OSFI_Parameter *obj)
 
OSFI_Vec_Tstringosfi_confm_list_all_params (const OSFI_ParamReader *obj)
 Wraps ParamReader::getParameters() More...
 
OSFI_Vec_Tstringosfi_confm_list_child_params (const OSFI_ParamReader *obj, const char *parentGrp)
 Wraps ParamReader::getParameters(std::string) More...
 
int osfi_confm_compare_timevalue (const OSFI_TimeValue *a, const OSFI_TimeValue *b)
 

Detailed Description

Foreign-function interface to the ConFM module of OSFI-C++.

This file exposes an interface to the OSFI functions that can be called without C++ name mangling or other C++-specific features such as exception handling. It is not the OSFI-C interface, which resides in "OSFIC.h". It is intended as an intermediate layer to create bindings to OSFI-C++ from other languages; currently C and Fortran are supported through it.

Macro Definition Documentation

◆ OSFI_DECL_GETTERS

#define OSFI_DECL_GETTERS (   Tname,
  Ttype,
  kind 
)
Value:
OSFI_DECL_SCALAR_GETTER_ ## kind(Tname, Ttype); \
OSFI_DECL_VECTOR(Tname, Ttype, kind); \ \
OSFI_VEC_T(Tname) * osfi_confm_get_vector_##Tname##_vals(const OSFI_Parameter* obj, int* size); \ \
OSFI_VEC_T(Tname) * osfi_confm_get_leaf_vector_##Tname##_vals(const OSFI_Parameter* obj, const int node[], int depth, int* size); \ \
OSFI_VEC_T(Tname) * osfi_confm_get_matrix_##Tname##_vals(const OSFI_Parameter* obj, enum osfi_confm_arrayorder aeo, int* size);
struct OSFI_Parameter_t OSFI_Parameter
Definition: ConFM.h:53
osfi_confm_arrayorder
Definition: ConFM.h:92

◆ OSFI_DECL_SCALAR_GETTER_simple

#define OSFI_DECL_SCALAR_GETTER_simple (   Tname,
  Ttype 
)
Value:
\
bool osfi_confm_get_scalar_##Tname(const OSFI_Parameter* obj, Ttype* value)

◆ OSFI_DECL_SCALAR_GETTER_str

#define OSFI_DECL_SCALAR_GETTER_str (   Tname,
  Ttype 
)
Value:
\
int osfi_confm_get_scalar_##Tname(const OSFI_Parameter* obj, Ttype buf, int bufSz)

Typedef Documentation

◆ OSFI_Parameter

typedef struct OSFI_Parameter_t OSFI_Parameter

Parameter object, in the FFI.

◆ OSFI_ParamReader

typedef struct OSFI_ParamReader_t OSFI_ParamReader

ParamReader object, in the FFI.

◆ OSFI_Vec_Tboolean

typedef struct OSFI_Vec_Tboolean_t OSFI_Vec_Tboolean

Anonymous type in the FFI for an OSFI-managed vector of type "boolean" (element type bool).

◆ OSFI_Vec_Tdouble

typedef struct OSFI_Vec_Tdouble_t OSFI_Vec_Tdouble

Anonymous type in the FFI for an OSFI-managed vector of type "double" (element type double).

◆ OSFI_Vec_Tfile

typedef struct OSFI_Vec_Tfile_t OSFI_Vec_Tfile

Anonymous type in the FFI for an OSFI-managed vector of type "file" (element type char*).

◆ OSFI_Vec_Tinteger

typedef struct OSFI_Vec_Tinteger_t OSFI_Vec_Tinteger

Anonymous type in the FFI for an OSFI-managed vector of type "integer" (element type int).

◆ OSFI_Vec_Tstring

typedef struct OSFI_Vec_Tstring_t OSFI_Vec_Tstring

Anonymous type in the FFI for an OSFI-managed vector of type "string" (element type char*).

◆ OSFI_Vec_Ttime

typedef struct OSFI_Vec_Ttime_t OSFI_Vec_Ttime

Anonymous type in the FFI for an OSFI-managed vector of type "time" (element type OSFI_TimeValue).

Enumeration Type Documentation

◆ osfi_confm_arrayorder

The two possible layouts for multi-dimensional arrays.

Enumerator
OSFI_CONFM_AO_LAST_CONTIG 

The "C" array element order: the 1st dimension advances the slowest, so in an MxNxP array elements are laid out in memory row by row. This is known as "row-major" order. With indices starting at 0, the offset of the element at position (i,j,k) is (i*N + j)*P + k.

OSFI_CONFM_AO_FIRST_CONTIG 

The "Fortran" array element order: the 1st dimension advances the fastest, so in an MxNxP array elements are laid out in memory "page" by "page". This is known as "column-major" order (even in 3D). With indices starting at 0, the offset of the element at position (i,j,k) is i + M*(j + N*k).

◆ osfi_ffi_confm_val_res

Return values for the osfi_param_reader_valagainst function.

Enumerator
OSFI_FFI_CONFM_VAL_PASSED 

Validation ran and passed.

OSFI_FFI_CONFM_VAL_INVALID 

Validation ran but the document did not validate against the schema.

OSFI_FFI_CONFM_VAL_ERRORS 

Validation failed to run due to any error (e.g. schema not found).

◆ OSFI_ParamElemType

The various types of element types that a parameter may use according to the E2E-ICD. Wraps Parameter::ElementType.

Function Documentation

◆ osfi_confm_compare_timevalue()

int osfi_confm_compare_timevalue ( const OSFI_TimeValue a,
const OSFI_TimeValue b 
)

Comparison function between TimeValue instances.

Parameters
a,bValues to compare. NULL pointers compare as less-than any non-NULL value.
Returns
int Negative if a<b, zero if a==b, positive if a>b

◆ osfi_confm_exist_parameter()

bool osfi_confm_exist_parameter ( const OSFI_ParamReader obj,
const char *  paramName 
)

◆ osfi_confm_file_exist()

OSFI_Vec_Tboolean* osfi_confm_file_exist ( const OSFI_Parameter p,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Wraps Parameter::fileExist(). If called with a null parameter, it just returns null.

◆ osfi_confm_get_dimension()

int osfi_confm_get_dimension ( const OSFI_Parameter obj,
int  index 
)

Gets the size of the given dimension for the parameter.

Parameters
objParameter to examine. If NULL, the function always returns zero.
indexDimension to query. If out of range, the return value is one.

◆ osfi_confm_get_leaf_vector_boolean_vals()

OSFI_Vec_Tboolean* osfi_confm_get_leaf_vector_boolean_vals ( const OSFI_Parameter obj,
const int  node[],
int  depth,
int *  size 
)

Get the value of a 1D slice of the N-D array with a boolean type. Wraps Parameter::getVectorX(std::vector<int>).

◆ osfi_confm_get_leaf_vector_double_vals()

OSFI_Vec_Tdouble* osfi_confm_get_leaf_vector_double_vals ( const OSFI_Parameter obj,
const int  node[],
int  depth,
int *  size 
)

Get the value of a 1D slice of the N-D array with a double type. Wraps Parameter::getVectorX(std::vector<int>).

◆ osfi_confm_get_leaf_vector_file_vals()

OSFI_Vec_Tfile* osfi_confm_get_leaf_vector_file_vals ( const OSFI_Parameter obj,
const int  node[],
int  depth,
int *  size 
)

Get the value of a 1D slice of the N-D array with a file type. Wraps Parameter::getVectorX(std::vector<int>).

◆ osfi_confm_get_leaf_vector_integer_vals()

OSFI_Vec_Tinteger* osfi_confm_get_leaf_vector_integer_vals ( const OSFI_Parameter obj,
const int  node[],
int  depth,
int *  size 
)

Get the value of a 1D slice of the N-D array with a integer type. Wraps Parameter::getVectorX(std::vector<int>).

◆ osfi_confm_get_leaf_vector_string_vals()

OSFI_Vec_Tstring* osfi_confm_get_leaf_vector_string_vals ( const OSFI_Parameter obj,
const int  node[],
int  depth,
int *  size 
)

Get the value of a 1D slice of the N-D array with a string type. Wraps Parameter::getVectorX(std::vector<int>).

◆ osfi_confm_get_leaf_vector_time_vals()

OSFI_Vec_Ttime* osfi_confm_get_leaf_vector_time_vals ( const OSFI_Parameter obj,
const int  node[],
int  depth,
int *  size 
)

Get the value of a 1D slice of the N-D array with a time type. Wraps Parameter::getVectorX(std::vector<int>).

◆ osfi_confm_get_matrix_boolean_vals()

OSFI_Vec_Tboolean* osfi_confm_get_matrix_boolean_vals ( const OSFI_Parameter obj,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Get a vector representing the matrix with a boolean type. Elements are in the chosen array element order. * Wraps Parameter::getMatrixX().

◆ osfi_confm_get_matrix_double_vals()

OSFI_Vec_Tdouble* osfi_confm_get_matrix_double_vals ( const OSFI_Parameter obj,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Get a vector representing the matrix with a double type. Elements are in the chosen array element order. * Wraps Parameter::getMatrixX().

◆ osfi_confm_get_matrix_file_vals()

OSFI_Vec_Tfile* osfi_confm_get_matrix_file_vals ( const OSFI_Parameter obj,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Get a vector representing the matrix with a file type. Elements are in the chosen array element order. * Wraps Parameter::getMatrixX().

◆ osfi_confm_get_matrix_integer_vals()

OSFI_Vec_Tinteger* osfi_confm_get_matrix_integer_vals ( const OSFI_Parameter obj,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Get a vector representing the matrix with a integer type. Elements are in the chosen array element order. * Wraps Parameter::getMatrixX().

◆ osfi_confm_get_matrix_string_vals()

OSFI_Vec_Tstring* osfi_confm_get_matrix_string_vals ( const OSFI_Parameter obj,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Get a vector representing the matrix with a string type. Elements are in the chosen array element order. * Wraps Parameter::getMatrixX().

◆ osfi_confm_get_matrix_time_vals()

OSFI_Vec_Ttime* osfi_confm_get_matrix_time_vals ( const OSFI_Parameter obj,
enum osfi_confm_arrayorder  aeo,
int *  size 
)

Get a vector representing the matrix with a time type. Elements are in the chosen array element order. * Wraps Parameter::getMatrixX().

◆ osfi_confm_get_node_dimension()

int osfi_confm_get_node_dimension ( const OSFI_Parameter obj,
const int  node[],
int  depth 
)

Gets the size of a specific subobject in an inhomogeneous array. Wraps Parameter::getDims(std::vector<int>).

Parameters
objParameter to examine. If NULL, the function always returns zero.
nodeCoordinates to query, 0-based.
depthSize of the node array. Note that inhomogeneous arrays always work in row-major (C-like) order.

◆ osfi_confm_get_num_dims()

int osfi_confm_get_num_dims ( const OSFI_Parameter obj)

◆ osfi_confm_get_param()

const OSFI_Parameter* osfi_confm_get_param ( const OSFI_ParamReader obj,
const char *  paramName 
)

Wrapper for ParamReader::getParameterRef. Logs an error and returns a null pointer if the parameter name does not exist.

◆ osfi_confm_get_parameter()

void osfi_confm_get_parameter ( const OSFI_Parameter obj,
char *  name,
char *  description,
char *  value,
char *  units,
int  dims[3],
char *  max,
char *  min,
int *  type 
)
Deprecated:
This function is unsafe because it writes into unknown-sized char buffers.

◆ osfi_confm_get_scalar_boolean()

bool osfi_confm_get_scalar_boolean ( const OSFI_Parameter obj,
bool *  value 
)

Get a scalar value of type boolean . On a parsing error, returns false and does not write on value.

◆ osfi_confm_get_scalar_double()

bool osfi_confm_get_scalar_double ( const OSFI_Parameter obj,
double *  value 
)

Get a scalar value of type double . On a parsing error, returns false and does not write on value.

◆ osfi_confm_get_scalar_file()

int osfi_confm_get_scalar_file ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Get a string-like value and return the minimum required buffer size. On a parsing error, returns a negative value.

◆ osfi_confm_get_scalar_integer()

bool osfi_confm_get_scalar_integer ( const OSFI_Parameter obj,
int *  value 
)

Get a scalar value of type integer . On a parsing error, returns false and does not write on value.

◆ osfi_confm_get_scalar_string()

int osfi_confm_get_scalar_string ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Get a string-like value and return the minimum required buffer size. On a parsing error, returns a negative value.

◆ osfi_confm_get_scalar_time()

bool osfi_confm_get_scalar_time ( const OSFI_Parameter obj,
OSFI_TimeValue value 
)

Get a scalar value of type time . On a parsing error, returns false and does not write on value.

◆ osfi_confm_get_vector_boolean_vals()

OSFI_Vec_Tboolean* osfi_confm_get_vector_boolean_vals ( const OSFI_Parameter obj,
int *  size 
)

Get the value of a 1D vector with a boolean type. Wraps Parameter::getVectorX().

◆ osfi_confm_get_vector_double_vals()

OSFI_Vec_Tdouble* osfi_confm_get_vector_double_vals ( const OSFI_Parameter obj,
int *  size 
)

Get the value of a 1D vector with a double type. Wraps Parameter::getVectorX().

◆ osfi_confm_get_vector_file_vals()

OSFI_Vec_Tfile* osfi_confm_get_vector_file_vals ( const OSFI_Parameter obj,
int *  size 
)

Get the value of a 1D vector with a file type. Wraps Parameter::getVectorX().

◆ osfi_confm_get_vector_integer_vals()

OSFI_Vec_Tinteger* osfi_confm_get_vector_integer_vals ( const OSFI_Parameter obj,
int *  size 
)

Get the value of a 1D vector with a integer type. Wraps Parameter::getVectorX().

◆ osfi_confm_get_vector_string_vals()

OSFI_Vec_Tstring* osfi_confm_get_vector_string_vals ( const OSFI_Parameter obj,
int *  size 
)

Get the value of a 1D vector with a string type. Wraps Parameter::getVectorX().

◆ osfi_confm_get_vector_time_vals()

OSFI_Vec_Ttime* osfi_confm_get_vector_time_vals ( const OSFI_Parameter obj,
int *  size 
)

Get the value of a 1D vector with a time type. Wraps Parameter::getVectorX().

◆ osfi_confm_is_leaf()

bool osfi_confm_is_leaf ( const OSFI_Parameter obj,
const int  node[],
int  depth 
)

Checks whether the given coordinates point to a leaf node in the inhomogeneous array parameter. Wraps Parameter::isLeaf(std::vector<int>). If called with a null parameter, it always returns true.

◆ osfi_confm_list_all_params()

OSFI_Vec_Tstring* osfi_confm_list_all_params ( const OSFI_ParamReader obj)

Wraps ParamReader::getParameters()

Returns
a vector of the parameter full paths for all parameters in the file

◆ osfi_confm_list_child_params()

OSFI_Vec_Tstring* osfi_confm_list_child_params ( const OSFI_ParamReader obj,
const char *  parentGrp 
)

Wraps ParamReader::getParameters(std::string)

Returns
a vector of the parameter full paths for parameters that are children, direct or not, of parentGrp.

◆ osfi_confm_print_parameter()

void osfi_confm_print_parameter ( const OSFI_Parameter obj)

Wraps Parameter::print(), writing information related to the given parameter to the "info" output stream. See Logger::info().

◆ osfi_confm_print_parameters()

void osfi_confm_print_parameters ( const OSFI_ParamReader obj)

Wrapper for ParamReader::print().

◆ osfi_confm_vector_boolean_copyall()

int osfi_confm_vector_boolean_copyall ( const OSFI_Vec_Tboolean v,
bool *  arr,
int  length 
)

Copies all elements from a managed vector object to the given array. If length is * smaller than required or a null array is given, only returns the required length. In * case of error, returns a negative value.

◆ osfi_confm_vector_boolean_destroy()

void osfi_confm_vector_boolean_destroy ( OSFI_Vec_Tboolean **  obj)

Free and nullify a vector object. If given a null pointer or a null object, does nothing.

◆ osfi_confm_vector_boolean_get()

bool osfi_confm_vector_boolean_get ( const OSFI_Vec_Tboolean v,
int  index 
)

Get a single element from a managed vector object. No null/bounds checks are made.

◆ osfi_confm_vector_boolean_numel()

int osfi_confm_vector_boolean_numel ( const OSFI_Vec_Tboolean v)

Get the number of elements of a managed vector object. If given a null pointer, returns 0.

◆ osfi_confm_vector_double_copyall()

int osfi_confm_vector_double_copyall ( const OSFI_Vec_Tdouble v,
double *  arr,
int  length 
)

Copies all elements from a managed vector object to the given array. If length is * smaller than required or a null array is given, only returns the required length. In * case of error, returns a negative value.

◆ osfi_confm_vector_double_destroy()

void osfi_confm_vector_double_destroy ( OSFI_Vec_Tdouble **  obj)

Free and nullify a vector object. If given a null pointer or a null object, does nothing.

◆ osfi_confm_vector_double_get()

double osfi_confm_vector_double_get ( const OSFI_Vec_Tdouble v,
int  index 
)

Get a single element from a managed vector object. No null/bounds checks are made.

◆ osfi_confm_vector_double_numel()

int osfi_confm_vector_double_numel ( const OSFI_Vec_Tdouble v)

Get the number of elements of a managed vector object. If given a null pointer, returns 0.

◆ osfi_confm_vector_file_copyall()

bool osfi_confm_vector_file_copyall ( const OSFI_Vec_Tfile v,
char **  strArr,
int *  itemSz,
int *  numItems 
)

Copies all elements from a managed vector object to the given array of buffers. The two size pointers * cannot be null; they are filled with the minimum required buffer size and number of buffers on output. * Elements larger than the individual buffer size will be truncated, but as long as bufSz is not zero * they will always be null-terminated.

◆ osfi_confm_vector_file_destroy()

void osfi_confm_vector_file_destroy ( OSFI_Vec_Tfile **  obj)

Free and nullify a vector object. If given a null pointer or a null object, does nothing.

◆ osfi_confm_vector_file_get()

int osfi_confm_vector_file_get ( const OSFI_Vec_Tfile v,
int  index,
char *  buf,
int  bufSz 
)

Get a single element from a managed vector object and return the minimum required buffer size. If * bufSz is positive but not big enough, the element can get truncated, but it is null-terminated.

◆ osfi_confm_vector_file_numel()

int osfi_confm_vector_file_numel ( const OSFI_Vec_Tfile v)

Get the number of elements of a managed vector object. If given a null pointer, returns 0.

◆ osfi_confm_vector_integer_copyall()

int osfi_confm_vector_integer_copyall ( const OSFI_Vec_Tinteger v,
int *  arr,
int  length 
)

Copies all elements from a managed vector object to the given array. If length is * smaller than required or a null array is given, only returns the required length. In * case of error, returns a negative value.

◆ osfi_confm_vector_integer_destroy()

void osfi_confm_vector_integer_destroy ( OSFI_Vec_Tinteger **  obj)

Free and nullify a vector object. If given a null pointer or a null object, does nothing.

◆ osfi_confm_vector_integer_get()

int osfi_confm_vector_integer_get ( const OSFI_Vec_Tinteger v,
int  index 
)

Get a single element from a managed vector object. No null/bounds checks are made.

◆ osfi_confm_vector_integer_numel()

int osfi_confm_vector_integer_numel ( const OSFI_Vec_Tinteger v)

Get the number of elements of a managed vector object. If given a null pointer, returns 0.

◆ osfi_confm_vector_string_copyall()

bool osfi_confm_vector_string_copyall ( const OSFI_Vec_Tstring v,
char **  strArr,
int *  itemSz,
int *  numItems 
)

Copies all elements from a managed vector object to the given array of buffers. The two size pointers * cannot be null; they are filled with the minimum required buffer size and number of buffers on output. * Elements larger than the individual buffer size will be truncated, but as long as bufSz is not zero * they will always be null-terminated.

◆ osfi_confm_vector_string_destroy()

void osfi_confm_vector_string_destroy ( OSFI_Vec_Tstring **  obj)

Free and nullify a vector object. If given a null pointer or a null object, does nothing.

◆ osfi_confm_vector_string_get()

int osfi_confm_vector_string_get ( const OSFI_Vec_Tstring v,
int  index,
char *  buf,
int  bufSz 
)

Get a single element from a managed vector object and return the minimum required buffer size. If * bufSz is positive but not big enough, the element can get truncated, but it is null-terminated.

◆ osfi_confm_vector_string_numel()

int osfi_confm_vector_string_numel ( const OSFI_Vec_Tstring v)

Get the number of elements of a managed vector object. If given a null pointer, returns 0.

◆ osfi_confm_vector_time_copyall()

int osfi_confm_vector_time_copyall ( const OSFI_Vec_Ttime v,
OSFI_TimeValue arr,
int  length 
)

Copies all elements from a managed vector object to the given array. If length is * smaller than required or a null array is given, only returns the required length. In * case of error, returns a negative value.

◆ osfi_confm_vector_time_destroy()

void osfi_confm_vector_time_destroy ( OSFI_Vec_Ttime **  obj)

Free and nullify a vector object. If given a null pointer or a null object, does nothing.

◆ osfi_confm_vector_time_get()

OSFI_TimeValue osfi_confm_vector_time_get ( const OSFI_Vec_Ttime v,
int  index 
)

Get a single element from a managed vector object. No null/bounds checks are made.

◆ osfi_confm_vector_time_numel()

int osfi_confm_vector_time_numel ( const OSFI_Vec_Ttime v)

Get the number of elements of a managed vector object. If given a null pointer, returns 0.

◆ osfi_param_get_description()

int osfi_param_get_description ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getDescription(). If called with a null parameter, it returns zero.

◆ osfi_param_get_element_type()

enum OSFI_ParamElemType osfi_param_get_element_type ( const OSFI_Parameter obj)

◆ osfi_param_get_local_name()

int osfi_param_get_local_name ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getLocalName(). If called with a null parameter, it returns zero.

◆ osfi_param_get_max_value()

int osfi_param_get_max_value ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getMax(). If called with a null parameter, it returns zero.

◆ osfi_param_get_min_value()

int osfi_param_get_min_value ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getMin(). If called with a null parameter, it returns zero.

◆ osfi_param_get_path()

int osfi_param_get_path ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getPath(). If called with a null parameter, it returns zero.

◆ osfi_param_get_raw_value()

int osfi_param_get_raw_value ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getRawValue(). If called with a null parameter, it returns zero.

◆ osfi_param_get_units()

int osfi_param_get_units ( const OSFI_Parameter obj,
char *  buf,
int  bufSz 
)

Wraps Parameter::getUnits(). If called with a null parameter, it returns zero.

◆ osfi_param_is_array()

bool osfi_param_is_array ( const OSFI_Parameter obj)

◆ osfi_param_reader_create()

OSFI_ParamReader* osfi_param_reader_create ( const char *  fileName,
const char *  schema 
)

Create an instance of the ParamReader class with the given arguments. Returns a null pointer in case of error.

Deprecated:
As it maps to a ParamReader::ParamReader(std::string, std::string) which is deprecated.

◆ osfi_param_reader_create_noval()

OSFI_ParamReader* osfi_param_reader_create_noval ( const char *  fileName)

Create an instance of the ParamReader class with the given arguments. Returns a null pointer in case of error.

◆ osfi_param_reader_destroy()

void osfi_param_reader_destroy ( OSFI_ParamReader **  obj)

Call delete on *obj and nullify the pointer. No-op if either obj or *obj are a null pointer.

◆ osfi_param_reader_valagainst()

enum osfi_ffi_confm_val_res osfi_param_reader_valagainst ( const OSFI_ParamReader obj,
const char *  xsdFile 
)

Wrapper for ParamReader::validateAgainst(const std::string&) and ParamReader::validateAgainstInternalSchema(). The first overload is chosen if xsdFile is not a null pointer (even if the string is empty!), the second otherwise.