Yet Another eXchange Tool  0.9.0
Classes | Functions | Variables
xt_handles.c File Reference
#include <assert.h>
#include <stdlib.h>
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt/xt_mpi.h"
#include "xt/xt_handles.h"
Include dependency graph for xt_handles.c:

Go to the source code of this file.

Classes

struct  Xt_handle_set_type_
 

Functions

static void extend_handle_set (Xt_handle_set_type hset)
 
int xt_handle_is_valid (Xt_handle_set_type hset, int ih)
 
void * xt_handle2pointer (Xt_handle_set_type hset, int ih)
 
Xt_handle_set_type xt_handle_set_new (int cap)
 
void xt_handle_set_delete (Xt_handle_set_type hset)
 
int xt_handle_new (Xt_handle_set_type hset, void *p)
 
void xt_handle_delete (Xt_handle_set_type hset, int handle)
 

Variables

static const unsigned default_handle_set_cap = 16
 

Detailed Description

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_handles.c.

Function Documentation

◆ extend_handle_set()

static void extend_handle_set ( Xt_handle_set_type  hset)
static

Definition at line 99 of file xt_handles.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_handle2pointer()

void* xt_handle2pointer ( Xt_handle_set_type  hset,
int  handle 
)

inquires about user pointer connected with handle

Parameters
[in]hsethandle set
[in]handlehandle

Definition at line 77 of file xt_handles.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_handle_delete()

void xt_handle_delete ( Xt_handle_set_type  hset,
int  handle 
)

unregisters handle

Parameters
[in,out]hsethandle set
[in]handlehandle

Definition at line 151 of file xt_handles.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_handle_is_valid()

int xt_handle_is_valid ( Xt_handle_set_type  hset,
int  handle 
)

checks if a given handle is valid within a handle set

Parameters
[in]hsethandle set
[in]handlehandle within handle set

Definition at line 70 of file xt_handles.c.

Here is the caller graph for this function:

◆ xt_handle_new()

int xt_handle_new ( Xt_handle_set_type  hset,
void *  p 
)

registers user pointer with a new handle

Parameters
[in,out]hsethandle set
[in]ppointer to user data
Returns
returns integer handle

Definition at line 130 of file xt_handles.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_handle_set_delete()

void xt_handle_set_delete ( Xt_handle_set_type  hset)

destructor

Parameters
[in,out]hsethandle set

Definition at line 123 of file xt_handles.c.

◆ xt_handle_set_new()

Xt_handle_set_type xt_handle_set_new ( int  cap)

constructor for handle sets

Parameters
[in]capstart capacity (size of handle space)
Returns
returns an empty handle set of capacity cap

Definition at line 82 of file xt_handles.c.

Here is the caller graph for this function:

Variable Documentation

◆ default_handle_set_cap

const unsigned default_handle_set_cap = 16
static

Definition at line 66 of file xt_handles.c.