IUF-SDK-3
Interventional Ultrasound Library
iufHistoryNode.c File Reference
#include <string.h>
#include <iuf.h>
#include <iufInputFilePrivate.h>
#include <iufIqFilePrivate.h>
#include <iufParameterDictPrivate.h>
#include <iufHistoryNodePrivate.h>
#include <iufHistoryNodeListPrivate.h>
#include "iufHistoryNodeADT.h"

Macros

#define MAX_ID_LENGTH   40
 
#define NODE_ID   "ID"
 
#define NODE_TYPE   "Type"
 
#define NODE_NUMBER_OF_PARENTS   "NumParents"
 
#define NODE_NUMBER_OF_PARAMETERS   "NumParameters"
 
#define NODE_PARAMETERS   "NodeParameters"
 

Functions

iuhn_t iufHistoryNodeCreate (char *pNodeType)
 Creates a history node of the type described by the string pNodeType. More...
 
int iufHistoryNodeDelete (iuhn_t historyNode)
 Delete a history node. More...
 
IUF_BOOL iufHistoryNodeCompareWithId (iuhn_t reference, iuhn_t actual)
 Compares two history nodes with each other, including their Id (so a rerun would be different) More...
 
IUF_BOOL iufHistoryNodeCompare (iuhn_t reference, iuhn_t actual)
 Compares two history nodes with each other, except their Ids (so could be a rerun) More...
 
int iufHistoryNodeGetNumParents (iuhn_t historyNode)
 Gets the number of parents that a node has. More...
 
int iufHistoryNodeGetNumParams (iuhn_t historyNode)
 Gets the number of parameters that a node has. More...
 
iupad_t iufHistoryNodeGetParameters (iuhn_t historyNode)
 Gets the parameter dictionary. More...
 
char * iufHistoryNodeGetId (iuhn_t historyNode)
 
char * iufHistoryNodeGetType (iuhn_t historyNode)
 Gets the label of the node. More...
 
iuhnl_t iufHistoryNodeGetParents (iuhn_t historyNode)
 Gets the list of the parent nodes. More...
 
void * iufHistoryNodeGetInstanceData (iuhn_t historyNode)
 
int iufHistoryNodeSetParents (iuhn_t historyNode, iuhnl_t parents)
 Sets the IufHistoryNodeList of a parent nodes. More...
 
int iufHistoryNodeSetParameters (iuhn_t historyNode, iupad_t parameterDict)
 Sets the IufParameterDict of a node. More...
 
int iufHistoryNodeSetInstanceData (iuhn_t historyNode, void *instanceData)
 
void * iufHistoryNodeLoadInstance (iuhn_t historyNode, hid_t handle)
 
iuhn_t iufHistoryNodeLoad (hid_t handle)
 
iuhn_t iufHistoryNodeLoadAnyType (hid_t handle)
 
int iufHistoryNodeSaveInstance (iuhn_t historyNode, hid_t handle)
 
int iufHistoryNodeSave (iuhn_t historyNode, hid_t handle)
 
int iufHistoryNodeSaveAnyType (iuhn_t historyNode, hid_t handle)
 

Macro Definition Documentation

◆ MAX_ID_LENGTH

#define MAX_ID_LENGTH   40

◆ NODE_ID

#define NODE_ID   "ID"

◆ NODE_NUMBER_OF_PARAMETERS

#define NODE_NUMBER_OF_PARAMETERS   "NumParameters"

◆ NODE_NUMBER_OF_PARENTS

#define NODE_NUMBER_OF_PARENTS   "NumParents"

◆ NODE_PARAMETERS

#define NODE_PARAMETERS   "NodeParameters"

◆ NODE_TYPE

#define NODE_TYPE   "Type"

Function Documentation

◆ iufHistoryNodeCompare()

IUF_BOOL iufHistoryNodeCompare ( iuhn_t  reference,
iuhn_t  actual 
)

Compares two history nodes with each other, except their Ids (so could be a rerun)

Returns
Returns IUF_TRUE if the nodes are equal and IUF_FALSE otherwise.
Parameters
referenceThe node to compare to
actualThe node to compare with

◆ iufHistoryNodeCompareWithId()

IUF_BOOL iufHistoryNodeCompareWithId ( iuhn_t  reference,
iuhn_t  actual 
)

