2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* GameServiceContainer.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX GameServiceContainer definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _XFX_GAMESERVICECONTAINER_
|
|
|
|
|
#define _XFX_GAMESERVICECONTAINER_
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
#include <System/Collections/Generic/Dictionary.h>
|
2010-12-27 01:01:25 +00:00
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
2011-01-16 00:47:37 +00:00
|
|
|
|
using namespace System;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
using namespace System::Collections::Generic;
|
2011-01-16 00:47:37 +00:00
|
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
2011-11-07 01:29:50 +00:00
|
|
|
|
// A collection of game services.
|
2012-09-28 20:36:02 +00:00
|
|
|
|
class GameServiceContainer : public IServiceProvider
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
2012-03-29 22:02:43 +00:00
|
|
|
|
private:
|
2012-09-28 20:36:02 +00:00
|
|
|
|
Dictionary<String, Object*> _services;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
|
public:
|
|
|
|
|
GameServiceContainer();
|
2012-09-28 20:36:02 +00:00
|
|
|
|
virtual ~GameServiceContainer() {}
|
2012-03-29 22:02:43 +00:00
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
void AddService(const String& serviceType, Object* provider);
|
|
|
|
|
Object* GetService(const String& ServiceType);
|
|
|
|
|
void RemoveService(const String& type);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2011-01-16 00:47:37 +00:00
|
|
|
|
#endif //_XFX_GAMESERVICECONTAINER_
|