Lumiera  0.pre.03
»edit your freedom«
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 error {
40  LUMIERA_ERROR_DEFINE (CAPABILITY_QUERY, "unresolvable capability query");
41  }
42  namespace query {
43 
44 
45 
46  } // namespace query
47 
48 
49 
50 
51 
52  namespace query {
53  namespace { // local definitions: implementing a backdoor for tests
54  QueryKey fakeBypass;
55  }
56 
57  void setFakeBypass(QueryKey const& q) { fakeBypass = q; }
58  bool isFakeBypass (QueryKey const& q) { return q == fakeBypass; }
60 
61  }// namespace query
62 } // namespace lumiera
void setFakeBypass(lumiera::QueryKey const &q)
backdoor for tests: the next config query with this query string will magically succeed with every ca...
Basic and generic representation of an internal query.
Wrapper for indexing and ordering.
Definition: query.hpp:397
Lumiera error handling (C++ interface).
Lumiera public interface.
Definition: advice.cpp:113
Interface for accessing rule based configuration.
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.
Definition: error.h:80