|
|
1.1.1.2 root 1: /*
2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved.
3:
1.1.1.4 ! root 4: Governed by the TrueCrypt License 2.7 the full text of which is contained
1.1.1.2 root 5: in the file License.txt included in TrueCrypt binary and source code
6: distribution packages.
7: */
8:
1.1 root 9: #include "Exception.h"
10: #include "SerializerFactory.h"
11:
12: namespace TrueCrypt
13: {
14: void Exception::Deserialize (shared_ptr <Stream> stream)
15: {
16: Serializer sr (stream);
17: sr.Deserialize ("Message", Message);
18: sr.Deserialize ("Subject", Subject);
19: }
20:
21: void Exception::Serialize (shared_ptr <Stream> stream) const
22: {
23: Serializable::Serialize (stream);
24: Serializer sr (stream);
25: sr.Serialize ("Message", Message);
26: sr.Serialize ("Subject", Subject);
27: }
28:
29: void ExecutedProcessFailed::Deserialize (shared_ptr <Stream> stream)
30: {
31: Exception::Deserialize (stream);
32: Serializer sr (stream);
33: sr.Deserialize ("Command", Command);
34: sr.Deserialize ("ExitCode", ExitCode);
35: sr.Deserialize ("ErrorOutput", ErrorOutput);
36: }
37:
38: void ExecutedProcessFailed::Serialize (shared_ptr <Stream> stream) const
39: {
40: Exception::Serialize (stream);
41: Serializer sr (stream);
42: sr.Serialize ("Command", Command);
43: sr.Serialize ("ExitCode", ExitCode);
44: sr.Serialize ("ErrorOutput", ErrorOutput);
45: }
46:
47: #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
48: #undef TC_EXCEPTION_NODECL
49: #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE)
50:
51: TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (Exception);
52: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.