NLAIC::CIdentTypeAlloc Class Reference

#include <abstract_interface.h>


Detailed Description

CIdentTypeAlloc is an allocator of IBasicInterface from stream class.
Author:
Chafik sameh

Nevrax France

Date:
2000

Definition at line 482 of file abstract_interface.h.

Public Member Functions

const IBasicInterfaceallocClass ()
 Get the object.

 CIdentTypeAlloc ()
 CIdentTypeAlloc (NLMISC::IStream &is)
 Construct object with a stream.

void load (NLMISC::IStream &is)
 Load object from stream.

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 user can serial this object.

virtual ~CIdentTypeAlloc ()

Private Attributes

CIdentType_Id


Constructor & Destructor Documentation

NLAIC::CIdentTypeAlloc::CIdentTypeAlloc NLMISC::IStream is  )  [inline]
 

Construct object with a stream.

Definition at line 489 of file abstract_interface.h.

References load().

00489 :_Id(NULL){load(is);}

NLAIC::CIdentTypeAlloc::CIdentTypeAlloc  )  [inline]
 

Definition at line 490 of file abstract_interface.h.

00490 :_Id(NULL){}

virtual NLAIC::CIdentTypeAlloc::~CIdentTypeAlloc  )  [inline, virtual]
 

Definition at line 502 of file abstract_interface.h.

00503                 {
00504                         if(_Id != NULL) delete _Id;
00505                 }


Member Function Documentation

const IBasicInterface* NLAIC::CIdentTypeAlloc::allocClass  )  [inline]
 

Get the object.

Definition at line 496 of file abstract_interface.h.

References NLAIC::CIdentType::allocClass().

Referenced by NLAIFUZZY::CFuzzyRule::load().

00497                 {
00498                         if(_Id != NULL) return _Id->allocClass();
00499                         else return NULL;
00500                 }               

void NLAIC::CIdentTypeAlloc::load NLMISC::IStream is  ) 
 

Load object from stream.

Definition at line 237 of file ident_type.cpp.

Referenced by CIdentTypeAlloc(), and NLAIC::operator>>().

00238         {
00239                 if(_Id != NULL) 
00240                         delete _Id;
00241 
00242                 /*sint32 i;
00243                 is.serial(i);           
00244                 std::string cn;
00245                 is.serial( cn );
00246                 char *className = new char [strlen(cn.data()) + 1];
00247                 strcpy( className, cn.data() );         
00248 
00249                 CTypeOfOperator op(is);
00250                 CTypeOfObject ty(is);*/
00251                 
00252                 _Id = new CIdentType(is);
00253                 //delete [] className;
00254         }       

void NLAIC::CIdentTypeAlloc::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [virtual]
 

user can serial this object.

Definition at line 257 of file ident_type.cpp.

00258         {
00259                 if(is.isReading()) load(is);
00260                 else
00261                 {
00262                         if(_Id != NULL) 
00263                         {
00264                                 _Id->serial(is);
00265                         }
00266                         else
00267                         {
00268                                 throw NLMISC::EStream();
00269                         }
00270                 }
00271                 
00272         }       


Field Documentation

CIdentType* NLAIC::CIdentTypeAlloc::_Id [private]
 

Definition at line 485 of file abstract_interface.h.


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 10:22:04 2004 for NeL by doxygen 1.3.6