OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
globals.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  * Copyright 2006-2017 The Apache Software Foundation.
20  * https://github.com/apache/thrift
21  */
22 
23 #ifndef T_GLOBALS_H
24 #define T_GLOBALS_H
25 
26 #include <set>
27 #include <queue>
28 #include <stack>
29 #include <vector>
30 #include <string>
31 
46 class t_program;
47 class t_scope;
48 class t_type;
49 
54 enum PARSE_MODE {
55  INCLUDES = 1,
56  PROGRAM = 2
57 };
58 
62 extern int g_strict;
63 
68 extern t_program* g_program;
69 
74 extern t_type* g_type_void;
75 extern t_type* g_type_string;
76 #ifdef SANDESH
77 extern t_type* g_type_static_const_string;
78 extern t_type* g_type_sandesh_system;
79 extern t_type* g_type_sandesh_request;
80 extern t_type* g_type_sandesh_response;
81 extern t_type* g_type_sandesh_trace;
82 extern t_type* g_type_sandesh_trace_object;
83 extern t_type* g_type_sandesh_buffer;
84 extern t_type* g_type_sandesh_uve;
85 extern t_type* g_type_sandesh_dynamic_uve;
86 extern t_type* g_type_sandesh_alarm;
87 extern t_type* g_type_sandesh_object;
88 extern t_type* g_type_sandesh_flow;
89 extern t_type* g_type_sandesh_session;
90 extern t_type* g_type_u16;
91 extern t_type* g_type_u32;
92 extern t_type* g_type_u64;
93 extern t_type* g_type_ipv4;
94 extern t_type* g_type_ipaddr;
95 extern t_type* g_type_xml;
96 extern t_type* g_type_uuid_t;
97 
98 #endif
99 extern t_type* g_type_binary;
100 extern t_type* g_type_slist;
101 extern t_type* g_type_bool;
102 extern t_type* g_type_byte;
103 extern t_type* g_type_i16;
104 extern t_type* g_type_i32;
105 extern t_type* g_type_i64;
106 extern t_type* g_type_double;
107 
111 extern t_scope* g_scope;
112 
116 extern t_scope* g_parent_scope;
117 
121 extern std::string g_parent_prefix;
122 
126 extern PARSE_MODE g_parse_mode;
127 
131 extern char* g_time_str;
132 
136 extern char* g_doctext;
137 
141 extern int g_doctext_lineno;
142 
147  INVALID = 0,
148  STILL_CANDIDATE = 1, // the text may or may not be the program doctext
149  ALREADY_PROCESSED = 2, // doctext has been used and is no longer available
150  ABSOLUTELY_SURE = 3, // this is the program doctext
151  NO_PROGRAM_DOCTEXT = 4 // there is no program doctext
152 };
153 
154 
158 extern char* g_program_doctext_candidate;
159 extern int g_program_doctext_lineno;
161 
175 extern int g_allow_neg_field_keys;
176 
184 extern int g_allow_64bit_consts;
185 
186 #endif
Definition: t_type.h:48
PARSE_MODE
Definition: globals.h:54
PROGDOCTEXT_STATUS
Definition: globals.h:146
PROGDOCTEXT_STATUS g_program_doctext_status