00001 #ifndef OCCURRENCE_IMPLEMENTATION_FILE 00002 #define OCCURRENCE_IMPLEMENTATION_FILE 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : occurrence * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 1990-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "occurrence.h" 00019 00020 void occurrence::pack(byte_array &packed_form) const 00021 { 00022 _out.pack(packed_form); 00023 _when.pack(packed_form); 00024 _operation.pack(packed_form); 00025 _location.pack(packed_form); 00026 } 00027 00028 bool occurrence::unpack(byte_array &packed_form) 00029 { 00030 if (!_out.unpack(packed_form)) return false; 00031 if (!_when.unpack(packed_form)) return false; 00032 if (!_operation.unpack(packed_form)) return false; 00033 if (!_location.unpack(packed_form)) return false; 00034 return true; 00035 } 00036 00037 00038 #endif //OCCURRENCE_IMPLEMENTATION_FILE 00039
1.5.1