mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Properly implement the ConCommandBase and ConCommand classes so we could statically construct all ConCommand objects in the global scope of each translation unit, this way we don't need to put them in a global file and deal with preprocessor directives to compile then in/out for certain projects.
24 lines
818 B
C++
24 lines
818 B
C++
#ifndef ICONCOMMAND_H
|
|
#define ICONCOMMAND_H
|
|
#include "icvar.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Forward declarations
|
|
//-----------------------------------------------------------------------------
|
|
class ConCommandBase;
|
|
class CCommand;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Any executable that wants to use ConVars need to implement one of
|
|
// these to hook up access to console variables.
|
|
//-----------------------------------------------------------------------------
|
|
abstract_class IConCommandBaseAccessor
|
|
{
|
|
public:
|
|
// Flags is a combination of FCVAR flags in cvar.h.
|
|
// hOut is filled in with a handle to the variable.
|
|
virtual bool RegisterConCommandBase(ConCommandBase* const pVar) = 0;
|
|
};
|
|
|
|
#endif // ICONCOMMAND_H
|