1999-09-27 18:44:28 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/* This file is part of
|
1999-11-15 12:01:38 +00:00
|
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*
|
|
|
|
|
* LyX, The Document Processor
|
2000-03-09 03:36:48 +00:00
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
|
* Copyright 1995-2000 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*
|
2000-03-09 03:36:48 +00:00
|
|
|
|
* This file is Copyright 1996-2000
|
1999-09-27 18:44:28 +00:00
|
|
|
|
* Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
*
|
1999-11-15 12:01:38 +00:00
|
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
|
*/
|
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
|
#ifndef DEP_TABLE_H
|
|
|
|
|
#define DEP_TABLE_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
#include "LString.h"
|
1999-11-04 01:40:20 +00:00
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-03-28 02:18:55 +00:00
|
|
|
|
using std::map;
|
|
|
|
|
using std::pair;
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
|
|
|
|
class DepTable {
|
|
|
|
|
public:
|
|
|
|
|
/** This one is a little bit harder since we need the absolute
|
|
|
|
|
filename. Should we insert files with .sty .cls etc as
|
|
|
|
|
extension? */
|
1999-11-04 01:40:20 +00:00
|
|
|
|
void insert(string const & f,
|
1999-09-27 18:44:28 +00:00
|
|
|
|
bool upd = false,
|
|
|
|
|
unsigned long one = 0,
|
|
|
|
|
unsigned long two = 0);
|
|
|
|
|
///
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
|
|
///
|
1999-11-26 06:57:35 +00:00
|
|
|
|
void write(string const & f) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
1999-11-26 06:57:35 +00:00
|
|
|
|
void read(string const & f);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
/// returns true if any of the files has changed
|
1999-11-26 06:57:35 +00:00
|
|
|
|
bool sumchange() const;
|
1999-11-04 01:40:20 +00:00
|
|
|
|
/// return true if fil has changed.
|
1999-11-26 06:57:35 +00:00
|
|
|
|
bool haschanged(string const & fil) const;
|
1999-11-04 01:40:20 +00:00
|
|
|
|
/// return true if a file with extension ext has changed.
|
1999-11-26 06:57:35 +00:00
|
|
|
|
bool extchanged(string const & ext) const;
|
|
|
|
|
///
|
|
|
|
|
bool exist(string const & fil) const;
|
|
|
|
|
///
|
|
|
|
|
void remove_files_with_extension(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
private:
|
|
|
|
|
///
|
2000-03-28 02:18:55 +00:00
|
|
|
|
typedef map<string,
|
|
|
|
|
pair<unsigned long, unsigned long> > DepList;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
///
|
1999-11-04 01:40:20 +00:00
|
|
|
|
DepList deplist;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|