1 /* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
2  * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
3 
4 #ifndef __BGL_HH_INCLUDED__
5 #define __BGL_HH_INCLUDED__
6 
7 #include "dictionary.hh"
8 
9 /// Support for the Babylon's .bgl dictionaries.
10 namespace Bgl {
11 
12 using std::vector;
13 using std::string;
14 
15 /// Goes through the given list of file names, trying each one as a possible
16 /// dictionary. Upon finding one, creates a corresponding dictionary instance.
17 /// As a result, a list of dictionaries is created.
18 /// indicesDir indicates a directory where index files can be created, should
19 /// there be need for them. The index file name would be the same as the
20 /// dictionary's id, made by makeDictionaryId() from the list of file names.
21 /// Any exception thrown would terminate the program with an error.
22 vector< sptr< Dictionary::Class > > makeDictionaries(
23                                     vector< string > const & fileNames,
24                                     string const & indicesDir,
25                                     Dictionary::Initializing & )
26   THROW_SPEC( std::exception );
27 
28 }
29 
30 #endif
31