-
Notifications
You must be signed in to change notification settings - Fork 1
/
value_block.h
59 lines (47 loc) · 1.17 KB
/
value_block.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# ifndef __VALUE_BLOCK_H
# define __VALUE_BLOCK_H
# include <stdbool.h>
# include "value.h"
# include "macro_value.h"
# include "linked_list_chunk.h"
/*!
* \file
* \brief \c value used to hold an \c linked_list_chunk.
*
* The \c linked_list_chunk can be accessed and manipulated directly with \link value_block_get_list() \endlink.
* Thus \c value_block is \em mutable.
*
* Copies are distinct (deep copy of the structure) so that acting on one does not modify any copy.
*
* Its output is like:
* \verbatim
{
"Bob"
3
+
\Bob
def
true
} \endverbatim
*
* In input, spaces and newlines are meaningless as long as the order of \c chunk's are preserved and they are separated, as in any \c pf program.
*
* assert is enforced.
*
* \author Jérôme DURAND-LOSE
* \version 1
* \date 2015
* \copyright GNU Public License.
*/
VALUE_DECLARE ( block , linked_list_chunk )
/*!
* Return the \c linked_list_chunk held.
*
* This is not a copy but a direct access.
*
* \param vb chunk to query
* \pre \c vb must be a \c value_block (assert-ed)
* \return the \c linked_list_chunk held
*/
extern linked_list_chunk value_block_get_list ( chunk const vb ) ;
# endif