aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-06-27 11:48:31 +0000
committerdos-reis <gdr@axiomatics.org>2011-06-27 11:48:31 +0000
commitff5149e28f06c4d681b496c27043f9eb61711f34 (patch)
tree04e94e02d959c7c93e64fe341f8fb35cd4fa7d9e /src/include
parent9aafe6c5ce226436c5fe69fb05d309d3a95843e0 (diff)
downloadopen-axiom-ff5149e28f06c4d681b496c27043f9eb61711f34.tar.gz
* 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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/open-axiom.h29
1 files changed, 29 insertions, 0 deletions
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 <vector>
+#include <string>
#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);