1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/Interfaces.h
Halofreak1990 e7a47c8ed9 Revamped the List class so that it can (properly) handle pointers as well
Added 'ValueTypes' Single and Double
Added some components in the new System::Net namespace
Added the Console class, which can be used to output text to the screen
Updated a bunch of structs to include the IComparable and IEquatable interfaces, and inheritance from Object to allow better interoperability between container classes and other types
Replaced all exception handling code with a report to stdout.txt - this will, I hope, eventually be reversed, but as of yet, there is no support for exceptions.

BEWARE! Even though all libraries correctly compile, you cannot use any class/structure that inherits from a template class, because stupid G++ wants to include exception handling for each template.
2011-11-07 01:29:50 +00:00

70 lines
1.6 KiB
C++

/********************************************************
* Interfaces.h *
* *
* XFX interfaces definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _XFX_INTERFACES_
#define _XFX_INTERFACES_
#include <System/Types.h>
#include <System/Delegates.h>
using namespace System;
namespace XFX
{
class GameTime;
// Defines the interface for a drawable game component.
interface IDrawable
{
public:
virtual int DrawOrder()=0;
virtual bool Visible()=0;
virtual void Draw(GameTime gameTime)=0;
virtual ~IDrawable() {}
EventHandler DrawOrderChanged;
EventHandler VisibleChanged;
};
// Defines an interface for game components.
interface IGameComponent
{
public:
virtual void Initialize()=0;
virtual ~IGameComponent() {}
};
// Defines the interface for an object that manages a Graphics.GraphicsDevice.
interface IGraphicsDeviceManager
{
public:
virtual bool BeginDraw()=0;
virtual void CreateDevice()=0;
virtual void EndDraw()=0;
virtual ~IGraphicsDeviceManager() {}
};
// Defines an interface for a game component that should be updated in Game.Update.
interface IUpdateable
{
public:
virtual bool Enabled()=0;
virtual void Enabled(int value)=0;
virtual int UpdateOrder()=0;
virtual void UpdateOrder(int value)=0;
virtual ~IUpdateable() {}
virtual void Update(GameTime gameTime)=0;
EventHandler EnabledChanged;
EventHandler UpdateOrderChanged;
};
}
#endif //_XFX_INTERFACES_