objectCreator.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: objectCreator.h,v 1.1.4.1 2007/03/25 21:23:39 oliver Exp $
00005 //
00006 
00007 #ifndef BALL_CONCEPT_OBJECTCREATOR_H
00008 #define BALL_CONCEPT_OBJECTCREATOR_H
00009 
00010 #ifndef BALL_CONCEPT_COMPOSITE_H
00011 # include <BALL/CONCEPT/composite.h>
00012 #endif
00013 
00014 #ifndef BALL_CONCEPT_PERSISTENTOBJECT_H       
00015 # include <BALL/CONCEPT/persistentObject.h>
00016 #endif
00017 
00018 #ifndef BALL_CONCET_TEXTPERSISTENCEMANAGER_H
00019 # include <BALL/CONCEPT/textPersistenceManager.h>
00020 #endif
00021 
00022 #ifdef BALL_HAS_ASIO
00023 #ifndef BALL_SYSTEM_NETWORKING_H
00024 # include <BALL/SYSTEM/networking.h>
00025 #endif
00026 #endif
00027 
00028 #include <vector>
00029 
00030 namespace BALL
00031 {
00039   class BALL_EXPORT ObjectCreator
00040   {
00041     public:
00042 
00046 
00054     ObjectCreator()
00055       ;
00056 
00058 
00061 
00064     virtual ~ObjectCreator()
00065       ;
00066 
00070     virtual void clear()
00071       ;
00072 
00074 
00077 
00086     virtual void initPersistenceManager(TextPersistenceManager &pm)
00087       ;
00088 
00097     virtual Composite *convertObject(PersistentObject &po)
00098       ;
00099             
00101 
00104 
00105 #ifdef BALL_HAS_ASIO
00106 
00118     Composite *operator() (TCPIOStream &tcp_iostream)
00119       ;
00120 #endif
00121 
00123 
00124     private:
00125     
00126     bool init_;
00127     TextPersistenceManager pm_;
00128   };
00129   
00130 }// namespace BALL
00131 
00132 #endif // BALL_CONCEPT_OBJECTCREATOR_H