exposed DataPack Handle type
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401197
This commit is contained in:
parent
995f0231a8
commit
fa07c9d8a2
@ -25,7 +25,16 @@ class DataPackNatives :
|
|||||||
public:
|
public:
|
||||||
void OnSourceModAllInitialized()
|
void OnSourceModAllInitialized()
|
||||||
{
|
{
|
||||||
g_DataPackType = g_HandleSys.CreateType("DataPack", this, 0, NULL, NULL, g_pCoreIdent, NULL);
|
HandleAccess hacc;
|
||||||
|
TypeAccess tacc;
|
||||||
|
|
||||||
|
g_HandleSys.InitAccessDefaults(&tacc, &hacc);
|
||||||
|
tacc.access[HTypeAccess_Create] = true;
|
||||||
|
tacc.access[HTypeAccess_Inherit] = true;
|
||||||
|
tacc.ident = g_pCoreIdent;
|
||||||
|
hacc.access[HandleAccess_Read] = HANDLE_RESTRICT_OWNER;
|
||||||
|
|
||||||
|
g_DataPackType = g_HandleSys.CreateType("DataPack", this, 0, &tacc, &hacc, g_pCoreIdent, NULL);
|
||||||
}
|
}
|
||||||
void OnSourceModShutdown()
|
void OnSourceModShutdown()
|
||||||
{
|
{
|
||||||
|
@ -139,15 +139,10 @@ namespace SourceMod
|
|||||||
virtual void FreeDataPack(IDataPack *pack) =0;
|
virtual void FreeDataPack(IDataPack *pack) =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the automated data pack handle type.
|
* @brief Not implemented, do not use.
|
||||||
*
|
*
|
||||||
* The read-only data type is the parent of the writable type.
|
* @param readonly Ignored
|
||||||
* Note that calling CloseHandle() on either type will release the data pack.
|
* @return 0
|
||||||
* The read-only type is inheritable, but due to limitations of the Handle System,
|
|
||||||
* the writable type is not.
|
|
||||||
*
|
|
||||||
* @param readonly If true, the read-only type will be returned.
|
|
||||||
* @return The Handle type for storing generic data packs.
|
|
||||||
*/
|
*/
|
||||||
virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0;
|
virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user