CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
User Facing Custom Struct API

The Public User Struct API. More...

Functions

VX_API_ENTRY vx_enum VX_API_CALL vxRegisterUserStruct (vx_context context, vx_size size)
 Registers user-defined structures to the context.
 
VX_API_ENTRY vx_enum VX_API_CALL vxRegisterUserStructWithName (vx_context context, vx_size size, const vx_char *type_name)
 Registers user-defined structures to the context, and associates a name to it.
 
VX_API_ENTRY vx_status VX_API_CALL vxGetUserStructNameByEnum (vx_context context, vx_enum user_struct_type, vx_char *type_name, vx_size name_size)
 Returns the name of the user-defined structure associated with the enumeration given.
 
VX_API_ENTRY vx_status VX_API_CALL vxGetUserStructEnumByName (vx_context context, const vx_char *type_name, vx_enum *user_struct_type)
 Returns the enum of the user-defined structure associated with the name given.
 

Detailed Description

The Public User Struct API.

Function Documentation

◆ vxGetUserStructEnumByName()

VX_API_ENTRY vx_status VX_API_CALL vxGetUserStructEnumByName ( vx_context context,
const vx_char * type_name,
vx_enum * user_struct_type )

#include <vx_api.h>

Returns the enum of the user-defined structure associated with the name given.

Parameters
[in]contextThe reference to the implementation context.
[in]type_namePointer to the '\0' terminated string that identifies the user struct type. The length of the string shall be lower than VX_MAX_REFERENCE_NAME bytes.
[out]user_struct_typeThe enumeration value of the user struct
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESStype_name was valid, and enumeration was found and returned
VX_FAILUREtype_name does not match any user struct enumeration.
Precondition
vxRegisterUserStructWithName should be called for this user struct.

◆ vxGetUserStructNameByEnum()

VX_API_ENTRY vx_status VX_API_CALL vxGetUserStructNameByEnum ( vx_context context,
vx_enum user_struct_type,
vx_char * type_name,
vx_size name_size )

#include <vx_api.h>

Returns the name of the user-defined structure associated with the enumeration given.

Parameters
[in]contextThe reference to the implementation context.
[in]user_struct_typeThe enumeration value of the user struct
[out]type_nameName of the user struct
[in]name_sizeThe size of allocated buffer pointed to by type_name
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSuser_struct_type was valid, and name was found and returned
VX_ERROR_INVALID_PARAMETERSuser_struct_type was not a valid user struct enumeration.
VX_ERROR_NO_MEMORYname_size is too small to hold the name of the user struct type.
VX_FAILUREuser_struct_type does not have an associated type name.
Precondition
vxRegisterUserStructWithName should be called for this user struct.

◆ vxRegisterUserStruct()

VX_API_ENTRY vx_enum VX_API_CALL vxRegisterUserStruct ( vx_context context,
vx_size size )

#include <vx_api.h>

Registers user-defined structures to the context.

Parameters
[in]contextThe reference to the implementation context.
[in]sizeThe size of user struct in bytes.
Returns
A vx_enum value that is a type given to the User to refer to their custom structure when declaring a vx_array of that structure.
Return values
VX_TYPE_INVALIDIf the namespace of types has been exhausted.
Note
This call should only be used once within the lifetime of a context for a specific structure.

◆ vxRegisterUserStructWithName()

VX_API_ENTRY vx_enum VX_API_CALL vxRegisterUserStructWithName ( vx_context context,
vx_size size,
const vx_char * type_name )

#include <vx_api.h>

Registers user-defined structures to the context, and associates a name to it.

Parameters
[in]contextThe reference to the implementation context.
[in]sizeThe size of user struct in bytes.
[in]*type_namePointer to the '\0' terminated string that identifies the user struct type. The string is copied by the function so that it stays the property of the caller. NULL means that the user struct is not named. The length of the string shall be lower than VX_MAX_REFERENCE_NAME bytes.
Returns
A vx_enum value that is a type given to the User to refer to their custom structure when declaring a vx_array of that structure.
Return values
VX_TYPE_INVALIDIf the namespace of types has been exhausted.
Note
This call should only be used once within the lifetime of a context for a specific structure.