X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fvc-backend.h;h=d487b11c7785a95ac93f878d8b0cee43df7b0d57;hb=2c832e6578ae146a2b51967cbc78cd640959f196;hp=95c084975056dbbe49fbc2d672b9075f0531974d;hpb=9bc730abdb60f9c7959f7d2bba5601e023983c23;p=lyx.git diff --git a/src/vc-backend.h b/src/vc-backend.h index 95c0849750..d487b11c77 100644 --- a/src/vc-backend.h +++ b/src/vc-backend.h @@ -1,17 +1,23 @@ // -*- C++ -*- /** * \file vc-backend.h - * Copyright 1995-2002 the LyX Team - * Read the file COPYING + * 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 VC_BACKEND_H #define VC_BACKEND_H -#include "LString.h" +#include "support/filename.h" + +#include + + +namespace lyx { class Buffer; @@ -27,9 +33,9 @@ public: virtual ~VCS() {} /// register a file for version control - virtual void registrer(string const & msg) = 0; + virtual void registrer(std::string const & msg) = 0; /// check in the current revision - virtual void checkIn(string const & msg) = 0; + virtual void checkIn(std::string const & msg) = 0; /// check out for editing virtual void checkOut() = 0; /// revert current edits @@ -40,15 +46,15 @@ public: * getLog - read the revision log into the given file * @param fname file name to read into */ - virtual void getLog(string const &) = 0; + virtual void getLog(support::FileName const &) = 0; /// return the current version description - virtual string const versionString() const = 0; + virtual std::string const versionString() const = 0; /// return the current version - string const & version() const { + std::string const & version() const { return version_; } /// return the user who has locked the file - string const & locker() const { return locker_; } + std::string const & locker() const { return locker_; } /// set the owning buffer void owner(Buffer * b) { owner_ = b; } /// return the owning buffer @@ -65,13 +71,13 @@ protected: * @param path the path from which to execute * @return exit status */ - static int doVCCommand(string const & cmd, string const & path); + static int doVCCommand(std::string const & cmd, std::string const & path); /** * The master VC file. For RCS this is *,v or RCS/ *,v. master should * have full path. */ - string master_; + support::FileName master_; /// The status of the VC controlled file. VCStatus vcstatus; @@ -80,10 +86,10 @@ protected: * The version of the VC file. I am not sure if this can be a * string or if it must be a float/int. */ - string version_; + std::string version_; /// The user currently keeping the lock on the VC file. - string locker_; + std::string locker_; /// The buffer using this VC Buffer * owner_; }; @@ -94,16 +100,16 @@ class RCS : public VCS { public: explicit - RCS(string const & m); + RCS(support::FileName const & m); /// return the revision file for the given file, if found - static string const find_file(string const & file); + static support::FileName const find_file(support::FileName const & file); - static void retrieve(string const & file); + static void retrieve(support::FileName const & file); - virtual void registrer(string const & msg); + virtual void registrer(std::string const & msg); - virtual void checkIn(string const & msg); + virtual void checkIn(std::string const & msg); virtual void checkOut(); @@ -111,9 +117,9 @@ public: virtual void undoLast(); - virtual void getLog(string const &); + virtual void getLog(support::FileName const &); - virtual string const versionString() const { + virtual std::string const versionString() const { return "RCS: " + version_; } @@ -127,14 +133,14 @@ class CVS : public VCS { public: /// explicit - CVS(string const & m, string const & f); + CVS(support::FileName const & m, support::FileName const & f); /// return the revision file for the given file, if found - static string const find_file(string const & file); + static support::FileName const find_file(support::FileName const & file); - virtual void registrer(string const & msg); + virtual void registrer(std::string const & msg); - virtual void checkIn(string const & msg); + virtual void checkIn(std::string const & msg); virtual void checkOut(); @@ -142,9 +148,9 @@ public: virtual void undoLast(); - virtual void getLog(string const &); + virtual void getLog(support::FileName const &); - virtual string const versionString() const { + virtual std::string const versionString() const { return "CVS: " + version_; } @@ -152,6 +158,9 @@ protected: virtual void scanMaster(); private: - string file_; + support::FileName file_; }; + +} // namespace lyx + #endif // VCBACKEND_H