1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/GameComponentCollection.h
Tom Lint 7e74ae8683 Added System::Type
Added TypeInfo for all relevant types
Added comments
Updated DependencyProperty to work with System::Type
Fixed casing on PropertyMetadata
2013-07-12 21:30:13 +02:00

49 lines
1.3 KiB
C++

/*****************************************************************************
* GameComponentCollection.h *
* *
* XFX GameComponentCollection definition file *
* Copyright (c) XFX Team. All Rights Reserved *
*****************************************************************************/
#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);
static const Type& GetType();
Event<Object * const, GameComponentCollectionEventArgs * const> ComponentAdded;
Event<Object * const, GameComponentCollectionEventArgs * const> ComponentRemoved;
};
}
#endif //_XFX_GAMECOMPONENTCOLLECTION_