2013-05-05 18:18:41 +02:00
|
|
|
/********************************************************
|
|
|
|
* GameComponentCollection.h *
|
|
|
|
* *
|
|
|
|
* XFX GameComponentCollection 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_GAMECOMPONENTCOLLECTION_
|
|
|
|
#define _XFX_GAMECOMPONENTCOLLECTION_
|
|
|
|
|
|
|
|
#include "Interfaces.h"
|
|
|
|
#include <System/Event.h>
|
|
|
|
#include <System/Collections/Generic/List.h>
|
|
|
|
#include <GameComponentCollectionEventArgs.h>
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
using namespace System::Collections::Generic;
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
// A collection of game components.
|
|
|
|
class GameComponentCollection : public Object
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
List<IGameComponent*> _components;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void ClearItems();
|
|
|
|
void InsertItem(const int index, IGameComponent * const item);
|
|
|
|
void RemoveItem(const int index);
|
|
|
|
void SetItem(const int index, IGameComponent * const item);
|
|
|
|
|
|
|
|
public:
|
|
|
|
int Count() const;
|
|
|
|
|
|
|
|
GameComponentCollection();
|
|
|
|
virtual ~GameComponentCollection();
|
|
|
|
IGameComponent* operator[](const int index);
|
|
|
|
|
2013-07-11 17:25:49 +02:00
|
|
|
static int GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
Event<Object*, GameComponentCollectionEventArgs*> ComponentAdded;
|
|
|
|
Event<Object*, GameComponentCollectionEventArgs*> ComponentRemoved;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_GAMECOMPONENTCOLLECTION_
|