- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# AlpsKnowledge Class Reference

The abstract base class of any user-defined class that Alps has to know about in order to encode/decode. More...

`#include <AlpsKnowledge.h>`

Inheritance diagram for AlpsKnowledge:

[legend]
Collaboration diagram for AlpsKnowledge:

[legend]
List of all members.

## 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!).

## Detailed Description

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.

## Constructor & Destructor Documentation

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.

## Member Function Documentation

AlpsKnowledge& AlpsKnowledge::operator= | ( | const AlpsKnowledge & |  | ) | `[private]`

KnowledgeType AlpsKnowledge::getType | ( |  | ) | `[inline]`

Definition at line 71 of file AlpsKnowledge.h.

References type_.

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]`

Get/set encoded.

Definition at line 98 of file AlpsKnowledge.h.

References encoded_.

void AlpsKnowledge::setEncoded | ( | AlpsEncoded * | e | ) | `[inline]`

Definition at line 99 of file AlpsKnowledge.h.

References encoded_.

## Member Data Documentation

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]`

Definition at line 64 of file AlpsKnowledge.h.

Referenced by getType(), and setType().

The documentation for this class was generated from the following file:

- /home/coin/SVN-release/Blis-0.91.2/Alps/src/AlpsKnowledge.h