1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/System/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

64 lines
1.6 KiB
C++

/********************************************************
* Interfaces.h *
* *
* System namespace interfaces definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _SYSTEM_INTERFACES_
#define _SYSTEM_INTERFACES_
#include "Object.h"
#include "Types.h"
#include "Threading/WaitHandle.h"
namespace System
{
// Represents the status of an asynchronous operation.
interface IAsyncResult
{
public:
virtual Object* AsyncState()=0;
virtual Threading::WaitHandle* AsyncWaitHandle()=0;
virtual bool CompletedSynchronously()=0;
virtual bool IsCompleted()=0;
};
// Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering instances.
template <class T>
interface IComparable
{
public:
virtual int CompareTo(T other)=0;
};
// Defines a method to release allocated resources.
interface IDisposable
{
public:
virtual void Dispose()=0;
};
// Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
template<class T>
interface IEquatable
{
public:
virtual bool Equals(const T other)=0;
};
// Provides a mechanism for retrieving an object to control formatting.
interface IFormatProvider
{
public:
virtual Object* GetProvider()=0;
};
interface IServiceProvider
{
public:
virtual Object* GetService(Object* serviceType)=0;
};
}
#endif //_SYSTEM_INTERFACES_