public/sample_ext/extension.h
author David Anderson <dvander@alliedmods.net>
Fri Feb 16 03:47:10 2007 +0000 (2007-02-16)
changeset 501 e209a7296936
parent 375 a31ff1b6ae46
child 676 1ed65fdc194a
permissions -rw-r--r--
removed this potential feature, not useful enough
     1 // vim: set ts=4 :
     2 #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
     3 #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
     4 
     5 /**
     6  * @file extension.h
     7  * @brief Sample extension code header.
     8  */
     9 
    10 
    11 #include "smsdk_ext.h"
    12 
    13 
    14 /**
    15  * @brief Sample implementation of the SDK Extension.
    16  * Note: Uncomment one of the pre-defined virtual functions in order to use it.
    17  */
    18 class Sample : public SDKExtension
    19 {
    20 public:
    21 	/**
    22 	 * @brief This is called after the initial loading sequence has been processed.
    23 	 *
    24 	 * @param error		Error message buffer.
    25 	 * @param err_max	Size of error message buffer.
    26 	 * @param late		Whether or not the module was loaded after map load.
    27 	 * @return			True to succeed loading, false to fail.
    28 	 */
    29 	//virtual bool SDK_OnLoad(char *error, size_t err_max, bool late);
    30 	
    31 	/**
    32 	 * @brief This is called right before the extension is unloaded.
    33 	 */
    34 	//virtual void SDK_OnUnload();
    35 
    36 	/**
    37 	 * @brief This is called once all known extensions have been loaded.
    38 	 * Note: It is is a good idea to add natives here, if any are provided.
    39 	 */
    40 	//virtual void SDK_OnAllLoaded();
    41 
    42 	/**
    43 	 * @brief Called when the pause state is changed.
    44 	 */
    45 	//virtual void SDK_OnPauseChange(bool paused);
    46 
    47 	/**
    48 	 * @brief this is called when Core wants to know if your extension is working.
    49 	 *
    50 	 * @param error		Error message buffer.
    51 	 * @param err_max	Size of error message buffer.
    52 	 * @return			True if working, false otherwise.
    53 	 */
    54 	//virtual void QueryRunning(char *error, size_t maxlength);
    55 public:
    56 #if defined SMEXT_CONF_METAMOD
    57 	/**
    58 	 * Read smext_base.h for documentation on these.
    59 	 */
    60 
    61 	//virtual bool SDK_OnMetamodLoad(char *error, size_t err_max, bool late);
    62 	//virtual bool SDK_OnMetamodUnload(char *error, size_t err_max);
    63 	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t err_max);
    64 #endif
    65 };
    66 
    67 #endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_