SourceMod SDK  1.7
SourceMod::IExtension Class Referenceabstract

Encapsulates an IExtensionInterface and its dependencies. More...

#include <public/IExtensionSys.h>

Public Member Functions

virtual bool IsLoaded ()=0
 Returns whether or not the extension is properly loaded.
 
virtual IExtensionInterfaceGetAPI ()=0
 Returns the extension's API interface. More...
 
virtual const char * GetFilename ()=0
 Returns the filename of the extension, relative to the extension folder. If the extension is an "external" extension, the file path is specified by the extension itself, and may be arbitrary (not real). More...
 
virtual IdentityToken_t * GetIdentity ()=0
 Returns the extension's identity token. More...
 
virtual ITERATOR * FindFirstDependency (IExtension **pOwner, SMInterface **pInterface)=0
 Retrieves the extension dependency list for this extension. More...
 
virtual bool FindNextDependency (ITERATOR *iter, IExtension **pOwner, SMInterface **pInterface)=0
 Finds the next dependency in the dependency list. More...
 
virtual void FreeDependencyIterator (ITERATOR *iter)=0
 Frees an ITERATOR handle from FindFirstDependency. More...
 
virtual bool IsRunning (char *error, size_t maxlength)=0
 Queries the extension to see its run state. More...
 
virtual bool IsExternal ()=0
 Returns whether the extension is local (from the extensions folder), or is from an external source (such as Metamod:Source). More...
 

Detailed Description

Encapsulates an IExtensionInterface and its dependencies.

Member Function Documentation

virtual ITERATOR* SourceMod::IExtension::FindFirstDependency ( IExtension **  pOwner,
SMInterface **  pInterface 
)
pure virtual

Retrieves the extension dependency list for this extension.

Parameters
pOwnerOptional pointer to store the first interface's owner.
pInterfaceOptional pointer to store the first interface.
Returns
An ITERATOR pointer for the results, or NULL if no results at all.
virtual bool SourceMod::IExtension::FindNextDependency ( ITERATOR *  iter,
IExtension **  pOwner,
SMInterface **  pInterface 
)
pure virtual

Finds the next dependency in the dependency list.

Parameters
iterPointer to iterator from FindFirstDependency.
pOwnerOptional pointer to store the interface's owner.
pInterfaceOptional pointer to store the interface.
Returns
True if there are more results after this, false otherwise.
virtual void SourceMod::IExtension::FreeDependencyIterator ( ITERATOR *  iter)
pure virtual

Frees an ITERATOR handle from FindFirstDependency.

Parameters
iterPointer to iterator to free.
virtual IExtensionInterface* SourceMod::IExtension::GetAPI ( )
pure virtual

Returns the extension's API interface.

Returns
An IExtensionInterface pointer.
virtual const char* SourceMod::IExtension::GetFilename ( )
pure virtual

Returns the filename of the extension, relative to the extension folder. If the extension is an "external" extension, the file path is specified by the extension itself, and may be arbitrary (not real).

Returns
A string containing the extension file name.
virtual IdentityToken_t* SourceMod::IExtension::GetIdentity ( )
pure virtual

Returns the extension's identity token.

Returns
An IdentityToken_t pointer.
virtual bool SourceMod::IExtension::IsExternal ( )
pure virtual

Returns whether the extension is local (from the extensions folder), or is from an external source (such as Metamod:Source).

Returns
True if from an external source, false if local to SourceMod.
virtual bool SourceMod::IExtension::IsRunning ( char *  error,
size_t  maxlength 
)
pure virtual

Queries the extension to see its run state.

Parameters
errorError buffer (may be NULL).
maxlengthMaximum length of buffer.
Returns
True if extension is okay, false if not okay.

The documentation for this class was generated from the following file: