|
|
1.1 ! root 1: #include "Exception.h" ! 2: #include "SerializerFactory.h" ! 3: ! 4: namespace TrueCrypt ! 5: { ! 6: void Exception::Deserialize (shared_ptr <Stream> stream) ! 7: { ! 8: Serializer sr (stream); ! 9: sr.Deserialize ("Message", Message); ! 10: sr.Deserialize ("Subject", Subject); ! 11: } ! 12: ! 13: void Exception::Serialize (shared_ptr <Stream> stream) const ! 14: { ! 15: Serializable::Serialize (stream); ! 16: Serializer sr (stream); ! 17: sr.Serialize ("Message", Message); ! 18: sr.Serialize ("Subject", Subject); ! 19: } ! 20: ! 21: void ExecutedProcessFailed::Deserialize (shared_ptr <Stream> stream) ! 22: { ! 23: Exception::Deserialize (stream); ! 24: Serializer sr (stream); ! 25: sr.Deserialize ("Command", Command); ! 26: sr.Deserialize ("ExitCode", ExitCode); ! 27: sr.Deserialize ("ErrorOutput", ErrorOutput); ! 28: } ! 29: ! 30: void ExecutedProcessFailed::Serialize (shared_ptr <Stream> stream) const ! 31: { ! 32: Exception::Serialize (stream); ! 33: Serializer sr (stream); ! 34: sr.Serialize ("Command", Command); ! 35: sr.Serialize ("ExitCode", ExitCode); ! 36: sr.Serialize ("ErrorOutput", ErrorOutput); ! 37: } ! 38: ! 39: #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) ! 40: #undef TC_EXCEPTION_NODECL ! 41: #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) ! 42: ! 43: TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (Exception); ! 44: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.