2018-03-19 19:58:46 +01:00
|
|
|
using System.Collections.Generic;
|
2018-03-12 05:04:52 +01:00
|
|
|
|
|
|
|
namespace Ryujinx.Core.OsHle.Handles
|
|
|
|
{
|
2018-03-19 19:58:46 +01:00
|
|
|
class KProcessHandleTable
|
2018-03-12 05:04:52 +01:00
|
|
|
{
|
|
|
|
private IdDictionary Handles;
|
|
|
|
|
|
|
|
public KProcessHandleTable()
|
|
|
|
{
|
|
|
|
Handles = new IdDictionary();
|
|
|
|
}
|
|
|
|
|
|
|
|
public int OpenHandle(object Obj)
|
|
|
|
{
|
|
|
|
return Handles.Add(Obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
public T GetData<T>(int Handle)
|
|
|
|
{
|
|
|
|
return Handles.GetData<T>(Handle);
|
|
|
|
}
|
|
|
|
|
2018-03-19 19:58:46 +01:00
|
|
|
public object CloseHandle(int Handle)
|
2018-03-12 05:04:52 +01:00
|
|
|
{
|
|
|
|
return Handles.Delete(Handle);
|
|
|
|
}
|
|
|
|
|
2018-03-19 19:58:46 +01:00
|
|
|
public ICollection<object> Clear()
|
2018-03-12 05:04:52 +01:00
|
|
|
{
|
2018-03-19 19:58:46 +01:00
|
|
|
return Handles.Clear();
|
2018-03-12 05:04:52 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|