OS_packer.hpp
Go to the documentation of this file.
1 /* $Id: OS_packer.hpp 2698 2009-06-09 04:14:07Z kmartin $ */
2 // Last edit: 5/20/07
3 //
4 // Name: OS_packer.hpp
5 // Author: Francois Margot
6 // Tepper School of Business
7 // Carnegie Mellon University, Pittsburgh, PA 15213
8 // email: fmargot@andrew.cmu.edu
9 // Date: 5/18/07
10 //-----------------------------------------------------------------------------
11 // Copyright (C) 2007, Francois Margot, IBM and others. All Rights Reserved.
12 
13 #ifndef _OS_PACKER_H
14 #define _OS_PACKER_H
15 
16 #include "BCP_USER.hpp"
17 
18 class BCP_buffer;
19 class OS_user_data;
20 
23 class OS_packer : public BCP_user_pack {
24 public:
25 
26  //-------------------------------------------------------------------------
28  /*
29  virtual void
30  pack_warmstart(const BCP_warmstart* ws, BCP_buffer& buf,
31  bool report_if_default = false)
32  {
33  if (report_if_default) {
34  printf("BCP_user_pack : default pack_warmstart() executed.\n");
35  }
36  BCP_pack_warmstart(ws, buf);
37  }
38  */
40  /*
41  virtual BCP_warmstart*
42  unpack_warmstart(BCP_buffer& buf,
43  bool report_if_default = false)
44  {
45  if (report_if_default) {
46  printf("BCP_user_pack : default unpack_warmstart() executed.\n");
47  }
48  return BCP_unpack_warmstart(buf);
49  }
50  */
51 
52  //-------------------------------------------------------------------------
56  virtual void pack_var_algo(const BCP_var_algo* var, BCP_buffer& buf);
57 
59 
60  //-------------------------------------------------------------------------
62  virtual void pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf);
63 
66 
67  //-------------------------------------------------------------------------
69  virtual void pack_user_data(const BCP_user_data* ud, BCP_buffer& buf);
70 
73 };
74 
75 
76 #endif
77 
78 
virtual BCP_cut_algo * unpack_cut_algo(BCP_buffer &buf)
Unpack an algorithmic cut.
Definition: OS_packer.cpp:39
This is the class from which the user should derive her own algorithmic cuts.
Definition: BCP_cut.hpp:242
virtual void pack_cut_algo(const BCP_cut_algo *cut, BCP_buffer &buf)
Pack an algorithmic cut.
Definition: OS_packer.cpp:23
virtual void pack_var_algo(const BCP_var_algo *var, BCP_buffer &buf)
Pack warmstarting information.
Definition: OS_packer.cpp:61
Class taking care of packing/unpacking.
Definition: OS_packer.hpp:23
virtual BCP_user_data * unpack_user_data(BCP_buffer &buf)
Unpack an user data.
Definition: OS_packer.cpp:103
virtual BCP_var_algo * unpack_var_algo(BCP_buffer &buf)
Unpack an algorithmic variable.
Definition: OS_packer.cpp:75
virtual void pack_user_data(const BCP_user_data *ud, BCP_buffer &buf)
Pack an user data.
Definition: OS_packer.cpp:89
This is the class from which the user should derive her own algorithmic variables.
Definition: BCP_var.hpp:277
This class describes the message buffer used for all processes of BCP.
Definition: BCP_buffer.hpp:39