Sirikata
libspace/include/sirikata/space/SpaceModule.hpp
Go to the documentation of this file.
00001 // Copyright (c) 2011 Sirikata Authors. All rights reserved.
00002 // Use of this source code is governed by a BSD-style license that can
00003 // be found in the LICENSE file.
00004 
00005 
00006 #ifndef _SIRIKATA_LIBSPACE_SPACE_MODULE_HPP_
00007 #define _SIRIKATA_LIBSPACE_SPACE_MODULE_HPP_
00008 
00009 #include <sirikata/space/Platform.hpp>
00010 #include <sirikata/core/service/Service.hpp>
00011 #include <sirikata/space/SpaceContext.hpp>
00012 #include <sirikata/core/util/Factory.hpp>
00013 
00014 namespace Sirikata {
00015 
00027 class SIRIKATA_SPACE_EXPORT SpaceModule : public Service {
00028   public:
00029     SpaceModule(SpaceContext* ctx)
00030         : mContext(ctx)
00031     {}
00032     virtual ~SpaceModule();
00033 
00034   protected:
00035     SpaceContext* mContext;
00036 }; // class SpaceModuleFactory
00037 
00038 
00039 class SIRIKATA_SPACE_EXPORT SpaceModuleFactory
00040     : public AutoSingleton<SpaceModuleFactory>,
00041       public Factory2<SpaceModule*, SpaceContext*, const String&>
00042 {
00043   public:
00044     static SpaceModuleFactory& getSingleton();
00045     static void destroy();
00046 }; // class SpaceModuleFactory
00047 
00048 
00049 } // namespace Sirikata
00050 
00051 #endif //_SIRIKATA_LIBSPACE_SPACE_MODULE_HPP_