open-axiom repository from github
// Copyright (C) 2011, Gabriel Dos Reis.1// All rights reserved.2//3// Redistribution and use in source and binary forms, with or without4// modification, are permitted provided that the following conditions are5// met:6//7// - Redistributions of source code must retain the above copyright8// notice, this list of conditions and the following disclaimer.9//10// - Redistributions in binary form must reproduce the above copyright11// notice, this list of conditions and the following disclaimer in12// the documentation and/or other materials provided with the13// distribution.14//15// - Neither the name of The Numerical Algorithms Group Ltd. nor the16// names of its contributors may be used to endorse or promote products17// derived from this software without specific prior written permission.18//19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS20// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED21// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A22// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER23// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,24// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,25// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR26// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF27// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING28// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS29// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3031// --% Author: Gabriel Dos Reis.323334#include "open-axiom.h"3536namespace OpenAxiom {37Filesystem::Filesystem(const std::string& d)38: root(d),39alg(d + "/algebra"),40db(alg)41{ }4243std::string Filesystem::sysdir() const { return root; }4445std::string Filesystem::algdir() const { return alg; }4647std::string Filesystem::dbdir() const { return db; }4849std::string50database_filepath(const Filesystem& fs, const std::string& file) {51return fs.dbdir() + "/" + file + ".daase";52}53}545556