/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
1
#ifndef __H_VEC__
2
#define __H_VEC__
3
4
#include <stdlib.h>
30 by Gustav Hartvigsson
* Made the code compile using CMake.
5
#include <stdint.h>
6
#include "defs.h"
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
7
8
/** @file
9
 * @defgroup Vectors Vectors
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
10
 * @addtogroup Vectors
11
 * @{
12
 * Vectors are multi value structures that can be used when doing some types of
13
 * maths.
14
 */
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
15
16
BEGIN_DECLS
17
18
/**
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
19
 * @defgroup Vec3 Vec3
20
 * @addtogroup Vec3
21
 * @{
22
 * @brief
23
 * A Vector of three standard int values.
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
24
 *
25
 * A Vec3 is considerer a primitive type and as such has no ref/unref memory
26
 * management and no vec_free function. You will have to do that yourself.
27
 *
28
 * @sa vec3_new
29
 * @sa Vec3_16
30
 */
31
typedef struct
61 by Gustav Hartvigsson
* Made the code more easy to read.
32
Vec3 {
33
  int a;
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
34
  int b;
35
  int c;
36
} Vec3;
37
38
/** @brief
39
 * allocates and initialises a Vec3 pointer.
40
 *
41
 * @sa Vec3
42
 */
43
Vec3 *
61 by Gustav Hartvigsson
* Made the code more easy to read.
44
vec3_new (int a, int b, int c);
45
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
46
/** @} */
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
47
48
/**
49
 * @defgroup Vec3_16 Vec3_16
50
 * @addtogroup Vec3_16
51
 * @{
52
 * @brief
53
 * A Vector of three 16 bit int values.
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
54
 *
55
 * @sa vec3_16_new
56
 * @sa Vec3
57
 */
58
typedef struct
61 by Gustav Hartvigsson
* Made the code more easy to read.
59
Vec3_16 {
60
  int16_t a;
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
61
  int16_t b;
62
  int16_t c;
63
} Vec3_16;
64
65
/**
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
66
 * @brief
67
 * allocates and initialises a Vec3_16 pointer.
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
68
 * 
69
 * @sa Vec3_16
70
 */
71
Vec3_16 *
61 by Gustav Hartvigsson
* Made the code more easy to read.
72
vec3_16_new (int16_t a, int16_t b, int16_t c);
73
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
74
/** @} @} */
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
75
76
END_DECLS
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
77
78
#endif /* __H_VEC__ */
79