| 7a956470 |
sago007 |
2016-02-14 17:09 |
1 |
/*! \file macros.hpp |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
2 |
\brief Preprocessor macros that can customise the cereal library |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
3 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
4 |
By default, cereal looks for serialization functions with very |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
5 |
specific names, that is: serialize, load, save, load_minimal, |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
6 |
or save_minimal. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
7 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
8 |
This file allows an advanced user to change these names to conform |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
9 |
to some other style or preference. This is implemented using |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
10 |
preprocessor macros. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
11 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
12 |
As a result of this, in internal cereal code you will see macros |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
13 |
used for these function names. In user code, you should name |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
14 |
the functions like you normally would and not use the macros |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
15 |
to improve readability. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
16 |
\ingroup utility */ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
17 |
/* |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
18 |
Copyright (c) 2014, Randolph Voorhies, Shane Grant |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
19 |
All rights reserved. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
20 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
21 |
Redistribution and use in source and binary forms, with or without |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
22 |
modification, are permitted provided that the following conditions are met: |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
23 |
* Redistributions of source code must retain the above copyright |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
24 |
notice, this list of conditions and the following disclaimer. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
25 |
* Redistributions in binary form must reproduce the above copyright |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
26 |
notice, this list of conditions and the following disclaimer in the |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
27 |
documentation and/or other materials provided with the distribution. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
28 |
* Neither the name of cereal nor the |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
29 |
names of its contributors may be used to endorse or promote products |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
30 |
derived from this software without specific prior written permission. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
31 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
32 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
33 |
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
34 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
35 |
DISCLAIMED. IN NO EVENT SHALL RANDOLPH VOORHIES OR SHANE GRANT BE LIABLE FOR ANY |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
36 |
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
37 |
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
38 |
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
39 |
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
40 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
41 |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
42 |
*/ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
43 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
44 |
#ifndef CEREAL_MACROS_HPP_ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
45 |
#define CEREAL_MACROS_HPP_ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
46 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
47 |
#ifndef CEREAL_SERIALIZE_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
48 |
//! The serialization/deserialization function name to search for. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
49 |
/*! You can define @c CEREAL_SERIALIZE_FUNCTION_NAME to be different assuming |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
50 |
you do so before this file is included. */ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
51 |
#define CEREAL_SERIALIZE_FUNCTION_NAME serialize |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
52 |
#endif // CEREAL_SERIALIZE_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
53 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
54 |
#ifndef CEREAL_LOAD_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
55 |
//! The deserialization (load) function name to search for. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
56 |
/*! You can define @c CEREAL_LOAD_FUNCTION_NAME to be different assuming you do so |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
57 |
before this file is included. */ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
58 |
#define CEREAL_LOAD_FUNCTION_NAME load |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
59 |
#endif // CEREAL_LOAD_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
60 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
61 |
#ifndef CEREAL_SAVE_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
62 |
//! The serialization (save) function name to search for. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
63 |
/*! You can define @c CEREAL_SAVE_FUNCTION_NAME to be different assuming you do so |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
64 |
before this file is included. */ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
65 |
#define CEREAL_SAVE_FUNCTION_NAME save |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
66 |
#endif // CEREAL_SAVE_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
67 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
68 |
#ifndef CEREAL_LOAD_MINIMAL_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
69 |
//! The deserialization (load_minimal) function name to search for. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
70 |
/*! You can define @c CEREAL_LOAD_MINIMAL_FUNCTION_NAME to be different assuming you do so |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
71 |
before this file is included. */ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
72 |
#define CEREAL_LOAD_MINIMAL_FUNCTION_NAME load_minimal |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
73 |
#endif // CEREAL_LOAD_MINIMAL_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
74 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
75 |
#ifndef CEREAL_SAVE_MINIMAL_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
76 |
//! The serialization (save_minimal) function name to search for. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
77 |
/*! You can define @c CEREAL_SAVE_MINIMAL_FUNCTION_NAME to be different assuming you do so |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
78 |
before this file is included. */ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
79 |
#define CEREAL_SAVE_MINIMAL_FUNCTION_NAME save_minimal |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
80 |
#endif // CEREAL_SAVE_MINIMAL_FUNCTION_NAME |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
81 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
82 |
#endif // CEREAL_MACROS_HPP_ |
|
|
1970-01-01 00:00 |
83 |
|