00001 /* 00002 ConfigRules - interface for rule based configuration 00003 00004 Copyright (C) Lumiera.org 00005 2008, Hermann Vosseler <Ichthyostega@web.de> 00006 00007 This program is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License as 00009 published by the Free Software Foundation; either version 2 of the 00010 License, or (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 00021 * *****************************************************/ 00022 00023 00024 #include "common/configrules.hpp" 00025 #include "common/query/fake-configrules.hpp" 00026 //#include "lib/util.hpp" 00027 #include "include/nobugcfg.h" 00028 00029 00030 00031 namespace lumiera 00032 { 00033 00034 namespace query 00035 { 00036 00037 LUMIERA_ERROR_DEFINE (CAPABILITY_QUERY, "unresolvable capability query"); 00038 00039 00040 00041 } // namespace query 00042 00043 namespace { 00044 00046 singleton::UseSubclass<query::MockConfigRules> typeinfo; 00047 } 00048 00049 00051 SingletonSub<ConfigRules> ConfigRules::instance (typeinfo); 00052 00053 00054 00055 00056 00057 namespace query 00058 { 00059 namespace // local definitions: implementing a backdoor for tests 00060 { 00061 string fakeBypass; 00062 } 00063 00064 void setFakeBypass(string const& q) { fakeBypass = q; } 00065 bool isFakeBypass (string const& q) { return q == fakeBypass; } 00066 00067 } // namespace query 00068 00069 00070 00071 } // namespace lumiera
1.5.6