]> Dogcows Code - chaz/yoink/blob - src/stlplus/persistence/persistent_bool.cpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / persistence / persistent_bool.cpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "persistent_bool.hpp"
10
11 ////////////////////////////////////////////////////////////////////////////////
12
13 // bool is dumped and restored as an unsigned char
14 void stlplus::dump_bool(stlplus::dump_context& context, const bool& data) throw(stlplus::persistent_dump_failed)
15 {
16 context.put((unsigned char)data);
17 }
18
19 void stlplus::restore_bool(restore_context& context, bool& data) throw(stlplus::persistent_restore_failed)
20 {
21 data = context.get() != 0;
22 }
23
24 ////////////////////////////////////////////////////////////////////////////////
This page took 0.039218 seconds and 4 git commands to generate.