develop #15

Merged
cromer merged 64 commits from develop into master 2023-02-23 01:11:48 -03:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit e77fb73cd0 - Show all commits

View File

@ -9,14 +9,14 @@
#include <limits> #include <limits>
#include <memory> #include <memory>
static int obelisk::mainLoop() static int obelisk::mainLoop(const std::vector<std::string>& sourceFiles, const std::string& kbFile)
{ {
auto parser = std::unique_ptr<obelisk::Parser> {new obelisk::Parser()}; auto parser = std::unique_ptr<obelisk::Parser> {new obelisk::Parser()};
std::unique_ptr<obelisk::KnowledgeBase> kb; std::unique_ptr<obelisk::KnowledgeBase> kb;
try try
{ {
kb = std::unique_ptr<obelisk::KnowledgeBase> {new obelisk::KnowledgeBase("cromer.kb")}; kb = std::unique_ptr<obelisk::KnowledgeBase> {new obelisk::KnowledgeBase(kbFile.c_str())};
} }
catch (obelisk::KnowledgeBaseException& exception) catch (obelisk::KnowledgeBaseException& exception)
{ {
@ -131,5 +131,5 @@ int main(int argc, char** argv)
return 0; return 0;
return obelisk::mainLoop(); return obelisk::mainLoop(sourceFiles, kbFile);
} }

View File

@ -42,5 +42,5 @@ Options:
* *
* @return int Returns EXIT_SUCCESS or EXIT_FAILURE. * @return int Returns EXIT_SUCCESS or EXIT_FAILURE.
*/ */
static int mainLoop(); static int mainLoop(const std::vector<std::string> &sourceFiles, const std::string &kbFile);
} // namespace obelisk } // namespace obelisk