A simple scripting language in C++
Ferenc Szontágh
2025-04-18 3bb117e4fee72c4d4019c575bf0cb21043584954
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// BaseModule.hpp
#ifndef MODULES_BASEMODULE_HPP
#define MODULES_BASEMODULE_HPP
 
#include <string>
#include "Symbols/SymbolContainer.hpp"
#include "Symbols/SymbolFactory.hpp"
 
namespace Modules {
 
/**
 * @brief Base class for modules that can register functions and variables into the symbol table.
 */
class BaseModule {
  public:
    BaseModule() = default;
    virtual ~BaseModule() = default;
 
    /**
     * @brief Register this module's symbols (functions, variables) into the global symbol container.
     * Modules should use Symbols::SymbolContainer::instance() and SymbolFactory to add symbols.
     */
    virtual void registerModule() = 0;
};
 
} // namespace Modules
#endif // MODULES_BASEMODULE_HPP