extensions/threader/extension.h
changeset 322 d0d1fd080035
child 373 bf3335acefdd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/threader/extension.h	Fri Jan 19 04:35:56 2007 +0000
     1.3 @@ -0,0 +1,59 @@
     1.4 +#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
     1.5 +#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
     1.6 +
     1.7 +#include "smsdk_ext.h"
     1.8 +
     1.9 +/**
    1.10 + * @brief Sample implementation of the SDK Extension.
    1.11 + * Note: Uncomment one of the pre-defined virtual functions in order to use it.
    1.12 + */
    1.13 +class Sample : public SDKExtension
    1.14 +{
    1.15 +public:
    1.16 +	/**
    1.17 +	 * @brief This is called after the initial loading sequence has been processed.
    1.18 +	 *
    1.19 +	 * @param error		Error message buffer.
    1.20 +	 * @param err_max	Size of error message buffer.
    1.21 +	 * @param late		Whether or not the module was loaded after map load.
    1.22 +	 * @return			True to succeed loading, false to fail.
    1.23 +	 */
    1.24 +	virtual bool SDK_OnLoad(char *error, size_t err_max, bool late);
    1.25 +	
    1.26 +	/**
    1.27 +	 * @brief This is called right before the extension is unloaded.
    1.28 +	 */
    1.29 +	//virtual void SDK_OnUnload();
    1.30 +
    1.31 +	/**
    1.32 +	 * @brief This is called once all known extensions have been loaded.
    1.33 +	 * Note: It is is a good idea to add natives here, if any are provided.
    1.34 +	 */
    1.35 +	//virtual void SDK_OnAllLoaded();
    1.36 +
    1.37 +	/**
    1.38 +	 * @brief Called when the pause state is changed.
    1.39 +	 */
    1.40 +	//virtual void SDK_OnPauseChange(bool paused);
    1.41 +
    1.42 +	/**
    1.43 +	 * @brief this is called when Core wants to know if your extension is working.
    1.44 +	 *
    1.45 +	 * @param error		Error message buffer.
    1.46 +	 * @param err_max	Size of error message buffer.
    1.47 +	 * @return			True if working, false otherwise.
    1.48 +	 */
    1.49 +	//virtual void QueryRunning(char *error, size_t maxlength);
    1.50 +public:
    1.51 +#if defined SMEXT_CONF_METAMOD
    1.52 +	/**
    1.53 +	 * Read smext_base.h for documentation on these.
    1.54 +	 */
    1.55 +
    1.56 +	//virtual bool SDK_OnMetamodLoad(char *error, size_t err_max, bool late);
    1.57 +	//virtual bool SDK_OnMetamodUnload(char *error, size_t err_max);
    1.58 +	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t err_max);
    1.59 +#endif
    1.60 +};
    1.61 +
    1.62 +#endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_