#include <AlpsKnowledge.h>
Inheritance diagram for AlpsKnowledge:
Public Member Functions | |
AlpsKnowledge () | |
virtual | ~AlpsKnowledge () |
KnowledgeType | getType () |
void | setType (KnowledgeType t) |
virtual AlpsEncoded * | encode () const |
This method should encode the content of the object and return a pointer to the encoded form. | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) |
Pack into a encode object. | |
virtual AlpsKnowledge * | decode (AlpsEncoded &encoded) const |
This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. | |
AlpsEncoded * | getEncoded () const |
Get/set encoded. | |
void | setEncoded (AlpsEncoded *e) |
Protected Attributes | |
KnowledgeType | type_ |
Private Member Functions | |
AlpsKnowledge (const AlpsKnowledge &) | |
AlpsKnowledge & | operator= (const AlpsKnowledge &) |
Private Attributes | |
AlpsEncoded * | encoded_ |
The encoded object in an encoded form (could be compressed!). |
These classes must all be registered so that the proper decode method can be called.
Definition at line 51 of file AlpsKnowledge.h.
AlpsKnowledge::AlpsKnowledge | ( | const AlpsKnowledge & | ) | [private] |
AlpsKnowledge::AlpsKnowledge | ( | ) | [inline] |
Definition at line 68 of file AlpsKnowledge.h.
virtual AlpsKnowledge::~AlpsKnowledge | ( | ) | [inline, virtual] |
Definition at line 69 of file AlpsKnowledge.h.
AlpsKnowledge& AlpsKnowledge::operator= | ( | const AlpsKnowledge & | ) | [private] |
KnowledgeType AlpsKnowledge::getType | ( | ) | [inline] |
void AlpsKnowledge::setType | ( | KnowledgeType | t | ) | [inline] |
Definition at line 72 of file AlpsKnowledge.h.
References type_.
Referenced by AlpsModel::AlpsModel(), AlpsSolution::AlpsSolution(), AlpsTreeNode::AlpsTreeNode(), BcpsConstraint::BcpsConstraint(), and BcpsVariable::BcpsVariable().
virtual AlpsEncoded* AlpsKnowledge::encode | ( | ) | const [virtual] |
This method should encode the content of the object and return a pointer to the encoded form.
NOTE: This default implementation can not be used when the memory of data members is not continously allocated, for example, some data members are pointers, STL set, map, etc.
Reimplemented in AbcModel, AbcSolution, AbcTreeNode, KnapModel, KnapSolution, KnapTreeNode, AlpsSubTree, BlisModel, BlisSolution, BlisTreeNode, VrpModel, VrpSolution, BlisModel, BlisPseudocost, BlisSolution, and BlisTreeNode.
virtual AlpsReturnStatus AlpsKnowledge::encode | ( | AlpsEncoded * | encoded | ) | [inline, virtual] |
Pack into a encode object.
Reimplemented in BlisConstraint, BlisVariable, BcpsObject, VrpVariable, BlisConstraint, and BlisVariable.
Definition at line 83 of file AlpsKnowledge.h.
References AlpsReturnStatusOk.
virtual AlpsKnowledge* AlpsKnowledge::decode | ( | AlpsEncoded & | encoded | ) | const [virtual] |
This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked.
NOTE: This default implementation can not be used when the memory of data members is not continously allocated, for example, some data members are pointers, STL set, map, etc.
Reimplemented in AbcSolution, AbcTreeNode, KnapSolution, KnapTreeNode, AlpsSubTree, BlisConstraint, BlisSolution, BlisTreeNode, BlisVariable, BcpsObject, VrpSolution, VrpVariable, BlisConstraint, BlisPseudocost, BlisSolution, BlisTreeNode, and BlisVariable.
AlpsEncoded* AlpsKnowledge::getEncoded | ( | ) | const [inline] |
void AlpsKnowledge::setEncoded | ( | AlpsEncoded * | e | ) | [inline] |
AlpsEncoded* AlpsKnowledge::encoded_ [private] |
The encoded object in an encoded form (could be compressed!).
Definition at line 60 of file AlpsKnowledge.h.
Referenced by getEncoded(), and setEncoded().
KnowledgeType AlpsKnowledge::type_ [protected] |