MyExtension Class Reference

Inherits SourceMod::IExtensionInterface.

Inheritance diagram for MyExtension:

[legend]
Collaboration diagram for MyExtension:
[legend]
List of all members.

Public Member Functions

virtual bool OnExtensionLoad (IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late)
 Called when the extension is loaded.
virtual void OnExtensionUnload ()
 Called when the extension is about to be unloaded.
virtual void OnExtensionsAllLoaded ()
 Called when all extensions are loaded (loading cycle is done). If loaded late, this will be called right after OnExtensionLoad().
virtual void OnExtensionPauseChange (bool pause)
 Called when your pause state is about to change.
virtual bool QueryRunning (char *error, size_t maxlength)
 Return false to tell Core that your extension should be considered unusable.
virtual bool IsMetamodExtension ()
 For extensions loaded through SourceMod, this should return true if the extension needs to attach to Metamod:Source. If the extension is loaded through Metamod:Source, and uses SourceMod optionally, it must return false.
virtual const char * GetExtensionName ()
 Must return a string containing the extension's short name.
virtual const char * GetExtensionURL ()
 Must return a string containing the extension's URL.
virtual const char * GetExtensionTag ()
 Must return a string containing a short identifier tag.
virtual const char * GetExtensionAuthor ()
 Must return a string containing a short author identifier.
virtual const char * GetExtensionVerString ()
 Must return a string containing version information.
virtual const char * GetExtensionDescription ()
 Must return a string containing description text.
virtual const char * GetExtensionDateString ()
 Must return a string containing the compilation date.

Detailed Description

Definition at line 39 of file sm_ext.h.


Member Function Documentation

bool MyExtension::OnExtensionLoad ( IExtension me,
IShareSys sys,
char *  error,
size_t  maxlength,
bool  late 
) [virtual]

Called when the extension is loaded.

Parameters:
me Pointer back to extension.
sys Pointer to interface sharing system of SourceMod.
error Error buffer to print back to, if any.
maxlength Maximum size of error buffer.
late If this extension was loaded "late" (i.e. manually).
Returns:
True if load should continue, false otherwise.

Implements SourceMod::IExtensionInterface.

Definition at line 85 of file sm_ext.cpp.

void MyExtension::OnExtensionPauseChange ( bool  pause  )  [virtual]

Called when your pause state is about to change.

Parameters:
pause True if pausing, false if unpausing.

Implements SourceMod::IExtensionInterface.

Definition at line 123 of file sm_ext.cpp.

bool MyExtension::QueryRunning ( char *  error,
size_t  maxlength 
) [virtual]

Return false to tell Core that your extension should be considered unusable.

Parameters:
error Error buffer.
maxlength Size of error buffer.
Returns:
True on success, false otherwise.

Reimplemented from SourceMod::IExtensionInterface.

Definition at line 127 of file sm_ext.cpp.

bool MyExtension::IsMetamodExtension (  )  [virtual]

For extensions loaded through SourceMod, this should return true if the extension needs to attach to Metamod:Source. If the extension is loaded through Metamod:Source, and uses SourceMod optionally, it must return false.

Returns:
True if Metamod:Source is needed.

Implements SourceMod::IExtensionInterface.

Definition at line 136 of file sm_ext.cpp.

const char * MyExtension::GetExtensionName (  )  [virtual]

Must return a string containing the extension's short name.

Returns:
String containing extension name.

Implements SourceMod::IExtensionInterface.

Definition at line 142 of file sm_ext.cpp.

const char * MyExtension::GetExtensionURL (  )  [virtual]

Must return a string containing the extension's URL.

Returns:
String containing extension URL.

Implements SourceMod::IExtensionInterface.

Definition at line 147 of file sm_ext.cpp.

const char * MyExtension::GetExtensionTag (  )  [virtual]

Must return a string containing a short identifier tag.

Returns:
String containing extension tag.

Implements SourceMod::IExtensionInterface.

Definition at line 152 of file sm_ext.cpp.

const char * MyExtension::GetExtensionAuthor (  )  [virtual]

Must return a string containing a short author identifier.

Returns:
String containing extension author.

Implements SourceMod::IExtensionInterface.

Definition at line 157 of file sm_ext.cpp.

const char * MyExtension::GetExtensionVerString (  )  [virtual]

Must return a string containing version information.

Any version string format can be used, however, SourceMod makes a special guarantee version numbers in the form of A.B.C.D will always be fully displayed, where:

A is a major version number of at most one digit. B is a minor version number of at most two digits. C is a minor version number of at most two digits. D is a build number of at most 5 digits.

Thus, thirteen characters of display is guaranteed.

Returns:
String containing extension version.

Implements SourceMod::IExtensionInterface.

Definition at line 162 of file sm_ext.cpp.

const char * MyExtension::GetExtensionDescription (  )  [virtual]

Must return a string containing description text.

The description text may be longer than the other identifiers, as it is only displayed when viewing one extension at a time. However, it should not have newlines, or any other characters which would otherwise disrupt the display pattern.

Returns:
String containing extension description.

Implements SourceMod::IExtensionInterface.

Definition at line 167 of file sm_ext.cpp.

const char * MyExtension::GetExtensionDateString (  )  [virtual]

Must return a string containing the compilation date.

Returns:
String containing the compilation date.

Implements SourceMod::IExtensionInterface.

Definition at line 172 of file sm_ext.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Nov 21 07:10:03 2008 for SourceMod SDK by  doxygen 1.5.1