Skip to content
Snippets Groups Projects
Select Git revision
  • a04286a83e3320caf90701cd71190248f3aa82f6
  • develop default protected
  • feature/gmsh-reader
  • feature/reconstruction
  • save_clemence
  • origin/stage/bouguettaia
  • feature/kinetic-schemes
  • feature/local-dt-fsi
  • feature/composite-scheme-sources
  • feature/composite-scheme-other-fluxes
  • feature/serraille
  • feature/variational-hydro
  • feature/composite-scheme
  • hyperplastic
  • feature/polynomials
  • feature/gks
  • feature/implicit-solver-o2
  • feature/coupling_module
  • feature/implicit-solver
  • feature/merge-local-dt-fsi
  • master protected
  • 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
      a04286a8
      Add the CoreModule · a04286a8
      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
      Add the CoreModule
      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.
    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