00001
00002 #ifndef __UPF_PRIVATE_H__
00003 #define __UPF_PRIVATE_H__
00004
00005 #include "upf/upf.h"
00006 #ifdef HAVE_CONFIG_H
00007 #include "config.h"
00008 #endif
00009
00010 #if defined(__UPF_UNIX__) && !defined(HAVE_PTHREAD)
00011 #define BOOST_NO_MT
00012 #endif
00013
00014 #include "boost/pool/pool.hpp"
00015 #include "hashes.h"
00016 #include "classinfo.h"
00017 #include "typeinf.h"
00018 #include "manager.h"
00019 #include "upf/ILog.h"
00020 #include "services.h"
00021 #include "logging.h"
00022
00023
00024 namespace upf { namespace impl {
00025
00026 using namespace std;
00027
00028 upf_Object *create_instance(upf_CID classID);
00029 void marchaller_init(upf_Arguments *args);
00030 void marchaller_seek0(upf_Arguments *args);
00031 void marchaller_destroy(upf_Arguments *args);
00032 void marchaller_write(upf_Arguments *args, void *data, size_t len);
00033 void marchaller_read(upf_Arguments *args, void *data, size_t len);
00034 upf_ContextID get_context(const char *context_string);
00035 void init_std_contexts(const char *user_context);
00036 upf_CID alloc_new_cid(void);
00037 upf_CID classname_to_cid(const char *classname);
00038 int merge_typeinfo(const upf_uint8_t *typeinf);
00039
00040 struct PrivateData
00041 {
00042 PrivateData() :
00043 manager(NULL), argsPool(sizeof(upf_ArgumentsChunk)) {}
00044
00045 Manager *manager;
00046 Ptr<IServiceManager> serviceManager;
00047 boost::pool<> argsPool;
00048 StringHash<upf_ContextID> contexts;
00049 TypeInfoRegistry typeInfoReg;
00050 Ptr<ILog> log;
00051 };
00052
00053 extern PrivateData *privateData;
00054
00055
00056 } }
00057
00058 #endif