RMNLibrary

Core definitions and includes for the RMN measurement library This header centralizes project-wide includes and dependencies for the RMN library, wrapping both OCTypes and SITypes core headers as well as local modules (Datum, Dimension, Dataset).

Defines

HAVE_LAPACKE
HAVE_OPENMP
DependentVariableComponentsFileName

Functions

OCStringRef RMNLibGetDescription(OCTypeRef theType, OCStringRef *outError)

Universal getter for description property across RMNLib types.

Note

Supported types: Dimension, DependentVariable, SparseSampling, Dataset

Note

Not supported: Datum, GeographicCoordinate

Parameters:
  • theType – The RMNLib object to get description from

  • outError – Optional error output parameter

Returns:

The description string, or NULL if not supported or on error

bool RMNLibSetDescription(OCTypeRef theType, OCStringRef description, OCStringRef *outError)

Universal setter for description property across RMNLib types.

Note

Supported types: Dimension, DependentVariable, SparseSampling, Dataset

Note

Not supported: Datum, GeographicCoordinate

Parameters:
  • theType – The RMNLib object to set description on

  • description – The description string to set

  • outError – Optional error output parameter

Returns:

true on success, false on error

OCDictionaryRef RMNLibGetApplicationMetaData(OCTypeRef theType, OCStringRef *outError)

Universal getter for application metadata across RMNLib types.

Note

Supported types: All RMNLib types except Datum

Parameters:
  • theType – The RMNLib object to get metadata from

  • outError – Optional error output parameter

Returns:

The application metadata dictionary, or NULL if not supported or on error

bool RMNLibSetApplicationMetaData(OCTypeRef theType, OCDictionaryRef metadata, OCStringRef *outError)

Universal setter for application metadata across RMNLib types.

Note

Supported types: All RMNLib types except Datum

Parameters:
  • theType – The RMNLib object to set metadata on

  • metadata – The metadata dictionary to set (can be NULL)

  • outError – Optional error output parameter

Returns:

true on success, false on error

void RMNLibTypesShutdown(void)

Shuts down the RMNLib library and releases all internal resources.

This function performs comprehensive cleanup of all RMNLib internal state, including type registrations, cached objects, and any global resources allocated during library operation. It should be called near the end of the program to ensure proper cleanup and accurate leak detection.

The function performs the following cleanup operations:

  • Releases all registered RMNLib type definitions

  • Clears internal caches and static instances

  • Frees memory pools and temporary allocations

  • Calls OCTypesShutdown() and SITypesShutdown() for underlying libraries

  • Resets all global state to initial conditions

After calling this function:

  • No RMNLib functions should be called except for re-initialization

  • All RMNLib objects should have been released by the caller beforehand

  • Memory leak detection tools should report accurate results

  • The library can be safely re-initialized if needed

See also

OCTypesShutdown() for cleanup of the underlying OCTypes library

See also

SITypesShutdown() for cleanup of the underlying SITypes library

Note

This function is optional but recommended for applications that want clean shutdown and accurate leak detection.

Note

Calling this function multiple times is safe (subsequent calls are no-ops).

Note

This function does not free objects created by the application - those must be released by the caller using OCRelease().

Warning

This function should only be called when no RMNLib objects are still in use. Accessing RMNLib objects after calling this function results in undefined behavior.

Warning

This function is not thread-safe. Ensure all RMNLib operations have completed before calling this function.