Code

Filters. Custom predefined filters update and new ABC filters.
[inkscape.git] / src / svg / test-stubs.cpp
1 /*
2  * Stub out functions when building tests
3  *
4  * Authors:
5  *   Kees Cook <kees@outflux.net>
6  *
7  * Copyright (C) 2007 authors
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
13 #ifdef HAVE_CONFIG_H
14 # include "config.h"
15 #endif
17 #include "svg/test-stubs.h"
18 #include <map>
19 #include <string>
21 std::map<std::string,long long int> int_prefs;
23 void
24 prefs_set_int_attribute(gchar const *path, gchar const *attr, long long int val)
25 {
26     int_prefs[std::string(path) + '/' + std::string(attr)] = val;
27 }
29 long long int
30 prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def)
31 {
32     std::map<std::string,long long int>::const_iterator it=int_prefs.find(std::string(path) + '/' + std::string(attr));
33     long long int ret = it==int_prefs.end() ? def : it->second;
34     return ret;
35 }
37 /*
38   Local Variables:
39   mode:c++
40   c-file-style:"stroustrup"
41   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
42   indent-tabs-mode:nil
43   fill-column:99
44   End:
45 */
46 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :