Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

FD::Object Class Reference

#include <Object.h>

Inheritance diagram for FD::Object:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Object ()
virtual ~Object ()
void ref ()
void unref ()
int unique ()
virtual void destroy ()
virtual void serialize (std::ostream &out) const
virtual void unserialize (std::istream &in)
virtual void doesNotUnderstand (std::string method)
virtual void printOn (std::ostream &out=std::cout) const =0
virtual bool isNil () const
virtual void prettyPrint (std::ostream &out=std::cout) const
virtual void readFrom (std::istream &in=std::cin)
virtual ObjectRef clone ()
virtual std::string className () const

Static Public Member Functions

static ObjectRef newObject (const std::string &objType)
template<class T>
static int addObjectType (const std::string &objType, _ObjectFactory *factory)
static std::map< std::string,
_ObjectFactory * > & 
ObjectFactoryDictionary ()
static TypeMap< _ObjectFactory * > & TypeidDictionary ()

Protected Attributes

AtomicCounter ref_count

Friends

std::ostream & operator<< (std::ostream &out, const Object &obj)

Detailed Description

Our Object base class. Everything in the network must have Object as base class.
Author:
Dominic Letourneau & Jean-Marc Valin


Constructor & Destructor Documentation

FD::Object::Object  )  [inline]
 

default constructor

virtual FD::Object::~Object  )  [inline, virtual]
 

destructor


Member Function Documentation

template<class T>
static int FD::Object::addObjectType const std::string &  objType,
_ObjectFactory *  factory
[inline, static]
 

Registers the object name

virtual std::string FD::Object::className  )  const [virtual]
 

Returns the name of the class of the Object

virtual ObjectRef FD::Object::clone  )  [inline, virtual]
 

Makes a (deep) copy of the object

Reimplemented in FD::Complex< T >, FD::BaseVector, FD::Vector< T >, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, and FD::Vector< ObjectRef >.

virtual void FD::Object::destroy  )  [inline, virtual]
 

Causes the object to be destroyed, it might be redefined for an object pool

Reimplemented in FD::Complex< T >, FD::NetCType< T >, FD::Vector< T >, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, FD::Vector< ObjectRef >, and FD::Vector< T >.

virtual void FD::Object::doesNotUnderstand std::string  method  )  [virtual]
 

How to handle an ununderstood method (VMethod)

virtual bool FD::Object::isNil  )  const [inline, virtual]
 

Is it a nil Object

static ObjectRef FD::Object::newObject const std::string &  objType  )  [static]
 

Creates an instance of an object by class name

virtual void FD::Object::prettyPrint std::ostream &  out = std::cout  )  const [inline, virtual]
 

Prints an object in a more "user-friendly" format

Reimplemented in FD::Complex< T >, FD::PrintableGenericType< T >, FD::String, FD::Vector< T >, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, and FD::Vector< ObjectRef >.

virtual void FD::Object::printOn std::ostream &  out = std::cout  )  const [pure virtual]
 

Generic print function

Implemented in FD::Buffer, FD::Complex< T >, FD::CompositeType, FD::GenericType< T >, FD::PrintableGenericType< T >, FD::String, FD::Node, FD::IStream, FD::OStream, FD::IOStream, FD::UIDocument, FD::Vector< T >, FD::AudioInfo, FD::Covariance, FD::DiagonalCovariance, FD::DiagGMM, FD::Gaussian, FD::GMM, FD::FFLayer, FD::FFNet, FD::MSVQ, FD::VQ, FD::GenericType< FILE * >, FD::GenericType< int >, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, FD::Vector< ObjectRef >, and FD::Vector< T >.

virtual void FD::Object::readFrom std::istream &  in = std::cin  )  [inline, virtual]
 

Generic read function

Reimplemented in FD::Complex< T >, FD::CompositeType, FD::PrintableGenericType< T >, FD::String, FD::Vector< T >, FD::AudioInfo, FD::DiagonalCovariance, FD::DiagGMM, FD::Gaussian, FD::GMM, FD::FFLayer, FD::FFNet, FD::MSVQ, FD::VQ, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, and FD::Vector< ObjectRef >.

void FD::Object::ref  )  [inline]
 

Notify the object we're adding a reference

virtual void FD::Object::serialize std::ostream &  out  )  const [virtual]
 

Serialize (binary) the object to a stream

Reimplemented in FD::Complex< T >, FD::PrintableGenericType< T >, FD::String, FD::Vector< T >, FD::DiagGMM, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, and FD::Vector< ObjectRef >.

int FD::Object::unique  )  [inline]
 

Returns the number of references

void FD::Object::unref  )  [inline]
 

Notify the object we're removing a reference (might destroy the object)

virtual void FD::Object::unserialize std::istream &  in  )  [virtual]
 

Unserialize (binary) the object from a stream

Reimplemented in FD::Complex< T >, FD::PrintableGenericType< T >, FD::String, FD::Vector< T >, FD::DiagGMM, FD::Vector< RCPtr< Covariance > >, FD::Vector< double >, FD::Vector< RCPtr< GMM > >, FD::Vector< float >, FD::Vector< int >, FD::Vector< Vector< float > >, FD::Vector< RCPtr< FFLayer > >, FD::Vector< RCPtr< Mean > >, FD::Vector< RCPtr< Gaussian > >, and FD::Vector< ObjectRef >.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  out,
const Object obj
[friend]
 

Prints the object to a stream


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 14:29:46 2005 for FlowDesigner by  doxygen 1.4.4