diff options
Diffstat (limited to 'dviware/dvi2bitmap/KarlPathSearcher.h')
-rw-r--r-- | dviware/dvi2bitmap/KarlPathSearcher.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dviware/dvi2bitmap/KarlPathSearcher.h b/dviware/dvi2bitmap/KarlPathSearcher.h new file mode 100644 index 0000000000..acaf3b087b --- /dev/null +++ b/dviware/dvi2bitmap/KarlPathSearcher.h @@ -0,0 +1,33 @@ +/* This file is part of dvi2bitmap; see README for copyrights and licence */ + +/* This is merely an interface to the kpathsea library */ +#include "verbosity.h" + +/** + * Abstracts access to the <code>kpathsea</code> library. This class + * provides at singleton object which can service requests to the library. + */ +class KarlPathSearcher { + public: + const char *find (const char *font, int resolution); + static KarlPathSearcher* getInstance(const char *name=0, + const int basedpi=0); + static verbosities verbosity (const verbosities level); + static const char *version_string (void); + /** + * Sets the name of the invoking program. This acts as the + * default for the initialising <code>name</code> parameter to + * method {@link #getInstance} + * @param name the name of the invoking program + */ + static void setProgramName(const char* name) { + default_program_name_ = name; + } + + private: + ~KarlPathSearcher(); + KarlPathSearcher(const char *name, const int basedpi); + static verbosities verbosity_; + static KarlPathSearcher* instance_; + static const char* default_program_name_; +}; |