IUF-SDK-3
Interventional Ultrasound Library
iufSourceDict.h File Reference
#include <iufHDF5.h>
#include <iufSource.h>

Go to the source code of this file.

Macros

#define IUFD_INVALID   (iusd_t) NULL
 

Typedefs

typedef IufSourceDictiusd_t
 

Functions

iusd_t iufSourceDictCreate (void)
 Create an empty dictionary. More...
 
int iufSourceDictDelete (iusd_t dict)
 Deletes a source dictionary without deleting all the sources. More...
 
int iufSourceDictDeepDelete (iusd_t dict)
 Deletes a source dictionary and all its sources. More...
 
int iufSourceDictCompare (iusd_t reference, iusd_t actual)
 Compare two dictionaries with each other (order of arguments doesn't matter) More...
 
int iufSourceDictGetSize (iusd_t dict)
 Get the number of sources in the dictionary. More...
 
ius_t iufSourceDictGet (iusd_t dict, char *key)
 Get a sources from the dictionary. More...
 
char ** iufSourceDictGetKeys (iusd_t dict)
 Get the keys currently available in the dict. More...
 
int iufSourceDictSet (iusd_t dict, char *key, ius_t member)
 Add a sources to the dictionary. More...
 

Macro Definition Documentation

◆ IUFD_INVALID

#define IUFD_INVALID   (iusd_t) NULL

Typedef Documentation

◆ iusd_t

A dictionary of sources. See the documentation of IufSource for further details. The dictionary allows managing multiple of them giving each a label. Typically one first creates an empty dictionary (iufSourceDictCreate()) and adds sources using iufSourceDictSet() and retreives them with iufSourceDictGet().

Function Documentation

◆ iufSourceDictCompare()

int iufSourceDictCompare ( iusd_t  reference,
iusd_t  actual 
)

Compare two dictionaries with each other (order of arguments doesn't matter)

Returns
Returns IUF_TRUE when the dictionaries are equal and IUF_FALSE otherwise.
Parameters
referenceThe source dictionary to compare to
actualThe source dictionary to compare with

◆ iufSourceDictCreate()

iusd_t iufSourceDictCreate ( void  )

Create an empty dictionary.

Returns
Returns the created dictionary or NULL in case of an error.

◆ iufSourceDictDeepDelete()

int iufSourceDictDeepDelete ( iusd_t  dict)

Deletes a source dictionary and all its sources.

Returns
Returns IUF_E_OK in case of success and IUF_ERR_VALUE in case of an error.
Parameters
dictThe dictionary of interest

◆ iufSourceDictDelete()

int iufSourceDictDelete ( iusd_t  dict)

Deletes a source dictionary without deleting all the sources.

Returns
Returns IUF_E_OK in case of success and IUF_ERR_VALUE in case of an invalid argument.
Parameters
dictThe dictionary of interest

◆ iufSourceDictGet()

ius_t iufSourceDictGet ( iusd_t  dict,
char *  key 
)

Get a sources from the dictionary.

Returns
returns the source that has label key or IUF_INVALID if it could not be found
Parameters
dictThe dictionary of interest
keyThe label of the source

◆ iufSourceDictGetKeys()

char** iufSourceDictGetKeys ( iusd_t  dict)

Get the keys currently available in the dict.

Returns
array (with size iufTransmitApodizationDictGetSize) of keys.
Parameters
dictThe dictionary of interest

◆ iufSourceDictGetSize()

int iufSourceDictGetSize ( iusd_t  dict)

Get the number of sources in the dictionary.

Returns
returns the number of sources or -1 in case of an error
Parameters
dictThe dictionary of interest

◆ iufSourceDictSet()

int iufSourceDictSet ( iusd_t  dict,
char *  key,
ius_t  member 
)

Add a sources to the dictionary.

Returns
Returns IUF_E_OK in case of success and IUF_ERR_VALUE in case of invalid arguments
Parameters
dictTHe dictionary of interest
keyThe label of the source that is added
memberThe source that is added