public/IHandleSys.h File Reference
Defines the interface for creating, reading, and removing Handles. More...
#include <IShareSys.h>
#include <sp_vm_types.h>
Include dependency graph for IHandleSys.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
|
Namespaces |
| namespace | SourceMod |
Classes |
| struct | SourceMod::TypeAccess |
| | This is used to define per-type access rights. More...
|
| struct | SourceMod::HandleAccess |
| | This is used to define per-Handle access rights. More...
|
| struct | SourceMod::HandleSecurity |
| | This pair of tokens is used for identification. More...
|
| class | SourceMod::IHandleTypeDispatch |
| | Hooks type-specific Handle operations. More...
|
| class | SourceMod::IHandleSys |
| | Provides functions for managing Handles. More...
|
Defines |
|
#define | SMINTERFACE_HANDLESYSTEM_NAME "IHandleSys" |
|
#define | SMINTERFACE_HANDLESYSTEM_VERSION 3 |
| #define | DEFAULT_IDENTITY NULL |
| #define | NO_HANDLE_TYPE 0 |
| #define | BAD_HANDLE 0 |
| #define | HANDLE_RESTRICT_IDENTITY (1<<0) |
| #define | HANDLE_RESTRICT_OWNER (1<<1) |
Typedefs |
|
typedef unsigned int | SourceMod::HandleType_t |
| | Represents a Handle Type ID.
|
|
typedef unsigned int | SourceMod::Handle_t |
| | Represents a Handle ID.
|
Enumerations |
| enum | SourceMod::HandleError {
SourceMod::HandleError_None = 0,
SourceMod::HandleError_Changed,
SourceMod::HandleError_Type,
SourceMod::HandleError_Freed,
SourceMod::HandleError_Index,
SourceMod::HandleError_Access,
SourceMod::HandleError_Limit,
SourceMod::HandleError_Identity,
SourceMod::HandleError_Owner,
SourceMod::HandleError_Version,
SourceMod::HandleError_Parameter,
SourceMod::HandleError_NoInherit
} |
| | Lists the possible handle error codes. More...
|
| enum | SourceMod::HTypeAccessRight { SourceMod::HTypeAccess_Create = 0,
SourceMod::HTypeAccess_Inherit,
SourceMod::HTypeAccess_TOTAL
} |
| | Lists access rights specific to a type. More...
|
| enum | SourceMod::HandleAccessRight { SourceMod::HandleAccess_Read,
SourceMod::HandleAccess_Delete,
SourceMod::HandleAccess_Clone,
SourceMod::HandleAccess_TOTAL
} |
| | Lists access rights specific to a Handle. More...
|
Detailed Description
Defines the interface for creating, reading, and removing Handles.
The Handle system abstracts generic pointers into typed objects represented by 32bit codes. This is extremely useful for verifying data integrity and cross-platform support in SourcePawn scripts. When a Plugin unloads, all its Handles are freed, ensuring that no memory leaks are present, They have reference counts and thus can be duplicated, or cloned, and are safe to pass between Plugins even if one is unloaded.
Handles are created with a given type (custom types may be created). They can have per-Identity permissions for deletion, reading, and cloning. They also support generic operations. For example, deleting a Handle will call that type's destructor on the generic pointer, making cleanup easier for users and eliminating memory leaks.
Definition in file IHandleSys.h.
Define Documentation
| #define DEFAULT_IDENTITY NULL |
Specifies no Type. This is invalid for everything but reading a Handle.
Definition at line 60 of file IHandleSys.h.
Specifies an invalid/NULL Handle
Definition at line 62 of file IHandleSys.h.
| #define HANDLE_RESTRICT_IDENTITY (1<<0) |
Access is restricted to the identity
Definition at line 135 of file IHandleSys.h.
| #define HANDLE_RESTRICT_OWNER (1<<1) |
Access is restricted to the owner
Definition at line 137 of file IHandleSys.h.
Generated on Sun Dec 28 23:26:26 2008 for SourceMod SDK by
1.5.1