#include <object.h>
Inheritance diagram for Object:
Public Types | |
typedef std::string | id_t |
Public Member Functions | |
virtual | ~Object () |
virtual const id_t & | id () const =0 |
virtual Object * | create () const =0 |
Create a new object using the default constructor. | |
virtual Object * | clone () const =0 |
Create a new object by replicating itself. | |
Static Public Member Functions | |
static Object * | create (std::istream &) |
Create a new object from an input stream. | |
Protected Types | |
typedef UINT | ver_t |
typedef std::vector< ver_t > | ver_list |
Protected Member Functions | |
virtual bool | serialize (std::ostream &, ver_list &) const |
Serialize the object to an output stream. | |
virtual bool | unserialize (std::istream &, ver_list &, const id_t &=NIL_ID) |
Unserialize from an input stream. | |
Static Protected Attributes | |
static const id_t | NIL_ID |
Friends | |
std::istream & | operator>> (std::istream &, Object &) |
std::ostream & | operator<< (std::ostream &, const Object &) |
Object class collects some very common and useful features. It has a static string for identification and several funtional interfaces.
Definition at line 62 of file object.h.
|
|
|
|
|
|
|
|
|
Create a new object by replicating itself.
return new Derived(*this);
Implemented in AdaBoost, AdaBoost_ECOC, AdaBoost_ERP, Aggregating, Bagging, Boosting, Cascade, CGBoost, CrossVal, vFoldCrossVal, HoldoutCrossVal, FeedForwardNN, Kernel, Linear, Polynomial, Stump, Perceptron, RBF, Sigmoid, LearnModel, LPBoost, MgnBoost, MultiClass_ECOC, NNLayer, Ordinal_BLE, Perceptron, Pulse, Stump, and SVM. |
|
Create a new object from an input stream.
Definition at line 117 of file object.cpp. References unserialize(). |
|
Create a new object using the default constructor. The code for a derived class Derived is always return new Derived(); Implemented in AdaBoost, AdaBoost_ECOC, AdaBoost_ERP, Aggregating, Bagging, Boosting, Cascade, CGBoost, CrossVal, vFoldCrossVal, HoldoutCrossVal, FeedForwardNN, Kernel, Linear, Polynomial, Stump, Perceptron, RBF, Sigmoid, LearnModel, LPBoost, MgnBoost, MultiClass_ECOC, NNLayer, Ordinal_BLE, Perceptron, Pulse, Stump, and SVM. Referenced by SVM::unserialize(), FeedForwardNN::unserialize(), CrossVal::unserialize(), and Aggregating::unserialize(). |
|
Implemented in AdaBoost, AdaBoost_ECOC, AdaBoost_ERP, Bagging, Boosting, CGBoost, vFoldCrossVal, HoldoutCrossVal, FeedForwardNN, Linear, Polynomial, Stump, Perceptron, RBF, Sigmoid, LPBoost, MgnBoost, MultiClass_ECOC, NNLayer, Ordinal_BLE, Perceptron, Pulse, Stump, and SVM. Referenced by Perceptron::Perceptron(), and serialize(). |
|
Serialize the object to an output stream.
Definition at line 61 of file object.cpp. References id(). Referenced by operator<<(). |
|
Unserialize from an input stream.
A class which previously did not have its own serialize() or unserialize(), usually because it had nothing to store, can have its own serialize() and unserialize() later on, as long as it takes care of the 0 version number case in unserialize(). Definition at line 121 of file object.h. Referenced by create(), and operator>>(). |
|
|
|
Definition at line 137 of file object.cpp. |
|