Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
search_options.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
22 /*
23  * search_options.h
24  *
25  * Created on: 24 Dec 2015
26  * Author: billy
27  */
28 
29 #ifndef SEARCH_OPTIONS_H_
30 #define SEARCH_OPTIONS_H_
31 
32 
33 
34 /*
35  * The following preprocessor macros allow us to declare
36  * and define the variables in the same place. By default,
37  * they will expand to
38  *
39  * extern const char *SERVICE_NAME_S;
40  *
41  * however if ALLOCATE_SEARCH_TAGS is defined then it will
42  * become
43  *
44  * const char *SERVICE_NAME_S = "path";
45  *
46  * ALLOCATE_SEARCH_TAGS must be defined only once prior to
47  * including this header file. Currently this happens in
48  * search_options.c.
49  */
50 
51 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 
53 #ifdef ALLOCATE_SEARCH_TAGS
54  #define SEARCH_PREFIX GRASSROOTS_UTIL_API
55  #define SEARCH_VAL(x) = x
56 #else
57  #define SEARCH_PREFIX extern GRASSROOTS_UTIL_API
58  #define SEARCH_VAL(x)
59 #endif
60 
61 #endif /* ifndef DOXYGEN_SHOULD_SKIP_THIS */
62 
69 SEARCH_PREFIX const char *SO_RANGE_S SEARCH_VAL("in");
70 
71 
77 SEARCH_PREFIX const char *SO_EQUALS_S SEARCH_VAL("=");
78 
79 
85 SEARCH_PREFIX const char *SO_LESS_THAN_S SEARCH_VAL("<");
86 
87 
93 SEARCH_PREFIX const char *SO_LESS_THAN_OR_EQUALS_S SEARCH_VAL("<=");
94 
95 
101 SEARCH_PREFIX const char *SO_GREATER_THAN_S SEARCH_VAL(">");
102 
108 SEARCH_PREFIX const char *SO_GREATER_THAN_OR_EQUALS_S SEARCH_VAL(">=");
109 
115 SEARCH_PREFIX const char *SO_NOT_EQUALS_S SEARCH_VAL("!=");
116 
122 SEARCH_PREFIX const char *SO_LIKE_S SEARCH_VAL("like");
123 
129 SEARCH_PREFIX const char *SO_CASE_INSENSITIVE_S SEARCH_VAL("insensitive");
130 
131 
132 
133 #endif /* SEARCH_OPTIONS_H_ */
SO_LESS_THAN_OR_EQUALS_S
const char * SO_LESS_THAN_OR_EQUALS_S
The identifier for "less than or equals" search operations.
Definition: search_options.h:93
SO_CASE_INSENSITIVE_S
const char * SO_CASE_INSENSITIVE_S
The identifier for specifying case-insensitive searches.
Definition: search_options.h:129
SO_NOT_EQUALS_S
const char * SO_NOT_EQUALS_S
The identifier for "not equals" search operations.
Definition: search_options.h:115
SO_LIKE_S
const char * SO_LIKE_S
The identifier for "like" search operations.
Definition: search_options.h:122
SO_GREATER_THAN_S
const char * SO_GREATER_THAN_S
The identifier for "greater than" search operations.
Definition: search_options.h:101
SO_GREATER_THAN_OR_EQUALS_S
const char * SO_GREATER_THAN_OR_EQUALS_S
The identifier for "greater than or equals" search operations.
Definition: search_options.h:108
SO_LESS_THAN_S
const char * SO_LESS_THAN_S
The identifier for "less than" search operations.
Definition: search_options.h:85
SO_EQUALS_S
const char * SO_EQUALS_S
The identifier for equality search operations.
Definition: search_options.h:77
SO_RANGE_S
const char * SO_RANGE_S
The identifier for specifying a search for any value within a given set of values.
Definition: search_options.h:69