polserver/pol-core/bscript/fmodule.cpp
turleypol 1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* all except pol

* pol and includes under defines

* something weird has happened

* remove own folder from include searchpath

* fixed remaining, adapted include style for external headers

* missing include
2026-07-25 23:01:18 +02:00

38 lines
753 B
C++

/** @file
*
* @par History
*/
#include "bscript/fmodule.h"
#include <cstddef>
namespace Pol::Bscript
{
ModuleFunction::ModuleFunction( const char* fname, int i_nargs )
: name( fname ), nargs( i_nargs ), funcidx( -1 )
{
}
FunctionalityModule::FunctionalityModule( const char* i_modname )
: have_indexes( false ), modulename( i_modname )
{
}
FunctionalityModule::~FunctionalityModule()
{
while ( !functions.empty() )
{
delete functions.back();
functions.pop_back();
}
}
void FunctionalityModule::addFunction( const char* funcname, int nparams )
{
auto mf = new ModuleFunction( funcname, nparams );
mf->funcidx = static_cast<unsigned int>( functions.size() );
functions.push_back( mf );
}
} // namespace Pol::Bscript