removed const from most apis. it was pointless since there were no actual const pointers.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40621
This commit is contained in:
parent
0bbb4670fc
commit
043b8f255f
@ -467,42 +467,42 @@ void CPlayer::SetName(const char *name)
|
|||||||
m_Name.assign(name);
|
m_Name.assign(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CPlayer::GetName() const
|
const char *CPlayer::GetName()
|
||||||
{
|
{
|
||||||
return m_Name.c_str();
|
return m_Name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CPlayer::GetIPAddress() const
|
const char *CPlayer::GetIPAddress()
|
||||||
{
|
{
|
||||||
return m_Ip.c_str();
|
return m_Ip.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CPlayer::GetAuthString() const
|
const char *CPlayer::GetAuthString()
|
||||||
{
|
{
|
||||||
return m_AuthID.c_str();
|
return m_AuthID.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
edict_t *CPlayer::GetEdict() const
|
edict_t *CPlayer::GetEdict()
|
||||||
{
|
{
|
||||||
return m_pEdict;
|
return m_pEdict;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlayer::IsInGame() const
|
bool CPlayer::IsInGame()
|
||||||
{
|
{
|
||||||
return m_IsInGame;
|
return m_IsInGame;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlayer::IsConnected() const
|
bool CPlayer::IsConnected()
|
||||||
{
|
{
|
||||||
return m_IsConnected;
|
return m_IsConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlayer::IsAuthorized() const
|
bool CPlayer::IsAuthorized()
|
||||||
{
|
{
|
||||||
return m_IsAuthorized;
|
return m_IsAuthorized;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlayer::IsFakeClient() const
|
bool CPlayer::IsFakeClient()
|
||||||
{
|
{
|
||||||
return (strcmp(m_AuthID.c_str(), "BOT") == 0);
|
return (strcmp(m_AuthID.c_str(), "BOT") == 0);
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ void CPlayer::SetAdminId(AdminId id, bool temporary)
|
|||||||
m_TempAdmin = temporary;
|
m_TempAdmin = temporary;
|
||||||
}
|
}
|
||||||
|
|
||||||
AdminId CPlayer::GetAdminId() const
|
AdminId CPlayer::GetAdminId()
|
||||||
{
|
{
|
||||||
return m_Admin;
|
return m_Admin;
|
||||||
}
|
}
|
||||||
|
@ -32,16 +32,16 @@ class CPlayer : public IGamePlayer
|
|||||||
public:
|
public:
|
||||||
CPlayer();
|
CPlayer();
|
||||||
public:
|
public:
|
||||||
const char *GetName() const;
|
const char *GetName();
|
||||||
const char *GetIPAddress() const;
|
const char *GetIPAddress();
|
||||||
const char *GetAuthString() const;
|
const char *GetAuthString();
|
||||||
edict_t *GetEdict() const;
|
edict_t *GetEdict();
|
||||||
bool IsInGame() const;
|
bool IsInGame();
|
||||||
bool IsConnected() const;
|
bool IsConnected();
|
||||||
bool IsAuthorized() const;
|
bool IsAuthorized();
|
||||||
bool IsFakeClient() const;
|
bool IsFakeClient();
|
||||||
void SetAdminId(AdminId id, bool temporary);
|
void SetAdminId(AdminId id, bool temporary);
|
||||||
AdminId GetAdminId() const;
|
AdminId GetAdminId();
|
||||||
private:
|
private:
|
||||||
void Initialize(const char *name, const char *ip, edict_t *pEntity);
|
void Initialize(const char *name, const char *ip, edict_t *pEntity);
|
||||||
void Connect();
|
void Connect();
|
||||||
|
@ -671,17 +671,17 @@ bool CForward::AddFunction(IPluginFunction *func)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CForward::GetForwardName() const
|
const char *CForward::GetForwardName()
|
||||||
{
|
{
|
||||||
return m_name;
|
return m_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CForward::GetFunctionCount() const
|
unsigned int CForward::GetFunctionCount()
|
||||||
{
|
{
|
||||||
return m_functions.size();
|
return m_functions.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecType CForward::GetExecType() const
|
ExecType CForward::GetExecType()
|
||||||
{
|
{
|
||||||
return m_ExecType;
|
return m_ExecType;
|
||||||
}
|
}
|
||||||
|
@ -55,9 +55,9 @@ public: //ICallable
|
|||||||
virtual int PushStringEx(char *buffer, size_t length, int sz_flags, int cp_flags);
|
virtual int PushStringEx(char *buffer, size_t length, int sz_flags, int cp_flags);
|
||||||
virtual void Cancel();
|
virtual void Cancel();
|
||||||
public: //IForward
|
public: //IForward
|
||||||
virtual const char *GetForwardName() const;
|
virtual const char *GetForwardName();
|
||||||
virtual unsigned int GetFunctionCount() const;
|
virtual unsigned int GetFunctionCount();
|
||||||
virtual ExecType GetExecType() const;
|
virtual ExecType GetExecType();
|
||||||
virtual int Execute(cell_t *result, IForwardFilter *filter);
|
virtual int Execute(cell_t *result, IForwardFilter *filter);
|
||||||
public: //IChangeableForward
|
public: //IChangeableForward
|
||||||
virtual bool RemoveFunction(IPluginFunction *func);
|
virtual bool RemoveFunction(IPluginFunction *func);
|
||||||
|
@ -349,47 +349,47 @@ bool CPlugin::Call_AskPluginLoad(char *error, size_t maxlength)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sp_plugin_t *CPlugin::GetPluginStructure() const
|
const sp_plugin_t *CPlugin::GetPluginStructure()
|
||||||
{
|
{
|
||||||
return m_plugin;
|
return m_plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPluginContext *CPlugin::GetBaseContext() const
|
IPluginContext *CPlugin::GetBaseContext()
|
||||||
{
|
{
|
||||||
return m_ctx.base;
|
return m_ctx.base;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp_context_t *CPlugin::GetContext() const
|
sp_context_t *CPlugin::GetContext()
|
||||||
{
|
{
|
||||||
return m_ctx.ctx;
|
return m_ctx.ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CPlugin::GetFilename() const
|
const char *CPlugin::GetFilename()
|
||||||
{
|
{
|
||||||
return m_filename;
|
return m_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginType CPlugin::GetType() const
|
PluginType CPlugin::GetType()
|
||||||
{
|
{
|
||||||
return m_type;
|
return m_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sm_plugininfo_t *CPlugin::GetPublicInfo() const
|
const sm_plugininfo_t *CPlugin::GetPublicInfo()
|
||||||
{
|
{
|
||||||
return &m_info;
|
return &m_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CPlugin::GetSerial() const
|
unsigned int CPlugin::GetSerial()
|
||||||
{
|
{
|
||||||
return m_serial;
|
return m_serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginStatus CPlugin::GetStatus() const
|
PluginStatus CPlugin::GetStatus()
|
||||||
{
|
{
|
||||||
return m_status;
|
return m_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlugin::IsDebugging() const
|
bool CPlugin::IsDebugging()
|
||||||
{
|
{
|
||||||
if (!m_ctx.ctx)
|
if (!m_ctx.ctx)
|
||||||
{
|
{
|
||||||
@ -430,7 +430,7 @@ bool CPlugin::SetPauseState(bool paused)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IdentityToken_t *CPlugin::GetIdentity() const
|
IdentityToken_t *CPlugin::GetIdentity()
|
||||||
{
|
{
|
||||||
return m_ident;
|
return m_ident;
|
||||||
}
|
}
|
||||||
@ -501,7 +501,7 @@ bool CPlugin::ToggleDebugMode(bool debug, char *error, size_t maxlength)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPlugin::IsRunnable() const
|
bool CPlugin::IsRunnable()
|
||||||
{
|
{
|
||||||
return (m_status <= Plugin_Paused) ? true : false;
|
return (m_status <= Plugin_Paused) ? true : false;
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ time_t CPlugin::GetFileTimeStamp()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t CPlugin::GetTimeStamp() const
|
time_t CPlugin::GetTimeStamp()
|
||||||
{
|
{
|
||||||
return m_LastAccess;
|
return m_LastAccess;
|
||||||
}
|
}
|
||||||
@ -539,12 +539,12 @@ void CPlugin::AddLangFile(unsigned int index)
|
|||||||
m_PhraseFiles.push_back(index);
|
m_PhraseFiles.push_back(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CPlugin::GetLangFileCount() const
|
size_t CPlugin::GetLangFileCount()
|
||||||
{
|
{
|
||||||
return m_PhraseFiles.size();
|
return m_PhraseFiles.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CPlugin::GetLangFileByIndex(unsigned int index) const
|
unsigned int CPlugin::GetLangFileByIndex(unsigned int index)
|
||||||
{
|
{
|
||||||
return m_PhraseFiles.at(index);
|
return m_PhraseFiles.at(index);
|
||||||
}
|
}
|
||||||
|
@ -116,17 +116,17 @@ public:
|
|||||||
CPlugin(const char *file);
|
CPlugin(const char *file);
|
||||||
~CPlugin();
|
~CPlugin();
|
||||||
public:
|
public:
|
||||||
virtual PluginType GetType() const;
|
virtual PluginType GetType();
|
||||||
virtual SourcePawn::IPluginContext *GetBaseContext() const;
|
virtual SourcePawn::IPluginContext *GetBaseContext();
|
||||||
virtual sp_context_t *GetContext() const;
|
virtual sp_context_t *GetContext();
|
||||||
virtual const sm_plugininfo_t *GetPublicInfo() const;
|
virtual const sm_plugininfo_t *GetPublicInfo();
|
||||||
virtual const char *GetFilename() const;
|
virtual const char *GetFilename();
|
||||||
virtual bool IsDebugging() const;
|
virtual bool IsDebugging();
|
||||||
virtual PluginStatus GetStatus() const;
|
virtual PluginStatus GetStatus();
|
||||||
virtual bool SetPauseState(bool paused);
|
virtual bool SetPauseState(bool paused);
|
||||||
virtual unsigned int GetSerial() const;
|
virtual unsigned int GetSerial();
|
||||||
virtual const sp_plugin_t *GetPluginStructure() const;
|
virtual const sp_plugin_t *GetPluginStructure();
|
||||||
virtual IdentityToken_t *GetIdentity() const;
|
virtual IdentityToken_t *GetIdentity();
|
||||||
virtual bool SetProperty(const char *prop, void *ptr);
|
virtual bool SetProperty(const char *prop, void *ptr);
|
||||||
virtual bool GetProperty(const char *prop, void **ptr, bool remove=false);
|
virtual bool GetProperty(const char *prop, void **ptr, bool remove=false);
|
||||||
public:
|
public:
|
||||||
@ -189,7 +189,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Returns true if a plugin is usable.
|
* Returns true if a plugin is usable.
|
||||||
*/
|
*/
|
||||||
bool IsRunnable() const;
|
bool IsRunnable();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a language file index to the plugin's list.
|
* Adds a language file index to the plugin's list.
|
||||||
@ -199,17 +199,17 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Get language file count for this plugin.
|
* Get language file count for this plugin.
|
||||||
*/
|
*/
|
||||||
size_t GetLangFileCount() const;
|
size_t GetLangFileCount();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get language file index based on the vector index.
|
* Get language file index based on the vector index.
|
||||||
*/
|
*/
|
||||||
unsigned int GetLangFileByIndex(unsigned int index) const;
|
unsigned int GetLangFileByIndex(unsigned int index);
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Returns the modification time during last plugin load.
|
* Returns the modification time during last plugin load.
|
||||||
*/
|
*/
|
||||||
time_t GetTimeStamp() const;
|
time_t GetTimeStamp();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current modification time of the plugin file.
|
* Returns the current modification time of the plugin file.
|
||||||
|
@ -146,21 +146,21 @@ namespace SourceMod
|
|||||||
*
|
*
|
||||||
* @return Forward name.
|
* @return Forward name.
|
||||||
*/
|
*/
|
||||||
virtual const char *GetForwardName() const =0;
|
virtual const char *GetForwardName() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the number of functions in this forward.
|
* @brief Returns the number of functions in this forward.
|
||||||
*
|
*
|
||||||
* @return Number of functions in forward.
|
* @return Number of functions in forward.
|
||||||
*/
|
*/
|
||||||
virtual unsigned int GetFunctionCount() const =0;
|
virtual unsigned int GetFunctionCount() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the method of multi-calling this forward has.
|
* @brief Returns the method of multi-calling this forward has.
|
||||||
*
|
*
|
||||||
* @return ExecType of the forward.
|
* @return ExecType of the forward.
|
||||||
*/
|
*/
|
||||||
virtual ExecType GetExecType() const =0;
|
virtual ExecType GetExecType() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Executes the forward.
|
* @brief Executes the forward.
|
||||||
|
@ -45,7 +45,7 @@ namespace SourceMod
|
|||||||
* @return String containing the player's name,
|
* @return String containing the player's name,
|
||||||
* or NULL if unavailable.
|
* or NULL if unavailable.
|
||||||
*/
|
*/
|
||||||
virtual const char *GetName() const =0;
|
virtual const char *GetName() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the player's IP address.
|
* @brief Returns the player's IP address.
|
||||||
@ -53,7 +53,7 @@ namespace SourceMod
|
|||||||
* @return String containing the player's IP address,
|
* @return String containing the player's IP address,
|
||||||
* or NULL if unavailable.
|
* or NULL if unavailable.
|
||||||
*/
|
*/
|
||||||
virtual const char *GetIPAddress() const =0;
|
virtual const char *GetIPAddress() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the player's authentication string.
|
* @brief Returns the player's authentication string.
|
||||||
@ -61,21 +61,21 @@ namespace SourceMod
|
|||||||
* @return String containing the player's auth string.
|
* @return String containing the player's auth string.
|
||||||
* May be NULL if unavailable.
|
* May be NULL if unavailable.
|
||||||
*/
|
*/
|
||||||
virtual const char *GetAuthString() const =0;
|
virtual const char *GetAuthString() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the player's edict_t structure.
|
* @brief Returns the player's edict_t structure.
|
||||||
*
|
*
|
||||||
* @return edict_t pointer, or NULL if unavailable.
|
* @return edict_t pointer, or NULL if unavailable.
|
||||||
*/
|
*/
|
||||||
virtual edict_t *GetEdict() const =0;
|
virtual edict_t *GetEdict() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns whether the player is in game (putinserver).
|
* @brief Returns whether the player is in game (putinserver).
|
||||||
*
|
*
|
||||||
* @return True if in game, false otherwise.
|
* @return True if in game, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool IsInGame() const =0;
|
virtual bool IsInGame() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns whether the player is connected.
|
* @brief Returns whether the player is connected.
|
||||||
@ -85,21 +85,21 @@ namespace SourceMod
|
|||||||
*
|
*
|
||||||
* @return True if connected, false otherwise.
|
* @return True if connected, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool IsConnected() const =0;
|
virtual bool IsConnected() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns whether the player is a fake client.
|
* @brief Returns whether the player is a fake client.
|
||||||
*
|
*
|
||||||
* @return True if a fake client, false otherwise.
|
* @return True if a fake client, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool IsFakeClient() const =0;
|
virtual bool IsFakeClient() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the client's AdminId, if any.
|
* @brief Returns the client's AdminId, if any.
|
||||||
*
|
*
|
||||||
* @return AdminId, or INVALID_ADMIN_ID if none.
|
* @return AdminId, or INVALID_ADMIN_ID if none.
|
||||||
*/
|
*/
|
||||||
virtual AdminId GetAdminId() const =0;
|
virtual AdminId GetAdminId() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the client's AdminId.
|
* @brief Sets the client's AdminId.
|
||||||
|
@ -93,50 +93,50 @@ namespace SourceMod
|
|||||||
/**
|
/**
|
||||||
* @brief Returns the lifetime of a plugin.
|
* @brief Returns the lifetime of a plugin.
|
||||||
*/
|
*/
|
||||||
virtual PluginType GetType() const =0;
|
virtual PluginType GetType() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the current API context being used in the plugin.
|
* @brief Returns the current API context being used in the plugin.
|
||||||
*
|
*
|
||||||
* @return Pointer to an IPluginContext, or NULL if not loaded.
|
* @return Pointer to an IPluginContext, or NULL if not loaded.
|
||||||
*/
|
*/
|
||||||
virtual SourcePawn::IPluginContext *GetBaseContext() const =0;
|
virtual SourcePawn::IPluginContext *GetBaseContext() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the context structure being used in the plugin.
|
* @brief Returns the context structure being used in the plugin.
|
||||||
*
|
*
|
||||||
* @return Pointer to an sp_context_t, or NULL if not loaded.
|
* @return Pointer to an sp_context_t, or NULL if not loaded.
|
||||||
*/
|
*/
|
||||||
virtual sp_context_t *GetContext() const =0;
|
virtual sp_context_t *GetContext() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the plugin file structure.
|
* @brief Returns the plugin file structure.
|
||||||
*
|
*
|
||||||
* @return Pointer to an sp_plugin_t, or NULL if not loaded.
|
* @return Pointer to an sp_plugin_t, or NULL if not loaded.
|
||||||
*/
|
*/
|
||||||
virtual const sp_plugin_t *GetPluginStructure() const =0;
|
virtual const sp_plugin_t *GetPluginStructure() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns information about the plugin by reference.
|
* @brief Returns information about the plugin by reference.
|
||||||
*
|
*
|
||||||
* @return Pointer to a sm_plugininfo_t object, NULL if plugin is not loaded.
|
* @return Pointer to a sm_plugininfo_t object, NULL if plugin is not loaded.
|
||||||
*/
|
*/
|
||||||
virtual const sm_plugininfo_t *GetPublicInfo() const =0;
|
virtual const sm_plugininfo_t *GetPublicInfo() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the plugin filename (relative to plugins dir).
|
* @brief Returns the plugin filename (relative to plugins dir).
|
||||||
*/
|
*/
|
||||||
virtual const char *GetFilename() const =0;
|
virtual const char *GetFilename() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns true if a plugin is in debug mode, false otherwise.
|
* @brief Returns true if a plugin is in debug mode, false otherwise.
|
||||||
*/
|
*/
|
||||||
virtual bool IsDebugging() const =0;
|
virtual bool IsDebugging() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the plugin status.
|
* @brief Returns the plugin status.
|
||||||
*/
|
*/
|
||||||
virtual PluginStatus GetStatus() const =0;
|
virtual PluginStatus GetStatus() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets whether the plugin is paused or not.
|
* @brief Sets whether the plugin is paused or not.
|
||||||
@ -148,12 +148,12 @@ namespace SourceMod
|
|||||||
/**
|
/**
|
||||||
* @brief Returns the unique serial number of a plugin.
|
* @brief Returns the unique serial number of a plugin.
|
||||||
*/
|
*/
|
||||||
virtual unsigned int GetSerial() const =0;
|
virtual unsigned int GetSerial() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a plugin's identity token.
|
* @brief Returns a plugin's identity token.
|
||||||
*/
|
*/
|
||||||
virtual IdentityToken_t *GetIdentity() const =0;
|
virtual IdentityToken_t *GetIdentity() =0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets a property on this plugin. This is used for per-plugin
|
* @brief Sets a property on this plugin. This is used for per-plugin
|
||||||
|
Loading…
Reference in New Issue
Block a user