X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flastfiles.h;h=e053af70591fec723bb3157bf20fbbdcf7afced7;hb=005545f28100fd30afa22313d6e3b1b67aa9a857;hp=31f57e73f95adde7661bdd32c70143d6b72cebbb;hpb=0b98ee5f2ec731d156b976856b0db52dc9534e59;p=lyx.git diff --git a/src/lastfiles.h b/src/lastfiles.h index 31f57e73f9..e053af7059 100644 --- a/src/lastfiles.h +++ b/src/lastfiles.h @@ -1,25 +1,22 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. +/** + * \file lastfiles.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * ====================================================== */ + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. + */ #ifndef LASTFILES_H #define LASTFILES_H -#ifdef __GNUG__ -#pragma interface -#endif +#include #include +#include -#include "LString.h" -#include /** The latest documents loaded. This class takes care of the last .lyx files used by the LyX user. It @@ -30,20 +27,20 @@ class LastFiles : boost::noncopyable { public: /// - typedef std::deque Files; + typedef std::deque Files; /// typedef Files::const_iterator const_iterator; - + /** Read the lastfiles file. @param file The file to read the lastfiles form. @param dostat Whether to check for file existance. @param num number of files to remember. */ explicit - LastFiles(string const & file, + LastFiles(std::string const & file, bool dostat = true, unsigned int num = 4); - + /** Insert #file# into the list. This funtion inserts #file# into the last files list. If the file already exist it is moved to the top of the list, else exist it @@ -51,18 +48,18 @@ public: file in the list is popped from the end. @param file the file to insert in the list. */ - void newFile(string const & file); + void newFile(std::string const & file); /** Writes the lastfiles table to disk. Writes one file on each line, this way we can at least have some special chars (e.g. space), but newline in filenames are thus not allowed. @param file the file we write the lastfiles list to. */ - void writeFile(string const & file) const; + void writeFile(std::string const & file) const; /** Return file #n# in the lastfiles list. @param n number in the list to get */ - string const operator[](unsigned int n) const; + std::string const operator[](unsigned int n) const; /// Iterator to the beginning of the list. Files::const_iterator begin() const { return files.begin(); } /// Iterator to the end of the list. @@ -84,14 +81,14 @@ private: */ ABSOLUTEMAXLASTFILES = 20 }; - + /// a list of lastfiles Files files; /// number of files in the lastfiles list. unsigned int num_files; /// check for file existance or not. bool dostat; - + /** Read the lastfiles file. Reads the #.lyx_lastfiles# at the beginning of the LyX session. This will read the lastfiles file (usually #.lyx_lastfiles#). It @@ -99,10 +96,10 @@ private: LastFiles has been initialized with #dostat = false#. @param file the file containing the lastfiles. */ - void readFile(string const & file); + void readFile(std::string const & file); /** Used by the constructor to set the number of stored last files. @param num the number of lastfiles to set. */ - void setNumberOfFiles(unsigned int num); + void setNumberOfFiles(unsigned int num); }; #endif