Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
config-rules.cpp
Go to the documentation of this file.
1 
2 /*
3  ConfigRules - interface for rule based configuration
4 
5  Copyright (C) Lumiera.org
6  2008, Hermann Vosseler <Ichthyostega@web.de>
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of
11  the License, or (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 
22 * *****************************************************/
23 
24 
31 #include "lib/error.hpp"
32 #include "common/query.hpp"
33 #include "common/config-rules.hpp"
34 
35 using lumiera::QueryKey;
36 
37 
38 namespace lumiera {
39  namespace query {
40 
41  LUMIERA_ERROR_DEFINE (CAPABILITY_QUERY, "unresolvable capability query");
42 
43 
44  } // namespace query
45 
46 
47 
48 
49 
50  namespace query {
51  namespace { // local definitions: implementing a backdoor for tests
52  QueryKey fakeBypass;
53  }
54 
55  void setFakeBypass(QueryKey const& q) { fakeBypass = q; }
56  bool isFakeBypass (QueryKey const& q) { return q == fakeBypass; }
58 
59  }// namespace query
60 } // namespace lumiera
Basic and generic representation of an internal query.
LUMIERA_ERROR_DEFINE(CAPABILITY_QUERY,"unresolvable capability query")
void setFakeBypass(lumiera::QueryKey const &q)
backdoor for tests: the next config query with this query string will magically succeed with every ca...
bool isFakeBypass(lumiera::QueryKey const &q)
Wrapper for indexing and ordering.
Definition: query.hpp:397
Lumiera error handling (C++ interface).
Lumiera public interface.
Interface for accessing rule based configuration.