X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsCache.h;h=bf4a4ffe8058d93188cf089f0e4eb0c2acaf5564;hb=f7b1c86393d890d5d473279d88e26bb78f8c1275;hp=0f95801d097049c0ac657beb35b490d2dd2c6573;hpb=a674f70d4a013e69a88343e5b6d13357d8a33493;p=lyx.git diff --git a/src/graphics/GraphicsCache.h b/src/graphics/GraphicsCache.h index 0f95801d09..bf4a4ffe80 100644 --- a/src/graphics/GraphicsCache.h +++ b/src/graphics/GraphicsCache.h @@ -1,34 +1,38 @@ // -*- C++ -*- /** - * \file GraphicsCache.h - * Copyright 2002 the LyX Team - * Read the file COPYING + * \file GraphicsCache.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author Baruch Even - * \author Angus Leeming + * \author Baruch Even + * \author Angus Leeming * - * grfx::Cache is the manager of the image cache. - * It is responsible for creating the grfx::CacheItem's and maintaining them. + * Full author contact details are available in file CREDITS. * - * grfx::Cache is a singleton class. It is possible to have only one - * instance of it at any moment. + * lyx::graphics::Cache is the manager of the image cache. + * It is responsible for creating the lyx::graphics::CacheItem's + * and maintaining them. + * + * lyx::graphics::Cache is a singleton class. It is possible to have only one + * instance of it at any moment. */ #ifndef GRAPHICSCACHE_H #define GRAPHICSCACHE_H -#ifdef __GNUG__ -#pragma interface -#endif - -#include "LString.h" -#include -#include +#include #include #include +#include +#include + + +namespace lyx { + +namespace support { class FileName; } -namespace grfx { +namespace graphics { class CacheItem; @@ -42,22 +46,22 @@ public: * Other formats can be loaded if a converter to a loadable format * can be defined. */ - std::vector loadableFormats() const; + std::vector loadableFormats() const; /// Add a graphics file to the cache. - void add(string const & file); + void add(support::FileName const & file) const; /// Remove a file from the cache. - void remove(string const & file); + void remove(support::FileName const & file) const; /// Returns \c true if the file is in the cache. - bool inCache(string const & file) const; + bool inCache(support::FileName const & file) const; /** Get the cache item associated with file. * Returns an empty container if there is no such item. * * IMPORTANT: whatever uses an image must make a local copy of this - * GraphicPtr. The boost::shared_ptr<>::use_count() function is + * ItemPtr. The boost::shared_ptr<>::use_count() function is * used to ascertain whether or not to remove the item from the cache * when remove(file) is called. * @@ -65,7 +69,7 @@ public: */ typedef boost::shared_ptr ItemPtr; /// - ItemPtr const item(string const & file) const; + ItemPtr const item(support::FileName const & file) const; private: /** Make the c-tor, d-tor private so we can control how many objects @@ -81,6 +85,7 @@ private: boost::scoped_ptr const pimpl_; }; -} // namespace grfx +} // namespace graphics +} // namespace lyx #endif // GRAPHICSCACHE_H