2013-05-05 18:18:41 +02:00
|
|
|
/********************************************************
|
|
|
|
* GameServiceContainer.h *
|
|
|
|
* *
|
|
|
|
* XFX GameServiceContainer definition file *
|
2013-06-02 14:32:43 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
2013-05-05 18:18:41 +02:00
|
|
|
********************************************************/
|
|
|
|
#ifndef _XFX_GAMESERVICECONTAINER_
|
|
|
|
#define _XFX_GAMESERVICECONTAINER_
|
|
|
|
|
|
|
|
#include <System/Collections/Generic/Dictionary.h>
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
using namespace System::Collections::Generic;
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
// A collection of game services.
|
|
|
|
class GameServiceContainer : public IServiceProvider
|
|
|
|
{
|
|
|
|
private:
|
2013-08-13 20:04:25 +02:00
|
|
|
Dictionary<Type, Object*> _services;
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
GameServiceContainer();
|
|
|
|
virtual ~GameServiceContainer() {}
|
|
|
|
|
2013-08-13 20:04:25 +02:00
|
|
|
void AddService(const Type& serviceType, Object* provider);
|
|
|
|
Object* GetService(const Type& ServiceType);
|
|
|
|
void RemoveService(const Type& type);
|
2013-05-05 18:18:41 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_GAMESERVICECONTAINER_
|