Dip
0.92.4
|
The abstract base class of any user-defined class that Alps has to know about in order to encode/decode. More...
#include <AlpsKnowledge.h>
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. More... | |
virtual AlpsReturnStatus | encode (AlpsEncoded *encoded) |
Pack into a encode object. More... | |
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. More... | |
AlpsEncoded * | getEncoded () const |
Get/set encoded. More... | |
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!) More... | |
The abstract base class of any user-defined class that Alps has to know about in order to encode/decode.
These classes must all be registered so that the proper decode method can be called.
Definition at line 51 of file AlpsKnowledge.h.
|
private |
|
inline |
Definition at line 68 of file AlpsKnowledge.h.
|
inlinevirtual |
Definition at line 69 of file AlpsKnowledge.h.
|
private |
|
inline |
Definition at line 71 of file AlpsKnowledge.h.
References type_.
|
inline |
Definition at line 72 of file AlpsKnowledge.h.
References type_.
Referenced by AlpsModel::AlpsModel(), AlpsSolution::AlpsSolution(), and AlpsTreeNode::AlpsTreeNode().
|
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, AbcModel, AlpsSubTree, AbcTreeNode, AbcTreeNode, KnapTreeNode, KnapModel, AbcSolution, AbcSolution, and KnapSolution.
|
inlinevirtual |
Pack into a encode object.
Definition at line 83 of file AlpsKnowledge.h.
References AlpsReturnStatusOk.
|
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 AlpsSubTree, AbcTreeNode, AbcTreeNode, KnapTreeNode, AbcSolution, AbcSolution, and KnapSolution.
|
inline |
|
inline |
Definition at line 99 of file AlpsKnowledge.h.
References 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().
|
protected |
Definition at line 64 of file AlpsKnowledge.h.