1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/extensions/bintools/extension.h Fri May 04 21:39:05 2007 +0000
1.3 @@ -0,0 +1,86 @@
1.4 +/**
1.5 + * vim: set ts=4 :
1.6 + * ===============================================================
1.7 + * SourceMod, Copyright (C) 2004-2007 AlliedModders LLC.
1.8 + * All rights reserved.
1.9 + * ===============================================================
1.10 + *
1.11 + * This file is part of the SourceMod/SourcePawn SDK. This file may only be
1.12 + * used or modified under the Terms and Conditions of its License Agreement,
1.13 + * which is found in public/licenses/LICENSE.txt. As of this notice, derivative
1.14 + * works must be licensed under the GNU General Public License (version 2 or
1.15 + * greater). A copy of the GPL is included under public/licenses/GPL.txt.
1.16 + *
1.17 + * To view the latest information, see: http://www.sourcemod.net/license.php
1.18 + *
1.19 + * Version: $Id$
1.20 + */
1.21 +
1.22 +#ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
1.23 +#define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
1.24 +
1.25 +/**
1.26 + * @file extension.h
1.27 + * @brief Sample extension code header.
1.28 + */
1.29 +
1.30 +
1.31 +#include "smsdk_ext.h"
1.32 +
1.33 +
1.34 +/**
1.35 + * @brief Sample implementation of the SDK Extension.
1.36 + * Note: Uncomment one of the pre-defined virtual functions in order to use it.
1.37 + */
1.38 +class BinTools : public SDKExtension
1.39 +{
1.40 +public:
1.41 + /**
1.42 + * @brief This is called after the initial loading sequence has been processed.
1.43 + *
1.44 + * @param error Error message buffer.
1.45 + * @param err_max Size of error message buffer.
1.46 + * @param late Whether or not the module was loaded after map load.
1.47 + * @return True to succeed loading, false to fail.
1.48 + */
1.49 + virtual bool SDK_OnLoad(char *error, size_t err_max, bool late);
1.50 +
1.51 + /**
1.52 + * @brief This is called right before the extension is unloaded.
1.53 + */
1.54 + //virtual void SDK_OnUnload();
1.55 +
1.56 + /**
1.57 + * @brief This is called once all known extensions have been loaded.
1.58 + * Note: It is is a good idea to add natives here, if any are provided.
1.59 + */
1.60 + //virtual void SDK_OnAllLoaded();
1.61 +
1.62 + /**
1.63 + * @brief Called when the pause state is changed.
1.64 + */
1.65 + //virtual void SDK_OnPauseChange(bool paused);
1.66 +
1.67 + /**
1.68 + * @brief this is called when Core wants to know if your extension is working.
1.69 + *
1.70 + * @param error Error message buffer.
1.71 + * @param err_max Size of error message buffer.
1.72 + * @return True if working, false otherwise.
1.73 + */
1.74 + //virtual void QueryRunning(char *error, size_t maxlength);
1.75 +public:
1.76 +#if defined SMEXT_CONF_METAMOD
1.77 + /**
1.78 + * Read smext_base.h for documentation on these.
1.79 + */
1.80 +
1.81 + //virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
1.82 + //virtual bool SDK_OnMetamodUnload(char *error, size_t err_max);
1.83 + //virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t err_max);
1.84 +#endif
1.85 +};
1.86 +
1.87 +extern ISourcePawnEngine *g_SPEngine;
1.88 +
1.89 +#endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_