Machine Learning Library
Public Member Functions | Protected Attributes | List of all members
CObject< Type > Class Template Reference

Base class for all object. More...

#include <CObject.h>

Inheritance diagram for CObject< Type >:
CClusterAlgorithm< Type > CDataset< Type > CDatasetItem< Type > CDatasetStatistic< Type > CKernel< Type > CLearnRate< Type > CMatrix< Type > CMetric< Type > COptimizer< Type > CProjection< Type > CVector< Type > CVector< T >

Public Member Functions

 CObject ()
 Constructor. More...
 
virtual ~CObject ()
 Destructor. More...
 
virtual bool serialize (fstream &stream, IO_MODE mode=READ)
 Read/write from binary stream. More...
 
virtual bool serialize2 (CArchiv &tArchiv)
 
virtual string className () const
 Returns the class name. More...
 
void setVerbose (VERBOSE_LEVEL tVerbose)
 Set the verbose level. More...
 
VERBOSE_LEVEL verbose (void) const
 Return current verbose level. More...
 
virtual bool isA (const char *acClass) const
 Check if the object is an instance of the class with given name. More...
 
DATATYPE dataType () const
 Returns the template data type. More...
 

Protected Attributes

unsigned char ucVerbose
 

Detailed Description

template<class Type>
class CObject< Type >

Base class for all object.

Constructor & Destructor Documentation

template<class Type>
CObject< Type >::CObject ( )

Constructor.

template<class Type>
virtual CObject< Type >::~CObject ( )
virtual

Destructor.

Member Function Documentation

template<class Type>
virtual string CObject< Type >::className ( ) const
inlinevirtual
template<class Type>
DATATYPE CObject< Type >::dataType ( ) const

Returns the template data type.

Returns
INT/FLOAT/DOUBLE

Referenced by CDatasetItem< Type >::serialize(), and CDatasetItem< Type >::serialize2().

template<class Type>
virtual bool CObject< Type >::isA ( const char *  acClass) const
inlinevirtual
template<class Type>
virtual bool CObject< Type >::serialize ( fstream &  stream,
IO_MODE  mode = READ 
)
virtual

Read/write from binary stream.

The functions handles different data types e.g for reading float objects in a double instance, etc.

Parameters
fstreamReference to binary stream
modeSwitches between reading and writing
Returns
True if successful, false otherwise

Reimplemented in CMatrix< Type >, CDenseVector< Type >, CDenseVector< double >, CDenseVector< T >, CAnovaKernel< Type >, CDatasetItem< Type >, CPolynomialKernel< Type >, CDataset< Type >, CDataset< double >, CDataset< float >, CPlummerKernel< Type >, CVector< Type >, CVector< T >, CClusterAlgorithm< Type >, CLearnRate< Type >, and CKernel< Type >.

Referenced by CDatasetItem< Type >::serialize().

template<class Type>
virtual bool CObject< Type >::serialize2 ( CArchiv tArchiv)
inlinevirtual
template<class Type>
void CObject< Type >::setVerbose ( VERBOSE_LEVEL  tVerbose)
inline

Set the verbose level.

Parameters
tVerboseLevel, OFF=0, STATUS, ERROR, DEBUG;
template<class Type>
VERBOSE_LEVEL CObject< Type >::verbose ( void  ) const
inline

Return current verbose level.

Returns
Verbose Level

Member Data Documentation

template<class Type>
unsigned char CObject< Type >::ucVerbose
protected

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