Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
Type.h
1 /*===-- serialbox-c/Type.h ----------------------------------------------------------*- C++ -*-===*\
2  *
3  * S E R I A L B O X
4  *
5  * This file is distributed under terms of BSD license.
6  * See LICENSE.txt for more information
7  *
8  *===------------------------------------------------------------------------------------------===//
9  *
10  *! \file
11  *! This file contains the type definitions of the C Interface of Serialbox.
12  *
13 \*===------------------------------------------------------------------------------------------===*/
14 
15 #ifndef SERIALBOX_C_TYPE_H
16 #define SERIALBOX_C_TYPE_H
17 
18 #include "serialbox-c/Api.h"
19 #include "serialbox/core/Config.h"
20 #include <stdint.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
34 /*===------------------------------------------------------------------------------------------===*\
35  * Primitive Types
36 \*===------------------------------------------------------------------------------------------===*/
37 
41 SERIALBOX_API typedef int serialboxBoolean_t;
42 
46 SERIALBOX_API typedef int32_t serialboxInt32_t;
47 
51 SERIALBOX_API typedef int64_t serialboxInt64_t;
52 
56 SERIALBOX_API typedef float serialboxFloat32_t;
57 
61 SERIALBOX_API typedef double serialboxFloat64_t;
62 
66 SERIALBOX_API typedef char* serialboxString_t;
67 
68 /*===------------------------------------------------------------------------------------------===*\
69  * Serialbox Types
70 \*===------------------------------------------------------------------------------------------===*/
71 
75 SERIALBOX_API typedef struct {
76  void* impl;
77  int ownsData;
79 
83 SERIALBOX_API typedef struct {
84  void* impl;
85  int ownsData;
87 
91 SERIALBOX_API typedef struct {
92  void* impl;
93  int ownsData;
95 
99 SERIALBOX_API typedef struct {
100  void* impl;
101  int ownsData;
103 
104 /*===------------------------------------------------------------------------------------------===*\
105  * Enumtypes
106 \*===------------------------------------------------------------------------------------------===*/
107 
111 enum serialboxOpenModeKind { Read = 0, Write, Append };
112 
117  Invalid = 0,
118 
119  /* Primitive Types */
120  Boolean,
121  Int32,
122  Int64,
123  Float32,
124  Float64,
125  String,
126 
127  /* Array Types */
128  Array = 0x10,
129  ArrayOfBoolean = Array | Boolean,
130  ArrayOfInt32 = Array | Int32,
131  ArrayOfInt64 = Array | Int64,
132  ArrayOfFloat32 = Array | Float32,
133  ArrayOfFloat64 = Array | Float64,
134  ArrayOfString = Array | String
135 };
136 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif
serialboxOpenModeKind
Policy for opening files in the Serializer and Archive.
Definition: Type.h:111
SERIALBOX_API typedef int serialboxBoolean_t
Boolean type of serialbox.
Definition: Type.h:41
SERIALBOX_API typedef int64_t serialboxInt64_t
64-bit integral type of serialbox
Definition: Type.h:51
SERIALBOX_API typedef int32_t serialboxInt32_t
32-bit integral type of serialbox
Definition: Type.h:46
Refrence to a FieldMetainfoImpl.
Definition: Type.h:99
Refrence to a Metainfo.
Definition: Type.h:91
SERIALBOX_API typedef char * serialboxString_t
String type of serialbox.
Definition: Type.h:66
Refrence to a Serializer.
Definition: Type.h:75
SERIALBOX_API typedef float serialboxFloat32_t
32-bit floating point type of serialbox (float)
Definition: Type.h:56
SERIALBOX_API typedef double serialboxFloat64_t
64-bit floating point type of serialbox (double)
Definition: Type.h:61
Refrence to a Savepoint.
Definition: Type.h:83
serialboxTypeID
Type-id of types recognized by serialbox.
Definition: Type.h:116