/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 Vec3 {
32
  int a;
33
  int b;
34
  int c;
35
} Vec3;
36
37
/** @brief
38
 * allocates and initialises a Vec3 pointer.
39
 *
40
 * @sa Vec3
41
 */
42
Vec3 * vec3_new (int a, int b, int c);
43
44
/** @} */
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
45
46
/**
47
 * @defgroup Vec3_16 Vec3_16
48
 * @addtogroup Vec3_16
49
 * @{
50
 * @brief
51
 * A Vector of three 16 bit int values.
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
52
 *
53
 * @sa vec3_16_new
54
 * @sa Vec3
55
 */
56
typedef struct Vec3_16 {
57
  int16_t a;
58
  int16_t b;
59
  int16_t c;
60
} Vec3_16;
61
62
/**
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
63
 * @brief
64
 * allocates and initialises a Vec3_16 pointer.
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
65
 * 
66
 * @sa Vec3_16
67
 */
68
Vec3_16 * vec3_16_new (int16_t a, int16_t b, int16_t c);
69
70
/** @} @} */
44 by Gustav Hartvigsson
* Started to structuce the dectumentation a little better.
71
72
END_DECLS
27 by Gustav Hartvigsson
* added skeleton for the SBox type.
73
74
#endif /* __H_VEC__ */
75