mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
029adfa28c
Instead of having to add and individually test the versions to check for, we store the current version and test on that with a specific function isAvailableAtLeastFrom(package, year, month, day) Currently only used for the LaTeX version, but could also be extended for package versions.
46 lines
1004 B
C++
46 lines
1004 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file LaTeXPackages.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 LATEXPACKAGES_H
|
|
#define LATEXPACKAGES_H
|
|
|
|
#include <string>
|
|
#include <set>
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
/** The list of avilable LaTeX packages
|
|
*/
|
|
class LaTeXPackages {
|
|
public:
|
|
/// Which of the required packages are installed?
|
|
static void getAvailable();
|
|
/// Is the (required) package available?
|
|
static bool isAvailable(std::string const & name);
|
|
/// Is the (required) package available at least as of
|
|
/// version y/m/d?
|
|
static bool isAvailableAtLeastFrom(std::string const & name,
|
|
int const y, int const m, int const d = 1);
|
|
private:
|
|
/// The available (required) packages
|
|
typedef std::set<std::pair<std::string,std::string>> Packages;
|
|
///
|
|
static Packages packages_;
|
|
};
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
#endif
|