summaryrefslogtreecommitdiff
path: root/im/include/im_attrib_flat.h
blob: db6c2d8fedf90f2db7485fc520a44a87501d2c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/** \file
 * \brief Attributes Table Flat API.
 * This will simplify the DLL export, and can be used for C aplications.
 *
 * See Copyright Notice in im_lib.h
 */

#ifndef __IM_ATTRIB_FLAT_H_
#define __IM_ATTRIB_FLAT_H_

#if	defined(__cplusplus)
extern "C" {
#endif

struct imAttribTablePrivate;

/** Definition of the callback used in ForEach function. */
typedef int (*imAttribTableCallback)(void* user_data, int index, const char* name, int data_type, int count, const void* data);

imAttribTablePrivate* imAttribTableCreate(int hash_size);
void imAttribTableDestroy(imAttribTablePrivate* ptable);
int imAttribTableCount(imAttribTablePrivate* ptable);
void imAttribTableRemoveAll(imAttribTablePrivate* ptable);
const void* imAttribTableGet(const imAttribTablePrivate* ptable, const char *name, int *data_type, int *count);
void imAttribTableSet(imAttribTablePrivate* ptable, const char* name, int data_type, int count, const void* data);
void imAttribTableUnSet(imAttribTablePrivate* ptable, const char *name);
void imAttribTableCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src);
void imAttribTableForEach(const imAttribTablePrivate* ptable, void* user_data, imAttribTableCallback attrib_func);

imAttribTablePrivate* imAttribArrayCreate(int hash_size);
const void* imAttribArrayGet(const imAttribTablePrivate* ptable, int index, char *name, int *data_type, int *count);
void imAttribArraySet(imAttribTablePrivate* ptable, int index, const char* name, int data_type, int count, const void* data);
void imAttribArrayCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src);

#if defined(__cplusplus)
}
#endif

#endif