IUF-SDK-3
Interventional Ultrasound Library
iufPulseDict.c File Reference
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <hashmap.h>
#include <iuf.h>
#include <iufPulsePrivate.h>
#include <iufParametricPulsePrivate.h>
#include <iufNonParametricPulsePrivate.h>

Data Structures

struct  HashablePulse
 
struct  IufPulseDict
 

Macros

#define MAX_NAME   1024
 

Functions

iupd_t iufPulseDictCreate ()
 Create an empty dictionary of IufPulse objects. More...
 
int iufPulseDictDeepDelete (iupd_t dict)
 Deletes the dictionary and all its IufPulse objects. More...
 
int iufPulseDictDelete (iupd_t dict)
 Delete a dictionary without deleting its IufPulse objects. More...
 
int iufPulseDictCompare (iupd_t reference, iupd_t actual)
 Check if two pulse dictionaries are equal. More...
 
size_t iufPulseDictGetSize (iupd_t dict)
 Get the number of IufPulse objects in the dictionary. More...
 
iup_t iufPulseDictGet (iupd_t dict, char *key)
 Get the IufPulse from the dictionary that has label key. More...
 
char ** iufPulseDictGetKeys (iupd_t dict)
 Get the keys currently available in the dict. More...
 
int iufPulseDictSet (iupd_t dict, char *key, iup_t member)
 Add the IufPulse to the dictionary with label key. More...
 
int iufPulseDictSave (iupd_t dict, hid_t handle)
 
iupd_t iufPulseDictLoad (hid_t handle)
 

Data Structure Documentation

◆ HashablePulse

struct HashablePulse
Data Fields
char key[256]
iup_t pulse

◆ IufPulseDict

struct IufPulseDict
Data Fields
IUF_BOOL deepDelete
char ** keys
struct hashmap map

Macro Definition Documentation

◆ MAX_NAME

#define MAX_NAME   1024

Function Documentation

◆ iufPulseDictCompare()

int iufPulseDictCompare ( iupd_t  reference,
iupd_t  actual 
)

Check if two pulse dictionaries are equal.

Returns
Return IUF_TRUE when the two disctionaries are equal and IUF_FALSE otherwise.
Parameters
referenceThe pulse dictionary to compare to
actualThe pulse dictionary to compare with

◆ iufPulseDictCreate()

iupd_t iufPulseDictCreate ( void  )

Create an empty dictionary of IufPulse objects.

Returns
Returns the created object or IUPD_INVALID in case of an error.

◆ iufPulseDictDeepDelete()

int iufPulseDictDeepDelete ( iupd_t  dict)

Deletes the dictionary and all its IufPulse objects.

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

◆ iufPulseDictDelete()

int iufPulseDictDelete ( iupd_t  dict)

Delete a dictionary without deleting its IufPulse objects.

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

◆ iufPulseDictGet()

iup_t iufPulseDictGet ( iupd_t  list,
char *  key 
)

Get the IufPulse from the dictionary that has label key.

Returns
Returns the requested IufPulse or IUPD_INVALID if it was not found.

◆ iufPulseDictGetKeys()

char** iufPulseDictGetKeys ( iupd_t  dict)

Get the keys currently available in the dict.

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

◆ iufPulseDictGetSize()

size_t iufPulseDictGetSize ( iupd_t  dict)

Get the number of IufPulse objects in the dictionary.

Returns
Returns the number of IufPulse objects or -1 in case of an error.
Parameters
dictThe pulse dictionary of interest

◆ iufPulseDictLoad()

iupd_t iufPulseDictLoad ( hid_t  handle)

◆ iufPulseDictSave()

int iufPulseDictSave ( iupd_t  dict,
hid_t  handle 
)

◆ iufPulseDictSet()

int iufPulseDictSet ( iupd_t  dict,
char *  key,
iup_t  member 
)

Add the IufPulse to the dictionary with label key.

Returns
Returns IUF_E_OK in case of success and IUF_ERR_VALUE in case of an error.
Parameters
dictThe pulse dictionary of interest
keyThe label of the IufPulse
memberThe IufPulse