Skip to content
Snippets Groups Projects
Select Git revision
  • 7fe4f9deab64871d8796d545e0e0ca95baac91ad
  • develop default protected
  • feature/local-dt-fsi
  • feature/advection
  • save_clemence
  • feature/reconstruction
  • feature/kinetic-schemes
  • feature/composite-scheme-sources
  • feature/composite-scheme-other-fluxes
  • origin/stage/bouguettaia
  • feature/variational-hydro
  • feature/gmsh-reader
  • feature/serraille
  • feature/composite-scheme
  • hyperplastic
  • feature/polynomials
  • feature/gks
  • feature/implicit-solver-o2
  • feature/coupling_module
  • feature/implicit-solver
  • feature/merge-local-dt-fsi
  • v0.5.0 protected
  • v0.4.1 protected
  • v0.4.0 protected
  • v0.3.0 protected
  • v0.2.0 protected
  • v0.1.0 protected
  • Kidder
  • v0.0.4 protected
  • v0.0.3 protected
  • v0.0.2 protected
  • v0 protected
  • v0.0.1 protected
33 results

ASTModulesImporter.hpp

Blame
  • Stéphane Del Pino's avatar
    Stéphane Del Pino authored
    This is a special module that is *always* imported
    
    For this first version of the module we have three functions:
    
    getAvailableModules() -> string
    which returns the list of available pugs modules
    
    getPugsVersion() -> string
    getPugsBuildInfo() -> string
    which are moved from the 'utils' module
    
    There is no need to use `import core` in the preamble of a pugs script
    file.
    a04286a8
    History
    ASTModulesImporter.hpp 718 B
    #ifndef AST_MODULES_IMPORTER_HPP
    #define AST_MODULES_IMPORTER_HPP
    
    #include <language/ast/ASTNode.hpp>
    #include <language/modules/ModuleRepository.hpp>
    
    #include <set>
    #include <string>
    
    class SymbolTable;
    
    class ASTModulesImporter
    {
      std::set<std::string> m_imported_modules;
      SymbolTable& m_symbol_table;
    
      ModuleRepository m_module_repository;
    
      void _importModule(ASTNode& import_node);
      void _importAllModules(ASTNode& node);
    
     public:
      const ModuleRepository&
      moduleRepository() const
      {
        return m_module_repository;
      }
    
      ASTModulesImporter(ASTNode& root_node);
    
      ASTModulesImporter(const ASTModulesImporter&) = delete;
    
      ~ASTModulesImporter() = default;
    };
    
    #endif   // AST_MODULES_IMPORTER_HPP