From 95bf50269069c2d04f822437364821f5759252b8 Mon Sep 17 00:00:00 2001 From: "joaquin.f.fernandez" Date: Fri, 3 Jan 2025 11:53:30 -0300 Subject: [PATCH] Added method to return includes from functions. --- src/mmoc/generator/function.cpp | 2 ++ src/mmoc/generator/function.hpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/mmoc/generator/function.cpp b/src/mmoc/generator/function.cpp index fb0dc71a..8fd08e7e 100644 --- a/src/mmoc/generator/function.cpp +++ b/src/mmoc/generator/function.cpp @@ -169,5 +169,7 @@ void Function::addInclude(string include) { _include[include] = include; } void Function::addInclude(SymbolTable includes) { _include.merge(includes); } +Util::SymbolTable Function::functionIncludes() const { return _include; } + } // namespace Generator } // namespace MicroModelica diff --git a/src/mmoc/generator/function.hpp b/src/mmoc/generator/function.hpp index 852bb751..209454c0 100644 --- a/src/mmoc/generator/function.hpp +++ b/src/mmoc/generator/function.hpp @@ -37,6 +37,7 @@ class Function { void setPrefix(std::string prefix); void addInclude(std::string include); void addInclude(Util::SymbolTable includes); + Util::SymbolTable functionIncludes() const; private: void includes();