From ff5149e28f06c4d681b496c27043f9eb61711f34 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 27 Jun 2011 11:48:31 +0000 Subject: * utils/Makefile.in (libOpenAxiom_SOURCES): Include filesystem.cc * include/open-axiom.h (Filesystem): New. * gui/debate.cc (Debate::Debate): Initialize fs data member. * gui/debate.h (Debate): Declare it. --- src/include/open-axiom.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/include') diff --git a/src/include/open-axiom.h b/src/include/open-axiom.h index e230a825..53b24d65 100644 --- a/src/include/open-axiom.h +++ b/src/include/open-axiom.h @@ -35,6 +35,7 @@ #define OPENAXIOM_included #include +#include #include "openaxiom-c-macros.h" @@ -208,6 +209,34 @@ namespace OpenAxiom { Command(); }; + // ---------------- + // -- Filesystem -- + // ---------------- + // Basic interface to the OpenAxiom filesystem + struct Filesystem { + // Construct the basic filesystem from the OpenAxiom system + // directory. All other directories are derived from the root. + explicit Filesystem(const std::string&); + + // The directory containing the core system + std::string sysdir() const; + + // The directory containing algebra modules + std::string algdir() const; + + // The directory containing database files. + std::string dbdir() const; + + private: + const std::string root; + const std::string alg; + const std::string db; + }; + + // Return the path name the specified dabatase file. + std::string database_filepath(const Filesystem&, const std::string&); + + const char* get_systemdir(int argc, char*[]); const char* make_path_for(const char*, Driver); -- cgit v1.2.3