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