]> git.lyx.org Git - lyx.git/commitdiff
Kill files unused for long time
authorPavel Sanda <sanda@lyx.org>
Mon, 22 Feb 2010 02:00:55 +0000 (02:00 +0000)
committerPavel Sanda <sanda@lyx.org>
Mon, 22 Feb 2010 02:00:55 +0000 (02:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33531 a592a061-630c-0410-9148-cb99ea01b6c8

src/Makefile.am
src/Variables.cpp [deleted file]
src/Variables.h [deleted file]

index 778e010f0a0ebfe0d955a255f4e8a35903541016..f4a5701d0cba2739127bd6591913ad89807f57c8 100644 (file)
@@ -13,11 +13,7 @@ endif
 
 SUBDIRS = support frontends . $(CLIENT) tex2lyx
 
-EXTRA_DIST = Section.h \
-       Section.cpp \
-       Variables.cpp \
-       Variables.h \
-       paper.h \
+EXTRA_DIST = paper.h \
        pch.h
 
 OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(MYTHES_LIBS) $(AIKSAURUS_LIBS) \
diff --git a/src/Variables.cpp b/src/Variables.cpp
deleted file mode 100644 (file)
index 7f904f0..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * \file Variables.cpp
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Lars Gullik Bjønnes
- * \author Jean-Marc Lasgouttes
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-#include "Variables.h"
-#include "support/LRegex.h"
-
-using namespace std;
-
-void Variables::set(string const & var, string const & val)
-{
-       // We want to use const_iterator (Lgb)
-       Vars::iterator cit = vars_.find(var);
-       if (cit != vars_.end())
-               vars_.erase(var);
-       vars_[var] = val;;
-}
-
-
-string const Variables::get(string const & var) const
-{
-       Vars::const_iterator cit = vars_.find(var);
-       if (cit != vars_.end())
-               return cit->second;
-       else
-               return string();
-}
-
-
-bool Variables::isSet(string const & var) const
-{
-       Vars::const_iterator cit = vars_.find(var);
-       return (cit != vars_.end());
-}
-
-
-string const Variables::expand(string const & s) const
-{
-       string str(s);
-       LRegex reg("\\$\\{\\(.*\\)\\}");
-
-       if (!reg.exact_match(str))
-               return str;
-
-       LRegex::MatchPair match;
-       string var;
-
-       do {
-               match = reg.first_match(str);
-               var = str.substr(match.first,match.second);
-               // we correct the match to take ${} in account.
-               str.replace(match.first - 2, match.second + 3, get(var));
-       } while (reg.exact_match(str));
-
-       return str;
-}
-
-#ifdef TEST
-
-#include <iostream>
-
-namespace lyx {
-
-int main() {
-       Variables vars;
-       vars.set("x", "hello");
-       vars.set("y", "world");
-       cout << vars.expand("${x}") << endl;
-}
-
-} // namespace lyx
-
-#endif
diff --git a/src/Variables.h b/src/Variables.h
deleted file mode 100644 (file)
index 5823fb3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// -*- C++ -*-
-/**
- * \file Variables.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Lars Gullik Bjønnes
- * \author Jean-Marc Lasgouttes
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef VARIABLES_H
-#define VARIABLES_H
-
-#include <map>
-
-
-namespace lyx {
-
-
-///
-class Variables {
-public:
-       ///
-       void set(std::string const &, std::string const &);
-       ///
-       std::string const get(std::string const &) const;
-       ///
-       bool isSet(std::string const & var) const;
-       ///
-       std::string const expand(std::string const &) const;
-private:
-       ///
-       typedef std::map<std::string, std::string> Vars;
-       ///
-       Vars vars_;
-};
-
-
-} // namespace lyx
-
-#endif