Compares two history nodes with each other, including their Id (so a rerun would be different)

Returns
Returns IUF_TRUE if the nodes are equal and IUF_FALSE otherwise.
Parameters
referenceThe node to compare to
actualThe node to compare with

◆ iufHistoryNodeCreate()

iuhn_t iufHistoryNodeCreate ( char *  pNodeType)

Creates a history node of the type described by the string pNodeType.

Returns
It returns the history node when successful or IUHN_INVALID in case the node type was invalid
Parameters
pNodeTypeThe node type description

◆ iufHistoryNodeDelete()

int iufHistoryNodeDelete ( iuhn_t  historyNode)

Delete a history node.

Returns
Returns IUF_E_OK when successful or IUF_ERR_VALUE in case of an error
Parameters
historyNodeThe node to be deleted

◆ iufHistoryNodeGetId()

char* iufHistoryNodeGetId ( iuhn_t  historyNode)

◆ iufHistoryNodeGetInstanceData()

void* iufHistoryNodeGetInstanceData ( iuhn_t  historyNode)

◆ iufHistoryNodeGetNumParams()

int iufHistoryNodeGetNumParams ( iuhn_t  historyNode)

Gets the number of parameters that a node has.

Returns
Returns the number of parameters or -1 in case of in error
Parameters
historyNodeThe node of interest

◆ iufHistoryNodeGetNumParents()

int iufHistoryNodeGetNumParents ( iuhn_t  historyNode)

Gets the number of parents that a node has.

Returns
Returns the number of parents or -1 in case of in error
Parameters
historyNodeThe node of interest

◆ iufHistoryNodeGetParameters()

iupad_t iufHistoryNodeGetParameters ( iuhn_t  historyNode)

Gets the parameter dictionary.

Returns
Returns the IufParameterDict or IUPAD_INVALID in case of an error.
Parameters
historyNodeThe node of interest

◆ iufHistoryNodeGetParents()

iuhnl_t iufHistoryNodeGetParents ( iuhn_t  historyNode)

Gets the list of the parent nodes.

Returns
Returns the IufHistoryNodeList of parents or IUHNL_INVALID in case of an error.
Parameters
historyNodeThe node of interest

◆ iufHistoryNodeGetType()

char* iufHistoryNodeGetType ( iuhn_t  historyNode)

Gets the label of the node.

Returns
Returns the node type string or NULL in case of an invalid argument.
Parameters
historyNodeThe node of interest

◆ iufHistoryNodeLoad()

iuhn_t iufHistoryNodeLoad ( hid_t  handle)

◆ iufHistoryNodeLoadAnyType()

iuhn_t iufHistoryNodeLoadAnyType ( hid_t  handle)

◆ iufHistoryNodeLoadInstance()

void* iufHistoryNodeLoadInstance ( iuhn_t  historyNode,
hid_t  handle 
)

◆ iufHistoryNodeSave()

int iufHistoryNodeSave ( iuhn_t  historyNode,
hid_t  handle 
)

◆ iufHistoryNodeSaveAnyType()

int iufHistoryNodeSaveAnyType ( iuhn_t  historyNode,
hid_t  handle 
)

◆ iufHistoryNodeSaveInstance()

int iufHistoryNodeSaveInstance ( iuhn_t  historyNode,
hid_t  handle 
)

◆ iufHistoryNodeSetInstanceData()

int iufHistoryNodeSetInstanceData ( iuhn_t  historyNode,
void *  instanceData 
)

◆ iufHistoryNodeSetParameters()

int iufHistoryNodeSetParameters ( iuhn_t  historyNode,
iupad_t  parameterDict 
)

Sets the IufParameterDict of a node.

Returns
Returns IUF_E_OK in case of success and IUF_ERR_VALUE otherwise.
Parameters
historyNodeThe node of interest
parameterDictThe IufParameterDict to set

◆ iufHistoryNodeSetParents()

int iufHistoryNodeSetParents ( iuhn_t  historyNode,
iuhnl_t  parents 
)

Sets the IufHistoryNodeList of a parent nodes.

Returns
Returns IUF_E_OK in case of success and IUF_ERR_VALUE otherwise.
Parameters
historyNodeThe node of interest
parentsthe IufHistoryNodeList to set