/home/coin/SVN-release/OS-2.1.0/Bcp/src/Member/BCP_node_change.cpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #include "BCP_node_change.hpp"
00004 #include "BCP_warmstart.hpp"
00005 #include "BCP_buffer.hpp"
00006 #include "BCP_USER.hpp"
00007 
00008 //#############################################################################
00009 
00010 BCP_node_change::BCP_node_change() : 
00011     core_change(), var_change(), cut_change(), warmstart(0) {}
00012 
00013 BCP_node_change::BCP_node_change(BCP_user_pack* packer,
00014                                  const bool def, BCP_buffer& buf) :
00015     core_change(), var_change(), cut_change(), warmstart(0)
00016 {
00017     unpack(packer, def, buf);
00018 }
00019 
00020 BCP_node_change::~BCP_node_change() {
00021     delete warmstart;
00022 }
00023 
00024 //#############################################################################
00025 
00026 void
00027 BCP_node_change::pack(BCP_user_pack* packer, const bool report_default,
00028                       BCP_buffer& buf) const
00029 {
00030     core_change.pack(buf);
00031     var_change.pack(buf);
00032     cut_change.pack(buf);
00033     const bool has_ws = warmstart != NULL;
00034     buf.pack(has_ws);
00035     if (has_ws) {
00036         packer->pack_warmstart(warmstart, buf, report_default);
00037     }
00038 }
00039 
00040 //=============================================================================
00041 
00042 void
00043 BCP_node_change::unpack(BCP_user_pack* packer, const bool report_default,
00044                         BCP_buffer& buf)
00045 {
00046     core_change.unpack(buf);
00047     var_change.unpack(buf);
00048     cut_change.unpack(buf);
00049     bool has_ws;
00050     buf.unpack(has_ws);
00051     if (has_ws) {
00052         warmstart = packer->unpack_warmstart(buf, report_default);
00053     }
00054 }

Generated on Tue Mar 30 03:04:32 2010 by  doxygen 1.4.7