

add basic interface
@e65e7039a6e964443a42171867790e9ea2a79af5
+++ .vscode/c_cpp_properties.json
... | ... | @@ -0,0 +1,20 @@ |
1 | +{ | |
2 | + "configurations": [ | |
3 | + { | |
4 | + "browse": { | |
5 | + "databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db", | |
6 | + "limitSymbolsToIncludedHeaders": false | |
7 | + }, | |
8 | + "includePath": [ | |
9 | + "/opt/ros/galactic/include/**", | |
10 | + "/usr/include/**" | |
11 | + ], | |
12 | + "name": "ROS", | |
13 | + "intelliSenseMode": "clang-x64", | |
14 | + "compilerPath": "/usr/bin/gcc", | |
15 | + "cStandard": "c99", | |
16 | + "cppStandard": "c++17" | |
17 | + } | |
18 | + ], | |
19 | + "version": 4 | |
20 | +} |
+++ .vscode/cmake-format
... | ... | @@ -0,0 +1,70 @@ |
1 | +# ----------------------------- | |
2 | +# Options effecting formatting. | |
3 | +# ----------------------------- | |
4 | +with section("format"): | |
5 | + line_width = 80 | |
6 | + tab_size = 2 | |
7 | + use_tabchars = False | |
8 | + fractional_tab_policy = 'round-up' | |
9 | + separate_ctrl_name_with_space = False | |
10 | + separate_fn_name_with_space = False | |
11 | + dangle_parens = True | |
12 | + dangle_align = 'prefix' | |
13 | + enable_sort = True | |
14 | + | |
15 | +# ---------------------------- | |
16 | +# Options affecting the linter | |
17 | +# ---------------------------- | |
18 | +with section("lint"): | |
19 | + | |
20 | + # a list of lint codes to disable | |
21 | + disabled_codes = ['C0113'] | |
22 | + | |
23 | + # regular expression pattern describing valid function names | |
24 | + function_pattern = '[0-9a-z_]+' | |
25 | + | |
26 | + # regular expression pattern describing valid macro names | |
27 | + macro_pattern = '[0-9A-Z_]+' | |
28 | + | |
29 | + # regular expression pattern describing valid names for variables with global | |
30 | + # (cache) scope | |
31 | + global_var_pattern = '[A-Z][0-9A-Z_]+' | |
32 | + | |
33 | + # regular expression pattern describing valid names for variables with global | |
34 | + # scope (but internal semantic) | |
35 | + internal_var_pattern = '_[A-Z][0-9A-Z_]+' | |
36 | + | |
37 | + # regular expression pattern describing valid names for variables with local | |
38 | + # scope | |
39 | + local_var_pattern = '[a-z][a-z0-9_]+' | |
40 | + | |
41 | + # regular expression pattern describing valid names for privatedirectory | |
42 | + # variables | |
43 | + private_var_pattern = '_[0-9a-z_]+' | |
44 | + | |
45 | + # regular expression pattern describing valid names for public directory | |
46 | + # variables | |
47 | + public_var_pattern = '[A-Z][0-9A-Z_]+' | |
48 | + | |
49 | + # regular expression pattern describing valid names for function/macro | |
50 | + # arguments and loop variables. | |
51 | + argument_var_pattern = '[a-z][a-z0-9_]+' | |
52 | + | |
53 | + # regular expression pattern describing valid names for keywords used in | |
54 | + # functions or macros | |
55 | + keyword_pattern = '[A-Z][0-9A-Z_]+' | |
56 | + | |
57 | + # In the heuristic for C0201, how many conditionals to match within a loop in | |
58 | + # before considering the loop a parser. | |
59 | + max_conditionals_custom_parser = 2 | |
60 | + | |
61 | + # Require at least this many newlines between statements | |
62 | + min_statement_spacing = 1 | |
63 | + | |
64 | + # Require no more than this many newlines between statements | |
65 | + max_statement_spacing = 2 | |
66 | + max_returns = 6 | |
67 | + max_branches = 12 | |
68 | + max_arguments = 5 | |
69 | + max_localvars = 15 | |
70 | + max_statements = 50 |
+++ .vscode/cspell.json
... | ... | @@ -0,0 +1,18 @@ |
1 | +{ | |
2 | + "version": "0.2", | |
3 | + "language": "en", | |
4 | + "words": [ | |
5 | + "rclcpp", | |
6 | + "m12watanabe1a", | |
7 | + "rosdistro", | |
8 | + "distro", | |
9 | + "colcon", | |
10 | + "roboteq", | |
11 | + "rviz", | |
12 | + "xacro", | |
13 | + "urdf", | |
14 | + "bringup", | |
15 | + "dualsense", | |
16 | + "dualshock" | |
17 | + ] | |
18 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ .vscode/settings.json
... | ... | @@ -0,0 +1,102 @@ |
1 | +{ | |
2 | + "python.autoComplete.extraPaths": [ | |
3 | + "/opt/ros/galactic/lib/python3.8/site-packages", | |
4 | + ], | |
5 | + "python.analysis.extraPaths": [ | |
6 | + "/opt/ros/galactic/lib/python3.8/site-packages" | |
7 | + ], | |
8 | + "[cpp]": { | |
9 | + "editor.tabSize": 2, | |
10 | + "editor.defaultFormatter": "zachflower.uncrustify" | |
11 | + }, | |
12 | + "[xml]": { | |
13 | + "editor.tabSize": 2, | |
14 | + "editor.autoClosingBrackets": "always", | |
15 | + "files.trimFinalNewlines": true, | |
16 | + "editor.defaultFormatter": "redhat.vscode-xml", | |
17 | + }, | |
18 | + "uncrustify.configPath.linux": ".vscode/uncrustify.cfg", | |
19 | + "xml.format.splitAttributes": true, | |
20 | + "editor.formatOnSave": true, | |
21 | + "cmakeFormat.args": [ | |
22 | + "--config-file", | |
23 | + ".vscode/cmake-format" | |
24 | + ], | |
25 | + "python.linting.enabled": true, | |
26 | + "python.linting.flake8Enabled": true, | |
27 | + "files.associations": { | |
28 | + "*.ui": "xml", | |
29 | + "qapplication": "cpp", | |
30 | + "chrono": "cpp", | |
31 | + "cctype": "cpp", | |
32 | + "clocale": "cpp", | |
33 | + "cmath": "cpp", | |
34 | + "csignal": "cpp", | |
35 | + "cstddef": "cpp", | |
36 | + "cstdio": "cpp", | |
37 | + "cstdlib": "cpp", | |
38 | + "cstring": "cpp", | |
39 | + "ctime": "cpp", | |
40 | + "cwchar": "cpp", | |
41 | + "array": "cpp", | |
42 | + "atomic": "cpp", | |
43 | + "*.tcc": "cpp", | |
44 | + "condition_variable": "cpp", | |
45 | + "cstdint": "cpp", | |
46 | + "list": "cpp", | |
47 | + "unordered_map": "cpp", | |
48 | + "unordered_set": "cpp", | |
49 | + "vector": "cpp", | |
50 | + "exception": "cpp", | |
51 | + "algorithm": "cpp", | |
52 | + "functional": "cpp", | |
53 | + "iterator": "cpp", | |
54 | + "map": "cpp", | |
55 | + "memory": "cpp", | |
56 | + "memory_resource": "cpp", | |
57 | + "optional": "cpp", | |
58 | + "random": "cpp", | |
59 | + "ratio": "cpp", | |
60 | + "set": "cpp", | |
61 | + "string": "cpp", | |
62 | + "string_view": "cpp", | |
63 | + "system_error": "cpp", | |
64 | + "tuple": "cpp", | |
65 | + "type_traits": "cpp", | |
66 | + "utility": "cpp", | |
67 | + "future": "cpp", | |
68 | + "initializer_list": "cpp", | |
69 | + "iosfwd": "cpp", | |
70 | + "iostream": "cpp", | |
71 | + "istream": "cpp", | |
72 | + "limits": "cpp", | |
73 | + "mutex": "cpp", | |
74 | + "new": "cpp", | |
75 | + "ostream": "cpp", | |
76 | + "shared_mutex": "cpp", | |
77 | + "sstream": "cpp", | |
78 | + "stdexcept": "cpp", | |
79 | + "streambuf": "cpp", | |
80 | + "thread": "cpp", | |
81 | + "cinttypes": "cpp", | |
82 | + "typeindex": "cpp", | |
83 | + "typeinfo": "cpp", | |
84 | + "variant": "cpp", | |
85 | + "bit": "cpp", | |
86 | + "cstdarg": "cpp", | |
87 | + "cwctype": "cpp", | |
88 | + "bitset": "cpp", | |
89 | + "codecvt": "cpp", | |
90 | + "complex": "cpp", | |
91 | + "deque": "cpp", | |
92 | + "forward_list": "cpp", | |
93 | + "numeric": "cpp", | |
94 | + "fstream": "cpp", | |
95 | + "iomanip": "cpp", | |
96 | + "*.ipp": "cpp", | |
97 | + "core": "cpp", | |
98 | + "strstream": "cpp", | |
99 | + "cfenv": "cpp", | |
100 | + "valarray": "cpp" | |
101 | + } | |
102 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ .vscode/uncrustify.cfg
... | ... | @@ -0,0 +1,2308 @@ |
1 | +# Uncrustify-0.68 | |
2 | + | |
3 | +# | |
4 | +# General options | |
5 | +# | |
6 | + | |
7 | +# The type of line endings. Default=Auto. | |
8 | +newlines = auto # auto/lf/crlf/cr | |
9 | + | |
10 | +# The original size of tabs in the input. Default=8. | |
11 | +input_tab_size = 8 # unsigned number | |
12 | + | |
13 | +# The size of tabs in the output (only used if align_with_tabs=true). Default=8. | |
14 | +output_tab_size = 8 # unsigned number | |
15 | + | |
16 | +# The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn). | |
17 | +string_escape_char = 92 # unsigned number | |
18 | + | |
19 | +# Alternate string escape char for Pawn. Only works right before the quote char. | |
20 | +string_escape_char2 = 0 # unsigned number | |
21 | + | |
22 | +# Replace tab characters found in string literals with the escape sequence \t instead. | |
23 | +string_replace_tab_chars = false # false/true | |
24 | + | |
25 | +# Allow interpreting '>=' and '>>=' as part of a template in 'void f(list<list<B>>=val);'. | |
26 | +# If True, 'assert(x<0 && y>=3)' will be broken. Default=False | |
27 | +# Improvements to template detection may make this option obsolete. | |
28 | +tok_split_gte = false # false/true | |
29 | + | |
30 | +# Override the default ' *INDENT-OFF*' in comments for disabling processing of part of the file. | |
31 | +disable_processing_cmt = " *INDENT-OFF*" # string | |
32 | + | |
33 | +# Override the default ' *INDENT-ON*' in comments for enabling processing of part of the file. | |
34 | +enable_processing_cmt = " *INDENT-ON*" # string | |
35 | + | |
36 | +# Enable parsing of digraphs. Default=False. | |
37 | +enable_digraphs = false # false/true | |
38 | + | |
39 | +# Control what to do with the UTF-8 BOM (recommend 'remove'). | |
40 | +utf8_bom = ignore # ignore/add/remove/force | |
41 | + | |
42 | +# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8. | |
43 | +utf8_byte = false # false/true | |
44 | + | |
45 | +# Force the output encoding to UTF-8. | |
46 | +utf8_force = false # false/true | |
47 | + | |
48 | +# | |
49 | +# Spacing options | |
50 | +# | |
51 | + | |
52 | +# Add or remove space around arithmetic operator '+', '-', '/', '*', etc | |
53 | +# also '>>>' '<<' '>>' '%' '|'. | |
54 | +sp_arith = force # ignore/add/remove/force | |
55 | + | |
56 | +# Add or remove space around arithmetic operator '+' and '-'. Overrides sp_arith | |
57 | +sp_arith_additive = force # ignore/add/remove/force | |
58 | + | |
59 | +# Add or remove space around assignment operator '=', '+=', etc. | |
60 | +sp_assign = force # ignore/add/remove/force | |
61 | + | |
62 | +# Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign. | |
63 | +sp_cpp_lambda_assign = ignore # ignore/add/remove/force | |
64 | + | |
65 | +# Add or remove space after the capture specification in C++11 lambda. | |
66 | +sp_cpp_lambda_paren = ignore # ignore/add/remove/force | |
67 | + | |
68 | +# Add or remove space around assignment operator '=' in a prototype. | |
69 | +sp_assign_default = ignore # ignore/add/remove/force | |
70 | + | |
71 | +# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. | |
72 | +sp_before_assign = ignore # ignore/add/remove/force | |
73 | + | |
74 | +# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. | |
75 | +sp_after_assign = ignore # ignore/add/remove/force | |
76 | + | |
77 | +# Add or remove space in 'NS_ENUM ('. | |
78 | +sp_enum_paren = ignore # ignore/add/remove/force | |
79 | + | |
80 | +# Add or remove space around assignment '=' in enum. | |
81 | +sp_enum_assign = ignore # ignore/add/remove/force | |
82 | + | |
83 | +# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. | |
84 | +sp_enum_before_assign = ignore # ignore/add/remove/force | |
85 | + | |
86 | +# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. | |
87 | +sp_enum_after_assign = ignore # ignore/add/remove/force | |
88 | + | |
89 | +# Add or remove space around assignment ':' in enum. | |
90 | +sp_enum_colon = ignore # ignore/add/remove/force | |
91 | + | |
92 | +# Add or remove space around preprocessor '##' concatenation operator. Default=Add. | |
93 | +sp_pp_concat = force # ignore/add/remove/force | |
94 | + | |
95 | +# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. | |
96 | +sp_pp_stringify = remove # ignore/add/remove/force | |
97 | + | |
98 | +# Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. | |
99 | +sp_before_pp_stringify = ignore # ignore/add/remove/force | |
100 | + | |
101 | +# Add or remove space around boolean operators '&&' and '||'. | |
102 | +sp_bool = force # ignore/add/remove/force | |
103 | + | |
104 | +# Add or remove space around compare operator '<', '>', '==', etc. | |
105 | +sp_compare = force # ignore/add/remove/force | |
106 | + | |
107 | +# Add or remove space inside '(' and ')'. | |
108 | +sp_inside_paren = ignore # ignore/add/remove/force | |
109 | + | |
110 | +# Add or remove space between nested parens: '((' vs ') )'. | |
111 | +sp_paren_paren = ignore # ignore/add/remove/force | |
112 | + | |
113 | +# Add or remove space between back-to-back parens: ')(' vs ') ('. | |
114 | +sp_cparen_oparen = ignore # ignore/add/remove/force | |
115 | + | |
116 | +# Whether to balance spaces inside nested parens. | |
117 | +sp_balance_nested_parens = false # false/true | |
118 | + | |
119 | +# Add or remove space between ')' and '{'. | |
120 | +sp_paren_brace = force # ignore/add/remove/force | |
121 | + | |
122 | +# Add or remove space between nested braces, i.e. '{{' vs '{ {'. | |
123 | +sp_brace_brace = ignore # ignore/add/remove/force | |
124 | + | |
125 | +# Add or remove space before pointer star '*'. | |
126 | +sp_before_ptr_star = force # ignore/add/remove/force | |
127 | + | |
128 | +# Add or remove space before pointer star '*' that isn't followed by a variable name | |
129 | +# If set to 'ignore', sp_before_ptr_star is used instead. | |
130 | +sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force | |
131 | + | |
132 | +# Add or remove space between pointer stars '*'. | |
133 | +sp_between_ptr_star = remove # ignore/add/remove/force | |
134 | + | |
135 | +# Add or remove space after pointer star '*', if followed by a word. | |
136 | +sp_after_ptr_star = force # ignore/add/remove/force | |
137 | + | |
138 | +# Add or remove space after pointer caret '^', if followed by a word. | |
139 | +sp_after_ptr_block_caret = ignore # ignore/add/remove/force | |
140 | + | |
141 | +# Add or remove space after pointer star '*', if followed by a qualifier. | |
142 | +sp_after_ptr_star_qualifier = ignore # ignore/add/remove/force | |
143 | + | |
144 | +# Add or remove space after a pointer star '*', if followed by a func proto/def. | |
145 | +sp_after_ptr_star_func = force # ignore/add/remove/force | |
146 | + | |
147 | +# Add or remove space after a pointer star '*', if followed by an open paren (function types). | |
148 | +sp_ptr_star_paren = ignore # ignore/add/remove/force | |
149 | + | |
150 | +# Add or remove space before a pointer star '*', if followed by a func proto/def. | |
151 | +sp_before_ptr_star_func = force # ignore/add/remove/force | |
152 | + | |
153 | +# Add or remove space before a reference sign '&'. | |
154 | +sp_before_byref = force # ignore/add/remove/force | |
155 | + | |
156 | +# Add or remove space before a reference sign '&' that isn't followed by a variable name. | |
157 | +# If set to 'ignore', sp_before_byref is used instead. | |
158 | +sp_before_unnamed_byref = ignore # ignore/add/remove/force | |
159 | + | |
160 | +# Add or remove space after reference sign '&', if followed by a word. | |
161 | +sp_after_byref = force # ignore/add/remove/force | |
162 | + | |
163 | +# Add or remove space after a reference sign '&', if followed by a func proto/def. | |
164 | +sp_after_byref_func = force # ignore/add/remove/force | |
165 | + | |
166 | +# Add or remove space before a reference sign '&', if followed by a func proto/def. | |
167 | +sp_before_byref_func = force # ignore/add/remove/force | |
168 | + | |
169 | +# Add or remove space between type and word. Default=Force. | |
170 | +sp_after_type = force # ignore/add/remove/force | |
171 | + | |
172 | +# Add or remove space between 'decltype(...)' and word. | |
173 | +sp_after_decltype = ignore # ignore/add/remove/force | |
174 | + | |
175 | +# Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. | |
176 | +sp_before_template_paren = ignore # ignore/add/remove/force | |
177 | + | |
178 | +# Add or remove space in 'template <' vs 'template<'. | |
179 | +# If set to ignore, sp_before_angle is used. | |
180 | +sp_template_angle = ignore # ignore/add/remove/force | |
181 | + | |
182 | +# Add or remove space before '<>'. | |
183 | +sp_before_angle = remove # ignore/add/remove/force | |
184 | + | |
185 | +# Add or remove space inside '<' and '>'. | |
186 | +sp_inside_angle = remove # ignore/add/remove/force | |
187 | + | |
188 | +# Add or remove space between '<>' and ':'. | |
189 | +sp_angle_colon = ignore # ignore/add/remove/force | |
190 | + | |
191 | +# Add or remove space after '<>'. | |
192 | +sp_after_angle = remove # ignore/add/remove/force | |
193 | + | |
194 | +# Add or remove space between '<>' and '(' as found in 'new List<byte>(foo);'. | |
195 | +sp_angle_paren = remove # ignore/add/remove/force | |
196 | + | |
197 | +# Add or remove space between '<>' and '()' as found in 'new List<byte>();'. | |
198 | +sp_angle_paren_empty = remove # ignore/add/remove/force | |
199 | + | |
200 | +# Add or remove space between '<>' and a word as in 'List<byte> m;' or 'template <typename T> static ...'. | |
201 | +sp_angle_word = force # ignore/add/remove/force | |
202 | + | |
203 | +# Add or remove space between '>' and '>' in '>>' (template stuff). Default=Add. | |
204 | +sp_angle_shift = remove # ignore/add/remove/force | |
205 | + | |
206 | +# Permit removal of the space between '>>' in 'foo<bar<int> >' (C++11 only). Default=False. | |
207 | +# sp_angle_shift cannot remove the space without this option. | |
208 | +sp_permit_cpp11_shift = true # false/true | |
209 | + | |
210 | +# Add or remove space before '(' of 'if', 'for', 'switch', 'while', etc. | |
211 | +sp_before_sparen = force # ignore/add/remove/force | |
212 | + | |
213 | +# Add or remove space inside if-condition '(' and ')'. | |
214 | +sp_inside_sparen = remove # ignore/add/remove/force | |
215 | + | |
216 | +# Add or remove space before if-condition ')'. Overrides sp_inside_sparen. | |
217 | +sp_inside_sparen_close = ignore # ignore/add/remove/force | |
218 | + | |
219 | +# Add or remove space after if-condition '('. Overrides sp_inside_sparen. | |
220 | +sp_inside_sparen_open = ignore # ignore/add/remove/force | |
221 | + | |
222 | +# Add or remove space after ')' of 'if', 'for', 'switch', and 'while', etc. | |
223 | +sp_after_sparen = ignore # ignore/add/remove/force | |
224 | + | |
225 | +# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while', etc. | |
226 | +sp_sparen_brace = force # ignore/add/remove/force | |
227 | + | |
228 | +# Add or remove space between 'invariant' and '(' in the D language. | |
229 | +sp_invariant_paren = ignore # ignore/add/remove/force | |
230 | + | |
231 | +# Add or remove space after the ')' in 'invariant (C) c' in the D language. | |
232 | +sp_after_invariant_paren = ignore # ignore/add/remove/force | |
233 | + | |
234 | +# Add or remove space before empty statement ';' on 'if', 'for' and 'while'. | |
235 | +sp_special_semi = ignore # ignore/add/remove/force | |
236 | + | |
237 | +# Add or remove space before ';'. Default=Remove. | |
238 | +sp_before_semi = remove # ignore/add/remove/force | |
239 | + | |
240 | +# Add or remove space before ';' in non-empty 'for' statements. | |
241 | +sp_before_semi_for = ignore # ignore/add/remove/force | |
242 | + | |
243 | +# Add or remove space before a semicolon of an empty part of a for statement. | |
244 | +sp_before_semi_for_empty = ignore # ignore/add/remove/force | |
245 | + | |
246 | +# Add or remove space after ';', except when followed by a comment. Default=Add. | |
247 | +sp_after_semi = ignore # ignore/add/remove/force | |
248 | + | |
249 | +# Add or remove space after ';' in non-empty 'for' statements. Default=Force. | |
250 | +sp_after_semi_for = force # ignore/add/remove/force | |
251 | + | |
252 | +# Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; <here> ). | |
253 | +sp_after_semi_for_empty = force # ignore/add/remove/force | |
254 | + | |
255 | +# Add or remove space before '[' (except '[]'). | |
256 | +sp_before_square = remove # ignore/add/remove/force | |
257 | + | |
258 | +# Add or remove space before structured bindings. Only for C++17. | |
259 | +sp_cpp_before_struct_binding = ignore # ignore/add/remove/force | |
260 | + | |
261 | +# Add or remove space before '[]'. | |
262 | +sp_before_squares = remove # ignore/add/remove/force | |
263 | + | |
264 | +# Add or remove space inside a non-empty '[' and ']'. | |
265 | +sp_inside_square = remove # ignore/add/remove/force | |
266 | + | |
267 | +# Add or remove space inside a non-empty OC boxed array '@[' and ']'. | |
268 | +# If set to ignore, sp_inside_square is used. | |
269 | +sp_inside_square_oc_array = ignore # ignore/add/remove/force | |
270 | + | |
271 | +# Add or remove space after ',', 'a,b' vs 'a, b'. | |
272 | +sp_after_comma = force # ignore/add/remove/force | |
273 | + | |
274 | +# Add or remove space before ','. Default=Remove. | |
275 | +sp_before_comma = remove # ignore/add/remove/force | |
276 | + | |
277 | +# Add or remove space between ',' and ']' in multidimensional array type 'int[,,]'. Only for C#. | |
278 | +sp_after_mdatype_commas = ignore # ignore/add/remove/force | |
279 | + | |
280 | +# Add or remove space between '[' and ',' in multidimensional array type 'int[,,]'. Only for C#. | |
281 | +sp_before_mdatype_commas = ignore # ignore/add/remove/force | |
282 | + | |
283 | +# Add or remove space between ',' in multidimensional array type 'int[,,]'. Only for C#. | |
284 | +sp_between_mdatype_commas = ignore # ignore/add/remove/force | |
285 | + | |
286 | +# Add or remove space between an open paren and comma: '(,' vs '( ,'. Default=Force. | |
287 | +sp_paren_comma = force # ignore/add/remove/force | |
288 | + | |
289 | +# Add or remove space before the variadic '...' when preceded by a non-punctuator. | |
290 | +sp_before_ellipsis = ignore # ignore/add/remove/force | |
291 | + | |
292 | +# Add or remove space between a type and '...'. | |
293 | +sp_type_ellipsis = ignore # ignore/add/remove/force | |
294 | + | |
295 | +# Add or remove space between ')' and '...'. | |
296 | +sp_paren_ellipsis = ignore # ignore/add/remove/force | |
297 | + | |
298 | +# Add or remove space after class ':'. | |
299 | +sp_after_class_colon = force # ignore/add/remove/force | |
300 | + | |
301 | +# Add or remove space before class ':'. | |
302 | +sp_before_class_colon = force # ignore/add/remove/force | |
303 | + | |
304 | +# Add or remove space after class constructor ':'. | |
305 | +sp_after_constr_colon = ignore # ignore/add/remove/force | |
306 | + | |
307 | +# Add or remove space before class constructor ':'. | |
308 | +sp_before_constr_colon = ignore # ignore/add/remove/force | |
309 | + | |
310 | +# Add or remove space before case ':'. Default=Remove. | |
311 | +sp_before_case_colon = remove # ignore/add/remove/force | |
312 | + | |
313 | +# Add or remove space between 'operator' and operator sign. | |
314 | +sp_after_operator = remove # ignore/add/remove/force | |
315 | + | |
316 | +# Add or remove space between the operator symbol and the open paren, as in 'operator ++('. | |
317 | +sp_after_operator_sym = remove # ignore/add/remove/force | |
318 | + | |
319 | +# Overrides sp_after_operator_sym when the operator has no arguments, as in 'operator *()'. | |
320 | +sp_after_operator_sym_empty = remove # ignore/add/remove/force | |
321 | + | |
322 | +# Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'. | |
323 | +sp_after_cast = ignore # ignore/add/remove/force | |
324 | + | |
325 | +# Add or remove spaces inside cast parens. | |
326 | +sp_inside_paren_cast = remove # ignore/add/remove/force | |
327 | + | |
328 | +# Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)'. | |
329 | +sp_cpp_cast_paren = remove # ignore/add/remove/force | |
330 | + | |
331 | +# Add or remove space between 'sizeof' and '('. | |
332 | +sp_sizeof_paren = remove # ignore/add/remove/force | |
333 | + | |
334 | +# Add or remove space between 'sizeof' and '...'. | |
335 | +sp_sizeof_ellipsis = ignore # ignore/add/remove/force | |
336 | + | |
337 | +# Add or remove space between 'sizeof...' and '('. | |
338 | +sp_sizeof_ellipsis_paren = ignore # ignore/add/remove/force | |
339 | + | |
340 | +# Add or remove space between 'decltype' and '('. | |
341 | +sp_decltype_paren = ignore # ignore/add/remove/force | |
342 | + | |
343 | +# Add or remove space after the tag keyword (Pawn). | |
344 | +sp_after_tag = ignore # ignore/add/remove/force | |
345 | + | |
346 | +# Add or remove space inside enum '{' and '}'. | |
347 | +sp_inside_braces_enum = ignore # ignore/add/remove/force | |
348 | + | |
349 | +# Add or remove space inside struct/union '{' and '}'. | |
350 | +sp_inside_braces_struct = ignore # ignore/add/remove/force | |
351 | + | |
352 | +# Add or remove space inside OC boxed dictionary @'{' and '}' | |
353 | +sp_inside_braces_oc_dict = ignore # ignore/add/remove/force | |
354 | + | |
355 | +# Add or remove space after open brace in an unnamed temporary direct-list-initialization. | |
356 | +sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force | |
357 | + | |
358 | +# Add or remove space before close brace in an unnamed temporary direct-list-initialization. | |
359 | +sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force | |
360 | + | |
361 | +# Add or remove space inside an unnamed temporary direct-list-initialization. | |
362 | +sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force | |
363 | + | |
364 | +# Add or remove space inside '{' and '}'. | |
365 | +sp_inside_braces = remove # ignore/add/remove/force | |
366 | + | |
367 | +# Add or remove space inside '{}'. | |
368 | +sp_inside_braces_empty = remove # ignore/add/remove/force | |
369 | + | |
370 | +# Add or remove space between return type and function name | |
371 | +# A minimum of 1 is forced except for pointer return types. | |
372 | +sp_type_func = ignore # ignore/add/remove/force | |
373 | + | |
374 | +# Add or remove space between type and open brace of an unnamed temporary direct-list-initialization. | |
375 | +sp_type_brace_init_lst = ignore # ignore/add/remove/force | |
376 | + | |
377 | +# Add or remove space between function name and '(' on function declaration. | |
378 | +sp_func_proto_paren = remove # ignore/add/remove/force | |
379 | + | |
380 | +# Add or remove space between function name and '()' on function declaration without parameters. | |
381 | +sp_func_proto_paren_empty = remove # ignore/add/remove/force | |
382 | + | |
383 | +# Add or remove space between function name and '(' on function definition. | |
384 | +sp_func_def_paren = remove # ignore/add/remove/force | |
385 | + | |
386 | +# Add or remove space between function name and '()' on function definition without parameters. | |
387 | +sp_func_def_paren_empty = remove # ignore/add/remove/force | |
388 | + | |
389 | +# Add or remove space inside empty function '()'. | |
390 | +sp_inside_fparens = remove # ignore/add/remove/force | |
391 | + | |
392 | +# Add or remove space inside function '(' and ')'. | |
393 | +sp_inside_fparen = remove # ignore/add/remove/force | |
394 | + | |
395 | +# Add or remove space inside the first parens in the function type: 'void (*x)(...)'. | |
396 | +sp_inside_tparen = ignore # ignore/add/remove/force | |
397 | + | |
398 | +# Add or remove between the parens in the function type: 'void (*x)(...)'. | |
399 | +sp_after_tparen_close = ignore # ignore/add/remove/force | |
400 | + | |
401 | +# Add or remove space between ']' and '(' when part of a function call. | |
402 | +sp_square_fparen = remove # ignore/add/remove/force | |
403 | + | |
404 | +# Add or remove space between ')' and '{' of function. | |
405 | +sp_fparen_brace = force # ignore/add/remove/force | |
406 | + | |
407 | +# Add or remove space between ')' and '{' of function call in object initialization. Overrides sp_fparen_brace. | |
408 | +sp_fparen_brace_initializer = force # ignore/add/remove/force | |
409 | + | |
410 | +# Java: Add or remove space between ')' and '{{' of double brace initializer. | |
411 | +sp_fparen_dbrace = ignore # ignore/add/remove/force | |
412 | + | |
413 | +# Add or remove space between function name and '(' on function calls. | |
414 | +sp_func_call_paren = remove # ignore/add/remove/force | |
415 | + | |
416 | +# Add or remove space between function name and '()' on function calls without parameters. | |
417 | +# If set to 'ignore' (the default), sp_func_call_paren is used. | |
418 | +sp_func_call_paren_empty = ignore # ignore/add/remove/force | |
419 | + | |
420 | +# Add or remove space between the user function name and '(' on function calls | |
421 | +# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. | |
422 | +sp_func_call_user_paren = ignore # ignore/add/remove/force | |
423 | + | |
424 | +# Add or remove space inside user function '(' and ')' | |
425 | +# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. | |
426 | +sp_func_call_user_inside_fparen = ignore # ignore/add/remove/force | |
427 | + | |
428 | +# Add or remove space between nested parens with user functions: '((' vs ') )'You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. | |
429 | +sp_func_call_user_paren_paren = ignore # ignore/add/remove/force | |
430 | + | |
431 | +# Add or remove space between a constructor/destructor and the open paren. | |
432 | +sp_func_class_paren = remove # ignore/add/remove/force | |
433 | + | |
434 | +# Add or remove space between a constructor without parameters or destructor and '()'. | |
435 | +sp_func_class_paren_empty = remove # ignore/add/remove/force | |
436 | + | |
437 | +# Add or remove space between 'return' and '('. | |
438 | +sp_return_paren = ignore # ignore/add/remove/force | |
439 | + | |
440 | +# Add or remove space between 'return' and '{'. | |
441 | +sp_return_brace = ignore # ignore/add/remove/force | |
442 | + | |
443 | +# Add or remove space between '__attribute__' and '('. | |
444 | +sp_attribute_paren = ignore # ignore/add/remove/force | |
445 | + | |
446 | +# Add or remove space between 'defined' and '(' in '#if defined (FOO)'. | |
447 | +sp_defined_paren = ignore # ignore/add/remove/force | |
448 | + | |
449 | +# Add or remove space between 'throw' and '(' in 'throw (something)'. | |
450 | +sp_throw_paren = ignore # ignore/add/remove/force | |
451 | + | |
452 | +# Add or remove space between 'throw' and anything other than '(' as in '@throw [...];'. | |
453 | +sp_after_throw = ignore # ignore/add/remove/force | |
454 | + | |
455 | +# Add or remove space between 'catch' and '(' in 'catch (something) { }' | |
456 | +# If set to ignore, sp_before_sparen is used. | |
457 | +sp_catch_paren = ignore # ignore/add/remove/force | |
458 | + | |
459 | +# Add or remove space between '@catch' and '(' in '@catch (something) { }' | |
460 | +# If set to ignore, sp_catch_paren is used. | |
461 | +sp_oc_catch_paren = ignore # ignore/add/remove/force | |
462 | + | |
463 | +# Add or remove space between 'version' and '(' in 'version (something) { }' (D language) | |
464 | +# If set to ignore, sp_before_sparen is used. | |
465 | +sp_version_paren = ignore # ignore/add/remove/force | |
466 | + | |
467 | +# Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language) | |
468 | +# If set to ignore, sp_before_sparen is used. | |
469 | +sp_scope_paren = ignore # ignore/add/remove/force | |
470 | + | |
471 | +# Add or remove space between 'super' and '(' in 'super (something)'. Default=Remove. | |
472 | +sp_super_paren = remove # ignore/add/remove/force | |
473 | + | |
474 | +# Add or remove space between 'this' and '(' in 'this (something)'. Default=Remove. | |
475 | +sp_this_paren = remove # ignore/add/remove/force | |
476 | + | |
477 | +# Add or remove space between macro and value. | |
478 | +sp_macro = ignore # ignore/add/remove/force | |
479 | + | |
480 | +# Add or remove space between macro function ')' and value. | |
481 | +sp_macro_func = ignore # ignore/add/remove/force | |
482 | + | |
483 | +# Add or remove space between 'else' and '{' if on the same line. | |
484 | +sp_else_brace = force # ignore/add/remove/force | |
485 | + | |
486 | +# Add or remove space between '}' and 'else' if on the same line. | |
487 | +sp_brace_else = force # ignore/add/remove/force | |
488 | + | |
489 | +# Add or remove space between '}' and the name of a typedef on the same line. | |
490 | +sp_brace_typedef = force # ignore/add/remove/force | |
491 | + | |
492 | +# Add or remove space between 'catch' and '{' if on the same line. | |
493 | +sp_catch_brace = force # ignore/add/remove/force | |
494 | + | |
495 | +# Add or remove space between '@catch' and '{' if on the same line. | |
496 | +# If set to ignore, sp_catch_brace is used. | |
497 | +sp_oc_catch_brace = ignore # ignore/add/remove/force | |
498 | + | |
499 | +# Add or remove space between '}' and 'catch' if on the same line. | |
500 | +sp_brace_catch = force # ignore/add/remove/force | |
501 | + | |
502 | +# Add or remove space between '}' and '@catch' if on the same line. | |
503 | +# If set to ignore, sp_brace_catch is used. | |
504 | +sp_oc_brace_catch = ignore # ignore/add/remove/force | |
505 | + | |
506 | +# Add or remove space between 'finally' and '{' if on the same line. | |
507 | +sp_finally_brace = force # ignore/add/remove/force | |
508 | + | |
509 | +# Add or remove space between '}' and 'finally' if on the same line. | |
510 | +sp_brace_finally = force # ignore/add/remove/force | |
511 | + | |
512 | +# Add or remove space between 'try' and '{' if on the same line. | |
513 | +sp_try_brace = force # ignore/add/remove/force | |
514 | + | |
515 | +# Add or remove space between get/set and '{' if on the same line. | |
516 | +sp_getset_brace = ignore # ignore/add/remove/force | |
517 | + | |
518 | +# Add or remove space between a variable and '{' for C++ uniform initialization. Default=Add. | |
519 | +sp_word_brace = add # ignore/add/remove/force | |
520 | + | |
521 | +# Add or remove space between a variable and '{' for a namespace. Default=Add. | |
522 | +sp_word_brace_ns = add # ignore/add/remove/force | |
523 | + | |
524 | +# Add or remove space before the '::' operator. | |
525 | +sp_before_dc = remove # ignore/add/remove/force | |
526 | + | |
527 | +# Add or remove space after the '::' operator. | |
528 | +sp_after_dc = remove # ignore/add/remove/force | |
529 | + | |
530 | +# Add or remove around the D named array initializer ':' operator. | |
531 | +sp_d_array_colon = ignore # ignore/add/remove/force | |
532 | + | |
533 | +# Add or remove space after the '!' (not) operator. Default=Remove. | |
534 | +sp_not = remove # ignore/add/remove/force | |
535 | + | |
536 | +# Add or remove space after the '~' (invert) operator. Default=Remove. | |
537 | +sp_inv = remove # ignore/add/remove/force | |
538 | + | |
539 | +# Add or remove space after the '&' (address-of) operator. Default=Remove | |
540 | +# This does not affect the spacing after a '&' that is part of a type. | |
541 | +sp_addr = remove # ignore/add/remove/force | |
542 | + | |
543 | +# Add or remove space around the '.' or '->' operators. Default=Remove. | |
544 | +sp_member = remove # ignore/add/remove/force | |
545 | + | |
546 | +# Add or remove space after the '*' (dereference) operator. Default=Remove | |
547 | +# This does not affect the spacing after a '*' that is part of a type. | |
548 | +sp_deref = remove # ignore/add/remove/force | |
549 | + | |
550 | +# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove. | |
551 | +sp_sign = remove # ignore/add/remove/force | |
552 | + | |
553 | +# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove. | |
554 | +sp_incdec = remove # ignore/add/remove/force | |
555 | + | |
556 | +# Add or remove space before a backslash-newline at the end of a line. Default=Add. | |
557 | +sp_before_nl_cont = force # ignore/add/remove/force | |
558 | + | |
559 | +# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'. | |
560 | +sp_after_oc_scope = ignore # ignore/add/remove/force | |
561 | + | |
562 | +# Add or remove space after the colon in message specs | |
563 | +# '-(int) f:(int) x;' vs '-(int) f: (int) x;'. | |
564 | +sp_after_oc_colon = ignore # ignore/add/remove/force | |
565 | + | |
566 | +# Add or remove space before the colon in message specs | |
567 | +# '-(int) f: (int) x;' vs '-(int) f : (int) x;'. | |
568 | +sp_before_oc_colon = ignore # ignore/add/remove/force | |
569 | + | |
570 | +# Add or remove space after the colon in immutable dictionary expression | |
571 | +# 'NSDictionary *test = @{@"foo" :@"bar"};'. | |
572 | +sp_after_oc_dict_colon = ignore # ignore/add/remove/force | |
573 | + | |
574 | +# Add or remove space before the colon in immutable dictionary expression | |
575 | +# 'NSDictionary *test = @{@"foo" :@"bar"};'. | |
576 | +sp_before_oc_dict_colon = ignore # ignore/add/remove/force | |
577 | + | |
578 | +# Add or remove space after the colon in message specs | |
579 | +# '[object setValue:1];' vs '[object setValue: 1];'. | |
580 | +sp_after_send_oc_colon = ignore # ignore/add/remove/force | |
581 | + | |
582 | +# Add or remove space before the colon in message specs | |
583 | +# '[object setValue:1];' vs '[object setValue :1];'. | |
584 | +sp_before_send_oc_colon = ignore # ignore/add/remove/force | |
585 | + | |
586 | +# Add or remove space after the (type) in message specs | |
587 | +# '-(int)f: (int) x;' vs '-(int)f: (int)x;'. | |
588 | +sp_after_oc_type = ignore # ignore/add/remove/force | |
589 | + | |
590 | +# Add or remove space after the first (type) in message specs | |
591 | +# '-(int) f:(int)x;' vs '-(int)f:(int)x;'. | |
592 | +sp_after_oc_return_type = ignore # ignore/add/remove/force | |
593 | + | |
594 | +# Add or remove space between '@selector' and '(' | |
595 | +# '@selector(msgName)' vs '@selector (msgName)' | |
596 | +# Also applies to @protocol() constructs. | |
597 | +sp_after_oc_at_sel = ignore # ignore/add/remove/force | |
598 | + | |
599 | +# Add or remove space between '@selector(x)' and the following word | |
600 | +# '@selector(foo) a:' vs '@selector(foo)a:'. | |
601 | +sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force | |
602 | + | |
603 | +# Add or remove space inside '@selector' parens | |
604 | +# '@selector(foo)' vs '@selector( foo )' | |
605 | +# Also applies to @protocol() constructs. | |
606 | +sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force | |
607 | + | |
608 | +# Add or remove space before a block pointer caret | |
609 | +# '^int (int arg){...}' vs. ' ^int (int arg){...}'. | |
610 | +sp_before_oc_block_caret = ignore # ignore/add/remove/force | |
611 | + | |
612 | +# Add or remove space after a block pointer caret | |
613 | +# '^int (int arg){...}' vs. '^ int (int arg){...}'. | |
614 | +sp_after_oc_block_caret = ignore # ignore/add/remove/force | |
615 | + | |
616 | +# Add or remove space between the receiver and selector in a message. | |
617 | +# '[receiver selector ...]'. | |
618 | +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force | |
619 | + | |
620 | +# Add or remove space after @property. | |
621 | +sp_after_oc_property = ignore # ignore/add/remove/force | |
622 | + | |
623 | +# Add or remove space between '@synchronized' and the parenthesis | |
624 | +# '@synchronized(foo)' vs '@synchronized (foo)'. | |
625 | +sp_after_oc_synchronized = ignore # ignore/add/remove/force | |
626 | + | |
627 | +# Add or remove space around the ':' in 'b ? t : f'. | |
628 | +sp_cond_colon = force # ignore/add/remove/force | |
629 | + | |
630 | +# Add or remove space before the ':' in 'b ? t : f'. Overrides sp_cond_colon. | |
631 | +sp_cond_colon_before = ignore # ignore/add/remove/force | |
632 | + | |
633 | +# Add or remove space after the ':' in 'b ? t : f'. Overrides sp_cond_colon. | |
634 | +sp_cond_colon_after = ignore # ignore/add/remove/force | |
635 | + | |
636 | +# Add or remove space around the '?' in 'b ? t : f'. | |
637 | +sp_cond_question = force # ignore/add/remove/force | |
638 | + | |
639 | +# Add or remove space before the '?' in 'b ? t : f'. Overrides sp_cond_question. | |
640 | +sp_cond_question_before = ignore # ignore/add/remove/force | |
641 | + | |
642 | +# Add or remove space after the '?' in 'b ? t : f'. Overrides sp_cond_question. | |
643 | +sp_cond_question_after = ignore # ignore/add/remove/force | |
644 | + | |
645 | +# In the abbreviated ternary form (a ?: b), add/remove space between ? and :.'. Overrides all other sp_cond_* options. | |
646 | +sp_cond_ternary_short = ignore # ignore/add/remove/force | |
647 | + | |
648 | +# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. | |
649 | +sp_case_label = force # ignore/add/remove/force | |
650 | + | |
651 | +# Control the space around the D '..' operator. | |
652 | +sp_range = ignore # ignore/add/remove/force | |
653 | + | |
654 | +# Control the spacing after ':' in 'for (TYPE VAR : EXPR)'. Only JAVA. | |
655 | +sp_after_for_colon = ignore # ignore/add/remove/force | |
656 | + | |
657 | +# Control the spacing before ':' in 'for (TYPE VAR : EXPR)'. Only JAVA. | |
658 | +sp_before_for_colon = ignore # ignore/add/remove/force | |
659 | + | |
660 | +# Control the spacing in 'extern (C)' (D). | |
661 | +sp_extern_paren = ignore # ignore/add/remove/force | |
662 | + | |
663 | +# Control the space after the opening of a C++ comment '// A' vs '//A'. | |
664 | +sp_cmt_cpp_start = ignore # ignore/add/remove/force | |
665 | + | |
666 | +# True: If space is added with sp_cmt_cpp_start, do it after doxygen sequences like '///', '///<', '//!' and '//!<'. | |
667 | +sp_cmt_cpp_doxygen = false # false/true | |
668 | + | |
669 | +# True: If space is added with sp_cmt_cpp_start, do it after Qt translator or meta-data comments like '//:', '//=', and '//~'. | |
670 | +sp_cmt_cpp_qttr = false # false/true | |
671 | + | |
672 | +# Controls the spaces between #else or #endif and a trailing comment. | |
673 | +sp_endif_cmt = ignore # ignore/add/remove/force | |
674 | + | |
675 | +# Controls the spaces after 'new', 'delete' and 'delete[]'. | |
676 | +sp_after_new = force # ignore/add/remove/force | |
677 | + | |
678 | +# Controls the spaces between new and '(' in 'new()'. | |
679 | +sp_between_new_paren = ignore # ignore/add/remove/force | |
680 | + | |
681 | +# Controls the spaces between ')' and 'type' in 'new(foo) BAR'. | |
682 | +sp_after_newop_paren = ignore # ignore/add/remove/force | |
683 | + | |
684 | +# Controls the spaces inside paren of the new operator: 'new(foo) BAR'. | |
685 | +sp_inside_newop_paren = ignore # ignore/add/remove/force | |
686 | + | |
687 | +# Controls the space after open paren of the new operator: 'new(foo) BAR'. | |
688 | +# Overrides sp_inside_newop_paren. | |
689 | +sp_inside_newop_paren_open = ignore # ignore/add/remove/force | |
690 | + | |
691 | +# Controls the space before close paren of the new operator: 'new(foo) BAR'. | |
692 | +# Overrides sp_inside_newop_paren. | |
693 | +sp_inside_newop_paren_close = ignore # ignore/add/remove/force | |
694 | + | |
695 | +# Controls the spaces before a trailing or embedded comment. | |
696 | +sp_before_tr_emb_cmt = ignore # ignore/add/remove/force | |
697 | + | |
698 | +# Number of spaces before a trailing or embedded comment. | |
699 | +sp_num_before_tr_emb_cmt = 2 # unsigned number | |
700 | + | |
701 | +# Control space between a Java annotation and the open paren. | |
702 | +sp_annotation_paren = ignore # ignore/add/remove/force | |
703 | + | |
704 | +# If True, vbrace tokens are dropped to the previous token and skipped. | |
705 | +sp_skip_vbrace_tokens = false # false/true | |
706 | + | |
707 | +# Controls the space after 'noexcept'. | |
708 | +sp_after_noexcept = ignore # ignore/add/remove/force | |
709 | + | |
710 | +# If True, a <TAB> is inserted after #define. | |
711 | +force_tab_after_define = false # false/true | |
712 | + | |
713 | +# | |
714 | +# Indenting | |
715 | +# | |
716 | + | |
717 | +# The number of columns to indent per level. | |
718 | +# Usually 2, 3, 4, or 8. Default=8. | |
719 | +indent_columns = 2 # unsigned number | |
720 | + | |
721 | +# The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. | |
722 | +# For FreeBSD, this is set to 4. Negative value is absolute and not increased for each '(' level. | |
723 | +indent_continue = 2 # number | |
724 | + | |
725 | +# The continuation indent, only for class header line(s). If non-zero, this | |
726 | +# overrides the indent of 'class' continuation indents. | |
727 | +indent_continue_class_head = 0 # unsigned number | |
728 | + | |
729 | +# Indent empty lines - lines which contain only spaces before newline character | |
730 | +indent_single_newlines = false # false/true | |
731 | + | |
732 | +# The continuation indent for func_*_param if they are true. | |
733 | +# If non-zero, this overrides the indent. | |
734 | +indent_param = 0 # unsigned number | |
735 | + | |
736 | +# How to use tabs when indenting code | |
737 | +# 0=spaces only | |
738 | +# 1=indent with tabs to brace level, align with spaces (default) | |
739 | +# 2=indent and align with tabs, using spaces when not on a tabstop | |
740 | +indent_with_tabs = 0 # unsigned number | |
741 | + | |
742 | +# Comments that are not a brace level are indented with tabs on a tabstop. | |
743 | +# Requires indent_with_tabs=2. If false, will use spaces. | |
744 | +indent_cmt_with_tabs = false # false/true | |
745 | + | |
746 | +# Whether to indent strings broken by '\' so that they line up. | |
747 | +indent_align_string = false # false/true | |
748 | + | |
749 | +# The number of spaces to indent multi-line XML strings. | |
750 | +# Requires indent_align_string=True. | |
751 | +indent_xml_string = 0 # unsigned number | |
752 | + | |
753 | +# Spaces to indent '{' from level. | |
754 | +indent_brace = 0 # unsigned number | |
755 | + | |
756 | +# Whether braces are indented to the body level. | |
757 | +indent_braces = false # false/true | |
758 | + | |
759 | +# Disabled indenting function braces if indent_braces is True. | |
760 | +indent_braces_no_func = false # false/true | |
761 | + | |
762 | +# Disabled indenting class braces if indent_braces is True. | |
763 | +indent_braces_no_class = false # false/true | |
764 | + | |
765 | +# Disabled indenting struct braces if indent_braces is True. | |
766 | +indent_braces_no_struct = false # false/true | |
767 | + | |
768 | +# Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. | |
769 | +indent_brace_parent = false # false/true | |
770 | + | |
771 | +# Indent based on the paren open instead of the brace open in '({\n', default is to indent by brace. | |
772 | +indent_paren_open_brace = false # false/true | |
773 | + | |
774 | +# indent a C# delegate by another level, default is to not indent by another level. | |
775 | +indent_cs_delegate_brace = false # false/true | |
776 | + | |
777 | +# indent a C# delegate(To hanndle delegates with no brace) by another level. default: false | |
778 | +indent_cs_delegate_body = false # false/true | |
779 | + | |
780 | +# Whether the 'namespace' body is indented. | |
781 | +indent_namespace = false # false/true | |
782 | + | |
783 | +# Only indent one namespace and no sub-namespaces. | |
784 | +# Requires indent_namespace=True. | |
785 | +indent_namespace_single_indent = false # false/true | |
786 | + | |
787 | +# The number of spaces to indent a namespace block. | |
788 | +indent_namespace_level = 0 # unsigned number | |
789 | + | |
790 | +# If the body of the namespace is longer than this number, it won't be indented. | |
791 | +# Requires indent_namespace=True. Default=0 (no limit) | |
792 | +indent_namespace_limit = 0 # unsigned number | |
793 | + | |
794 | +# Whether the 'extern "C"' body is indented. | |
795 | +indent_extern = false # false/true | |
796 | + | |
797 | +# Whether the 'class' body is indented. | |
798 | +indent_class = true # false/true | |
799 | + | |
800 | +# Whether to indent the stuff after a leading base class colon. | |
801 | +indent_class_colon = false # false/true | |
802 | + | |
803 | +# Indent based on a class colon instead of the stuff after the colon. | |
804 | +# Requires indent_class_colon=True. Default=False. | |
805 | +indent_class_on_colon = false # false/true | |
806 | + | |
807 | +# Whether to indent the stuff after a leading class initializer colon. | |
808 | +indent_constr_colon = true # false/true | |
809 | + | |
810 | +# Virtual indent from the ':' for member initializers. Default=2. | |
811 | +indent_ctor_init_leading = 2 # unsigned number | |
812 | + | |
813 | +# Additional indent for constructor initializer list. | |
814 | +# Negative values decrease indent down to the first column. Default=0. | |
815 | +indent_ctor_init = -2 # number | |
816 | + | |
817 | +# False=treat 'else\nif' as 'else if' for indenting purposes | |
818 | +# True=indent the 'if' one level. | |
819 | +indent_else_if = false # false/true | |
820 | + | |
821 | +# Amount to indent variable declarations after a open brace. neg=relative, pos=absolute. | |
822 | +indent_var_def_blk = 0 # number | |
823 | + | |
824 | +# Indent continued variable declarations instead of aligning. | |
825 | +indent_var_def_cont = false # false/true | |
826 | + | |
827 | +# Indent continued shift expressions ('<<' and '>>') instead of aligning. | |
828 | +# Turn align_left_shift off when enabling this. | |
829 | +indent_shift = false # false/true | |
830 | + | |
831 | +# True: force indentation of function definition to start in column 1 | |
832 | +# False: use the default behavior. | |
833 | +indent_func_def_force_col1 = false # false/true | |
834 | + | |
835 | +# True: indent continued function call parameters one indent level | |
836 | +# False: align parameters under the open paren. | |
837 | +indent_func_call_param = false # false/true | |
838 | + | |
839 | +# Same as indent_func_call_param, but for function defs. | |
840 | +indent_func_def_param = false # false/true | |
841 | + | |
842 | +# Same as indent_func_call_param, but for function protos. | |
843 | +indent_func_proto_param = false # false/true | |
844 | + | |
845 | +# Same as indent_func_call_param, but for class declarations. | |
846 | +indent_func_class_param = false # false/true | |
847 | + | |
848 | +# Same as indent_func_call_param, but for class variable constructors. | |
849 | +indent_func_ctor_var_param = false # false/true | |
850 | + | |
851 | +# Same as indent_func_call_param, but for templates. | |
852 | +indent_template_param = false # false/true | |
853 | + | |
854 | +# Double the indent for indent_func_xxx_param options. | |
855 | +# Use both values of the options indent_columns and indent_param. | |
856 | +indent_func_param_double = false # false/true | |
857 | + | |
858 | +# Indentation column for standalone 'const' function decl/proto qualifier. | |
859 | +indent_func_const = 0 # unsigned number | |
860 | + | |
861 | +# Indentation column for standalone 'throw' function decl/proto qualifier. | |
862 | +indent_func_throw = 0 # unsigned number | |
863 | + | |
864 | +# The number of spaces to indent a continued '->' or '.' | |
865 | +# Usually set to 0, 1, or indent_columns. | |
866 | +indent_member = 0 # unsigned number | |
867 | + | |
868 | +# setting to true will indent lines broken at '.' or '->' by a single indent | |
869 | +# UO_indent_member option will not be effective if this is set to true. | |
870 | +indent_member_single = false # false/true | |
871 | + | |
872 | +# Spaces to indent single line ('//') comments on lines before code. | |
873 | +indent_sing_line_comments = 0 # unsigned number | |
874 | + | |
875 | +# If set, will indent trailing single line ('//') comments relative | |
876 | +# to the code instead of trying to keep the same absolute column. | |
877 | +indent_relative_single_line_comments = false # false/true | |
878 | + | |
879 | +# Spaces to indent 'case' from 'switch' | |
880 | +# Usually 0 or indent_columns. | |
881 | +indent_switch_case = 2 # unsigned number | |
882 | + | |
883 | +# Whether to indent preprocessor statements inside of switch statements. | |
884 | +indent_switch_pp = true # false/true | |
885 | + | |
886 | +# Spaces to shift the 'case' line, without affecting any other lines | |
887 | +# Usually 0. | |
888 | +indent_case_shift = 0 # unsigned number | |
889 | + | |
890 | +# Spaces to indent '{' from 'case'. | |
891 | +# By default, the brace will appear under the 'c' in case. | |
892 | +# Usually set to 0 or indent_columns. | |
893 | +# negative value are OK. | |
894 | +indent_case_brace = 2 # number | |
895 | + | |
896 | +# Whether to indent comments found in first column. | |
897 | +indent_col1_comment = false # false/true | |
898 | + | |
899 | +# How to indent goto labels | |
900 | +# >0: absolute column where 1 is the leftmost column | |
901 | +# <=0: subtract from brace indent | |
902 | +# Default=1 | |
903 | +indent_label = 1 # number | |
904 | + | |
905 | +# Same as indent_label, but for access specifiers that are followed by a colon. Default=1 | |
906 | +indent_access_spec = 1 # number | |
907 | + | |
908 | +# Indent the code after an access specifier by one level. | |
909 | +# If set, this option forces 'indent_access_spec=0'. | |
910 | +indent_access_spec_body = false # false/true | |
911 | + | |
912 | +# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended). | |
913 | +indent_paren_nl = false # false/true | |
914 | + | |
915 | +# Controls the indent of a close paren after a newline. | |
916 | +# 0: Indent to body level | |
917 | +# 1: Align under the open paren | |
918 | +# 2: Indent to the brace level | |
919 | +indent_paren_close = 2 # unsigned number | |
920 | + | |
921 | +# Controls the indent of the open paren of a function definition, if on it's own line.If True, indents the open paren | |
922 | +indent_paren_after_func_def = false # false/true | |
923 | + | |
924 | +# Controls the indent of the open paren of a function declaration, if on it's own line.If True, indents the open paren | |
925 | +indent_paren_after_func_decl = false # false/true | |
926 | + | |
927 | +# Controls the indent of the open paren of a function call, if on it's own line.If True, indents the open paren | |
928 | +indent_paren_after_func_call = false # false/true | |
929 | + | |
930 | +# Controls the indent of a comma when inside a paren.If True, aligns under the open paren. | |
931 | +indent_comma_paren = false # false/true | |
932 | + | |
933 | +# Controls the indent of a BOOL operator when inside a paren.If True, aligns under the open paren. | |
934 | +indent_bool_paren = false # false/true | |
935 | + | |
936 | +# Controls the indent of a semicolon when inside a for paren.If True, aligns under the open for paren. | |
937 | +indent_semicolon_for_paren = false # false/true | |
938 | + | |
939 | +# If 'indent_bool_paren' is True, controls the indent of the first expression. If True, aligns the first expression to the following ones. | |
940 | +indent_first_bool_expr = false # false/true | |
941 | + | |
942 | +# If 'indent_semicolon_for_paren' is True, controls the indent of the first expression. If True, aligns the first expression to the following ones. | |
943 | +indent_first_for_expr = false # false/true | |
944 | + | |
945 | +# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended). | |
946 | +indent_square_nl = false # false/true | |
947 | + | |
948 | +# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies. | |
949 | +indent_preserve_sql = false # false/true | |
950 | + | |
951 | +# Align continued statements at the '='. Default=True | |
952 | +# If False or the '=' is followed by a newline, the next line is indent one tab. | |
953 | +indent_align_assign = false # false/true | |
954 | + | |
955 | +# Align continued statements at the '('. Default=True | |
956 | +# If FALSE or the '(' is not followed by a newline, the next line indent is one tab. | |
957 | +indent_align_paren = true # false/true | |
958 | + | |
959 | +# Indent OC blocks at brace level instead of usual rules. | |
960 | +indent_oc_block = false # false/true | |
961 | + | |
962 | +# Indent OC blocks in a message relative to the parameter name. | |
963 | +# 0=use indent_oc_block rules, 1+=spaces to indent | |
964 | +indent_oc_block_msg = 0 # unsigned number | |
965 | + | |
966 | +# Minimum indent for subsequent parameters | |
967 | +indent_oc_msg_colon = 0 # unsigned number | |
968 | + | |
969 | +# If True, prioritize aligning with initial colon (and stripping spaces from lines, if necessary). | |
970 | +# Default=True. | |
971 | +indent_oc_msg_prioritize_first_colon = true # false/true | |
972 | + | |
973 | +# If indent_oc_block_msg and this option are on, blocks will be indented the way that Xcode does by default (from keyword if the parameter is on its own line; otherwise, from the previous indentation level). | |
974 | +indent_oc_block_msg_xcode_style = false # false/true | |
975 | + | |
976 | +# If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is relative to a msg keyword. | |
977 | +indent_oc_block_msg_from_keyword = false # false/true | |
978 | + | |
979 | +# If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is relative to a msg colon. | |
980 | +indent_oc_block_msg_from_colon = false # false/true | |
981 | + | |
982 | +# If indent_oc_block_msg and this option are on, blocks will be indented from where the block caret is. | |
983 | +indent_oc_block_msg_from_caret = false # false/true | |
984 | + | |
985 | +# If indent_oc_block_msg and this option are on, blocks will be indented from where the brace is. | |
986 | +indent_oc_block_msg_from_brace = false # false/true | |
987 | + | |
988 | +# When indenting after virtual brace open and newline add further spaces to reach this min. indent. | |
989 | +indent_min_vbrace_open = 0 # unsigned number | |
990 | + | |
991 | +# True: When identing after virtual brace open and newline add further spaces after regular indent to reach next tabstop. | |
992 | +indent_vbrace_open_on_tabstop = false # false/true | |
993 | + | |
994 | +# If True, a brace followed by another token (not a newline) will indent all contained lines to match the token.Default=True. | |
995 | +indent_token_after_brace = false # false/true | |
996 | + | |
997 | +# If True, cpp lambda body will be indentedDefault=False. | |
998 | +indent_cpp_lambda_body = true # false/true | |
999 | + | |
1000 | +# indent (or not) an using block if no braces are used. Only for C#.Default=True. | |
1001 | +indent_using_block = true # false/true | |
1002 | + | |
1003 | +# indent the continuation of ternary operator. | |
1004 | +# 0: (Default) off | |
1005 | +# 1: When the `if_false` is a continuation, indent it under `if_false` | |
1006 | +# 2: When the `:` is a continuation, indent it under `?` | |
1007 | +indent_ternary_operator = 0 # unsigned number | |
1008 | + | |
1009 | +# If true, the indentation of the chunks after a `return new` sequence will be set at return indentation column. | |
1010 | +indent_off_after_return_new = false # false/true | |
1011 | + | |
1012 | +# If true, the tokens after return are indented with regular single indentation.By default (false) the indentation is after the return token. | |
1013 | +indent_single_after_return = false # false/true | |
1014 | + | |
1015 | +# If true, ignore indent and align for asm blocks as they have their own indentation. | |
1016 | +indent_ignore_asm_block = false # false/true | |
1017 | + | |
1018 | +# | |
1019 | +# Newline adding and removing options | |
1020 | +# | |
1021 | + | |
1022 | +# Whether to collapse empty blocks between '{' and '}'. | |
1023 | +nl_collapse_empty_body = false # false/true | |
1024 | + | |
1025 | +# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'. | |
1026 | +nl_assign_leave_one_liners = true # false/true | |
1027 | + | |
1028 | +# Don't split one-line braced statements inside a class xx { } body. | |
1029 | +nl_class_leave_one_liners = true # false/true | |
1030 | + | |
1031 | +# Don't split one-line enums: 'enum foo { BAR = 15 };' | |
1032 | +nl_enum_leave_one_liners = true # false/true | |
1033 | + | |
1034 | +# Don't split one-line get or set functions. | |
1035 | +nl_getset_leave_one_liners = true # false/true | |
1036 | + | |
1037 | +# Don't split one-line get or set functions. | |
1038 | +nl_cs_property_leave_one_liners = false # false/true | |
1039 | + | |
1040 | +# Don't split one-line function definitions - 'int foo() { return 0; }'. | |
1041 | +nl_func_leave_one_liners = true # false/true | |
1042 | + | |
1043 | +# Don't split one-line C++11 lambdas - '[]() { return 0; }'. | |
1044 | +nl_cpp_lambda_leave_one_liners = true # false/true | |
1045 | + | |
1046 | +# Don't split one-line if/else statements - 'if(a) b++;'. | |
1047 | +nl_if_leave_one_liners = true # false/true | |
1048 | + | |
1049 | +# Don't split one-line while statements - 'while(a) b++;'. | |
1050 | +nl_while_leave_one_liners = true # false/true | |
1051 | + | |
1052 | +# Don't split one-line OC messages. | |
1053 | +nl_oc_msg_leave_one_liner = false # false/true | |
1054 | + | |
1055 | +# (OC) Add or remove newline between method declaration and '{'. | |
1056 | +nl_oc_mdef_brace = ignore # ignore/add/remove/force | |
1057 | + | |
1058 | +# Add or remove newline between Objective-C block signature and '{'. | |
1059 | +nl_oc_block_brace = ignore # ignore/add/remove/force | |
1060 | + | |
1061 | +# Add or remove newline between @interface and '{'. | |
1062 | +nl_oc_interface_brace = ignore # ignore/add/remove/force | |
1063 | + | |
1064 | +# Add or remove newline between @implementation and '{'. | |
1065 | +nl_oc_implementation_brace = ignore # ignore/add/remove/force | |
1066 | + | |
1067 | +# Add or remove newlines at the start of the file. | |
1068 | +nl_start_of_file = remove # ignore/add/remove/force | |
1069 | + | |
1070 | +# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'. | |
1071 | +nl_start_of_file_min = 0 # unsigned number | |
1072 | + | |
1073 | +# Add or remove newline at the end of the file. | |
1074 | +nl_end_of_file = force # ignore/add/remove/force | |
1075 | + | |
1076 | +# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force'). | |
1077 | +nl_end_of_file_min = 1 # unsigned number | |
1078 | + | |
1079 | +# Add or remove newline between '=' and '{'. | |
1080 | +nl_assign_brace = ignore # ignore/add/remove/force | |
1081 | + | |
1082 | +# Add or remove newline between '=' and '[' (D only). | |
1083 | +nl_assign_square = ignore # ignore/add/remove/force | |
1084 | + | |
1085 | +# Add or remove newline between '[]' and '{'. | |
1086 | +nl_tsquare_brace = ignore # ignore/add/remove/force | |
1087 | + | |
1088 | +# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'. | |
1089 | +nl_after_square_assign = ignore # ignore/add/remove/force | |
1090 | + | |
1091 | +# The number of blank lines after a block of variable definitions at the top of a function body | |
1092 | +# 0 = No change (default). | |
1093 | +nl_func_var_def_blk = 0 # unsigned number | |
1094 | + | |
1095 | +# The number of newlines before a block of typedefs | |
1096 | +# 0 = No change (default) | |
1097 | +# is overridden by the option 'nl_after_access_spec'. | |
1098 | +nl_typedef_blk_start = 0 # unsigned number | |
1099 | + | |
1100 | +# The number of newlines after a block of typedefs | |
1101 | +# 0 = No change (default). | |
1102 | +nl_typedef_blk_end = 0 # unsigned number | |
1103 | + | |
1104 | +# The maximum consecutive newlines within a block of typedefs | |
1105 | +# 0 = No change (default). | |
1106 | +nl_typedef_blk_in = 0 # unsigned number | |
1107 | + | |
1108 | +# The number of newlines before a block of variable definitions not at the top of a function body | |
1109 | +# 0 = No change (default) | |
1110 | +# is overridden by the option 'nl_after_access_spec'. | |
1111 | +nl_var_def_blk_start = 0 # unsigned number | |
1112 | + | |
1113 | +# The number of newlines after a block of variable definitions not at the top of a function body | |
1114 | +# 0 = No change (default). | |
1115 | +nl_var_def_blk_end = 0 # unsigned number | |
1116 | + | |
1117 | +# The maximum consecutive newlines within a block of variable definitions | |
1118 | +# 0 = No change (default). | |
1119 | +nl_var_def_blk_in = 0 # unsigned number | |
1120 | + | |
1121 | +# Add or remove newline between a function call's ')' and '{', as in: | |
1122 | +# list_for_each(item, &list) { }. | |
1123 | +nl_fcall_brace = ignore # ignore/add/remove/force | |
1124 | + | |
1125 | +# Add or remove newline between 'enum' and '{'. | |
1126 | +nl_enum_brace = force # ignore/add/remove/force | |
1127 | + | |
1128 | +# Add or remove newline between 'enum' and 'class'. | |
1129 | +nl_enum_class = remove # ignore/add/remove/force | |
1130 | + | |
1131 | +# Add or remove newline between 'enum class' and the identifier. | |
1132 | +nl_enum_class_identifier = remove # ignore/add/remove/force | |
1133 | + | |
1134 | +# Add or remove newline between 'enum class' type and ':'. | |
1135 | +nl_enum_identifier_colon = remove # ignore/add/remove/force | |
1136 | + | |
1137 | +# Add or remove newline between 'enum class identifier :' and 'type' and/or 'type'. | |
1138 | +nl_enum_colon_type = remove # ignore/add/remove/force | |
1139 | + | |
1140 | +# Add or remove newline between 'struct and '{'. | |
1141 | +nl_struct_brace = force # ignore/add/remove/force | |
1142 | + | |
1143 | +# Add or remove newline between 'union' and '{'. | |
1144 | +nl_union_brace = remove # ignore/add/remove/force | |
1145 | + | |
1146 | +# Add or remove newline between 'if' and '{'. | |
1147 | +nl_if_brace = remove # ignore/add/remove/force | |
1148 | + | |
1149 | +# Add or remove newline between '}' and 'else'. | |
1150 | +nl_brace_else = remove # ignore/add/remove/force | |
1151 | + | |
1152 | +# Add or remove newline between 'else if' and '{' | |
1153 | +# If set to ignore, nl_if_brace is used instead. | |
1154 | +nl_elseif_brace = ignore # ignore/add/remove/force | |
1155 | + | |
1156 | +# Add or remove newline between 'else' and '{'. | |
1157 | +nl_else_brace = remove # ignore/add/remove/force | |
1158 | + | |
1159 | +# Add or remove newline between 'else' and 'if'. | |
1160 | +nl_else_if = remove # ignore/add/remove/force | |
1161 | + | |
1162 | +# Add or remove newline before 'if'/'else if' closing parenthesis. | |
1163 | +nl_before_if_closing_paren = remove # ignore/add/remove/force | |
1164 | + | |
1165 | +# Add or remove newline between '}' and 'finally'. | |
1166 | +nl_brace_finally = remove # ignore/add/remove/force | |
1167 | + | |
1168 | +# Add or remove newline between 'finally' and '{'. | |
1169 | +nl_finally_brace = remove # ignore/add/remove/force | |
1170 | + | |
1171 | +# Add or remove newline between 'try' and '{'. | |
1172 | +nl_try_brace = remove # ignore/add/remove/force | |
1173 | + | |
1174 | +# Add or remove newline between get/set and '{'. | |
1175 | +nl_getset_brace = ignore # ignore/add/remove/force | |
1176 | + | |
1177 | +# Add or remove newline between 'for' and '{'. | |
1178 | +nl_for_brace = remove # ignore/add/remove/force | |
1179 | + | |
1180 | +# Add or remove newline between 'catch' and '{'. | |
1181 | +nl_catch_brace = remove # ignore/add/remove/force | |
1182 | + | |
1183 | +# Add or remove newline between '@catch' and '{'. | |
1184 | +# If set to ignore, nl_catch_brace is used. | |
1185 | +nl_oc_catch_brace = ignore # ignore/add/remove/force | |
1186 | + | |
1187 | +# Add or remove newline between '}' and 'catch'. | |
1188 | +nl_brace_catch = remove # ignore/add/remove/force | |
1189 | + | |
1190 | +# Add or remove newline between '}' and 'catch'. | |
1191 | +# If set to ignore, nl_brace_catch is used. | |
1192 | +nl_oc_brace_catch = ignore # ignore/add/remove/force | |
1193 | + | |
1194 | +# Add or remove newline between '}' and ']'. | |
1195 | +nl_brace_square = ignore # ignore/add/remove/force | |
1196 | + | |
1197 | +# Add or remove newline between '}' and ')' in a function invocation. | |
1198 | +nl_brace_fparen = ignore # ignore/add/remove/force | |
1199 | + | |
1200 | +# Add or remove newline between 'while' and '{'. | |
1201 | +nl_while_brace = remove # ignore/add/remove/force | |
1202 | + | |
1203 | +# Add or remove newline between 'scope (x)' and '{' (D). | |
1204 | +nl_scope_brace = ignore # ignore/add/remove/force | |
1205 | + | |
1206 | +# Add or remove newline between 'unittest' and '{' (D). | |
1207 | +nl_unittest_brace = ignore # ignore/add/remove/force | |
1208 | + | |
1209 | +# Add or remove newline between 'version (x)' and '{' (D). | |
1210 | +nl_version_brace = ignore # ignore/add/remove/force | |
1211 | + | |
1212 | +# Add or remove newline between 'using' and '{'. | |
1213 | +nl_using_brace = ignore # ignore/add/remove/force | |
1214 | + | |
1215 | +# Add or remove newline between two open or close braces. | |
1216 | +# Due to general newline/brace handling, REMOVE may not work. | |
1217 | +nl_brace_brace = ignore # ignore/add/remove/force | |
1218 | + | |
1219 | +# Add or remove newline between 'do' and '{'. | |
1220 | +nl_do_brace = remove # ignore/add/remove/force | |
1221 | + | |
1222 | +# Add or remove newline between '}' and 'while' of 'do' statement. | |
1223 | +nl_brace_while = remove # ignore/add/remove/force | |
1224 | + | |
1225 | +# Add or remove newline between 'switch' and '{'. | |
1226 | +nl_switch_brace = remove # ignore/add/remove/force | |
1227 | + | |
1228 | +# Add or remove newline between 'synchronized' and '{'. | |
1229 | +nl_synchronized_brace = remove # ignore/add/remove/force | |
1230 | + | |
1231 | +# Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. | |
1232 | +# Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch and nl_catch_brace. | |
1233 | +nl_multi_line_cond = true # false/true | |
1234 | + | |
1235 | +# Force a newline in a define after the macro name for multi-line defines. | |
1236 | +nl_multi_line_define = false # false/true | |
1237 | + | |
1238 | +# Whether to put a newline before 'case' statement, not after the first 'case'. | |
1239 | +nl_before_case = false # false/true | |
1240 | + | |
1241 | +# Add or remove newline between ')' and 'throw'. | |
1242 | +nl_before_throw = ignore # ignore/add/remove/force | |
1243 | + | |
1244 | +# Whether to put a newline after 'case' statement. | |
1245 | +nl_after_case = false # false/true | |
1246 | + | |
1247 | +# Add or remove a newline between a case ':' and '{'. Overrides nl_after_case. | |
1248 | +nl_case_colon_brace = ignore # ignore/add/remove/force | |
1249 | + | |
1250 | +# Newline between namespace and {. | |
1251 | +nl_namespace_brace = force # ignore/add/remove/force | |
1252 | + | |
1253 | +# Add or remove newline between 'template<>' and whatever follows. | |
1254 | +nl_template_class = force # ignore/add/remove/force | |
1255 | + | |
1256 | +# Add or remove newline between 'class' and '{'. | |
1257 | +nl_class_brace = force # ignore/add/remove/force | |
1258 | + | |
1259 | +# Add or remove newline before/after each ',' in the base class list, | |
1260 | +# (tied to pos_class_comma). | |
1261 | +nl_class_init_args = ignore # ignore/add/remove/force | |
1262 | + | |
1263 | +# Add or remove newline after each ',' in the constructor member initialization. | |
1264 | +# Related to nl_constr_colon, pos_constr_colon and pos_constr_comma. | |
1265 | +nl_constr_init_args = ignore # ignore/add/remove/force | |
1266 | + | |
1267 | +# Add or remove newline before first element, after comma, and after last element in enum. | |
1268 | +nl_enum_own_lines = ignore # ignore/add/remove/force | |
1269 | + | |
1270 | +# Add or remove newline between return type and function name in a function definition. | |
1271 | +nl_func_type_name = ignore # ignore/add/remove/force | |
1272 | + | |
1273 | +# Add or remove newline between return type and function name inside a class {} | |
1274 | +# Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. | |
1275 | +nl_func_type_name_class = ignore # ignore/add/remove/force | |
1276 | + | |
1277 | +# Add or remove newline between class specification and '::' in 'void A::f() { }' | |
1278 | +# Only appears in separate member implementation (does not appear with in-line implmementation). | |
1279 | +nl_func_class_scope = remove # ignore/add/remove/force | |
1280 | + | |
1281 | +# Add or remove newline between function scope and name | |
1282 | +# Controls the newline after '::' in 'void A::f() { }'. | |
1283 | +nl_func_scope_name = remove # ignore/add/remove/force | |
1284 | + | |
1285 | +# Add or remove newline between return type and function name in a prototype. | |
1286 | +nl_func_proto_type_name = ignore # ignore/add/remove/force | |
1287 | + | |
1288 | +# Add or remove newline between a function name and the opening '(' in the declaration. | |
1289 | +nl_func_paren = remove # ignore/add/remove/force | |
1290 | + | |
1291 | +# Overrides nl_func_paren for functions with no parameters. | |
1292 | +nl_func_paren_empty = remove # ignore/add/remove/force | |
1293 | + | |
1294 | +# Add or remove newline between a function name and the opening '(' in the definition. | |
1295 | +nl_func_def_paren = remove # ignore/add/remove/force | |
1296 | + | |
1297 | +# Overrides nl_func_def_paren for functions with no parameters. | |
1298 | +nl_func_def_paren_empty = remove # ignore/add/remove/force | |
1299 | + | |
1300 | +# Add or remove newline between a function name and the opening '(' in the call | |
1301 | +nl_func_call_paren = remove # ignore/add/remove/force | |
1302 | + | |
1303 | +# Overrides nl_func_call_paren for functions with no parameters. | |
1304 | +nl_func_call_paren_empty = remove # ignore/add/remove/force | |
1305 | + | |
1306 | +# Add or remove newline after '(' in a function declaration. | |
1307 | +nl_func_decl_start = ignore # ignore/add/remove/force | |
1308 | + | |
1309 | +# Add or remove newline after '(' in a function definition. | |
1310 | +nl_func_def_start = ignore # ignore/add/remove/force | |
1311 | + | |
1312 | +# Overrides nl_func_decl_start when there is only one parameter. | |
1313 | +nl_func_decl_start_single = ignore # ignore/add/remove/force | |
1314 | + | |
1315 | +# Overrides nl_func_def_start when there is only one parameter. | |
1316 | +nl_func_def_start_single = ignore # ignore/add/remove/force | |
1317 | + | |
1318 | +# Whether to add newline after '(' in a function declaration if '(' and ')' are in different lines. | |
1319 | +nl_func_decl_start_multi_line = true # false/true | |
1320 | + | |
1321 | +# Whether to add newline after '(' in a function definition if '(' and ')' are in different lines. | |
1322 | +nl_func_def_start_multi_line = true # false/true | |
1323 | + | |
1324 | +# Add or remove newline after each ',' in a function declaration. | |
1325 | +nl_func_decl_args = ignore # ignore/add/remove/force | |
1326 | + | |
1327 | +# Add or remove newline after each ',' in a function definition. | |
1328 | +nl_func_def_args = ignore # ignore/add/remove/force | |
1329 | + | |
1330 | +# Whether to add newline after each ',' in a function declaration if '(' and ')' are in different lines. | |
1331 | +nl_func_decl_args_multi_line = false # false/true | |
1332 | + | |
1333 | +# Whether to add newline after each ',' in a function definition if '(' and ')' are in different lines. | |
1334 | +nl_func_def_args_multi_line = false # false/true | |
1335 | + | |
1336 | +# Add or remove newline before the ')' in a function declaration. | |
1337 | +nl_func_decl_end = ignore # ignore/add/remove/force | |
1338 | + | |
1339 | +# Add or remove newline before the ')' in a function definition. | |
1340 | +nl_func_def_end = ignore # ignore/add/remove/force | |
1341 | + | |
1342 | +# Overrides nl_func_decl_end when there is only one parameter. | |
1343 | +nl_func_decl_end_single = ignore # ignore/add/remove/force | |
1344 | + | |
1345 | +# Overrides nl_func_def_end when there is only one parameter. | |
1346 | +nl_func_def_end_single = ignore # ignore/add/remove/force | |
1347 | + | |
1348 | +# Whether to add newline before ')' in a function declaration if '(' and ')' are in different lines. | |
1349 | +nl_func_decl_end_multi_line = false # false/true | |
1350 | + | |
1351 | +# Whether to add newline before ')' in a function definition if '(' and ')' are in different lines. | |
1352 | +nl_func_def_end_multi_line = false # false/true | |
1353 | + | |
1354 | +# Add or remove newline between '()' in a function declaration. | |
1355 | +nl_func_decl_empty = ignore # ignore/add/remove/force | |
1356 | + | |
1357 | +# Add or remove newline between '()' in a function definition. | |
1358 | +nl_func_def_empty = ignore # ignore/add/remove/force | |
1359 | + | |
1360 | +# Add or remove newline between '()' in a function call. | |
1361 | +nl_func_call_empty = ignore # ignore/add/remove/force | |
1362 | + | |
1363 | +# Whether to add newline after '(' in a function call if '(' and ')' are in different lines. | |
1364 | +nl_func_call_start_multi_line = true # false/true | |
1365 | + | |
1366 | +# Whether to add newline after each ',' in a function call if '(' and ')' are in different lines. | |
1367 | +nl_func_call_args_multi_line = false # false/true | |
1368 | + | |
1369 | +# Whether to add newline before ')' in a function call if '(' and ')' are in different lines. | |
1370 | +nl_func_call_end_multi_line = false # false/true | |
1371 | + | |
1372 | +# Whether to put each OC message parameter on a separate line | |
1373 | +# See nl_oc_msg_leave_one_liner. | |
1374 | +nl_oc_msg_args = false # false/true | |
1375 | + | |
1376 | +# Add or remove newline between function signature and '{'. | |
1377 | +nl_fdef_brace = force # ignore/add/remove/force | |
1378 | + | |
1379 | +# Add or remove newline between C++11 lambda signature and '{'. | |
1380 | +nl_cpp_ldef_brace = ignore # ignore/add/remove/force | |
1381 | + | |
1382 | +# Add or remove a newline between the return keyword and return expression. | |
1383 | +nl_return_expr = ignore # ignore/add/remove/force | |
1384 | + | |
1385 | +# Whether to put a newline after semicolons, except in 'for' statements. | |
1386 | +nl_after_semicolon = false # false/true | |
1387 | + | |
1388 | +# Java: Control the newline between the ')' and '{{' of the double brace initializer. | |
1389 | +nl_paren_dbrace_open = ignore # ignore/add/remove/force | |
1390 | + | |
1391 | +# Whether to put a newline after the type in an unnamed temporary direct-list-initialization. | |
1392 | +nl_type_brace_init_lst = ignore # ignore/add/remove/force | |
1393 | + | |
1394 | +# Whether to put a newline after open brace in an unnamed temporary direct-list-initialization. | |
1395 | +nl_type_brace_init_lst_open = ignore # ignore/add/remove/force | |
1396 | + | |
1397 | +# Whether to put a newline before close brace in an unnamed temporary direct-list-initialization. | |
1398 | +nl_type_brace_init_lst_close = ignore # ignore/add/remove/force | |
1399 | + | |
1400 | +# Whether to put a newline after brace open. | |
1401 | +# This also adds a newline before the matching brace close. | |
1402 | +nl_after_brace_open = false # false/true | |
1403 | + | |
1404 | +# If nl_after_brace_open and nl_after_brace_open_cmt are True, a newline is | |
1405 | +# placed between the open brace and a trailing single-line comment. | |
1406 | +nl_after_brace_open_cmt = false # false/true | |
1407 | + | |
1408 | +# Whether to put a newline after a virtual brace open with a non-empty body. | |
1409 | +# These occur in un-braced if/while/do/for statement bodies. | |
1410 | +nl_after_vbrace_open = false # false/true | |
1411 | + | |
1412 | +# Whether to put a newline after a virtual brace open with an empty body. | |
1413 | +# These occur in un-braced if/while/do/for statement bodies. | |
1414 | +nl_after_vbrace_open_empty = false # false/true | |
1415 | + | |
1416 | +# Whether to put a newline after a brace close. | |
1417 | +# Does not apply if followed by a necessary ';'. | |
1418 | +nl_after_brace_close = false # false/true | |
1419 | + | |
1420 | +# Whether to put a newline after a virtual brace close. | |
1421 | +# Would add a newline before return in: 'if (foo) a++; return;'. | |
1422 | +nl_after_vbrace_close = true # false/true | |
1423 | + | |
1424 | +# Control the newline between the close brace and 'b' in: 'struct { int a; } b;' | |
1425 | +# Affects enums, unions and structures. If set to ignore, uses nl_after_brace_close. | |
1426 | +nl_brace_struct_var = ignore # ignore/add/remove/force | |
1427 | + | |
1428 | +# Whether to alter newlines in '#define' macros. | |
1429 | +nl_define_macro = false # false/true | |
1430 | + | |
1431 | +# Whether to alter newlines between consecutive paren closes, | |
1432 | +# The number of closing paren in a line will depend on respective open paren lines | |
1433 | +nl_squeeze_paren_close = false # false/true | |
1434 | + | |
1435 | +# Whether to remove blanks after '#ifxx' and '#elxx', or before '#elxx' and '#endif'. Does not affect top-level #ifdefs. | |
1436 | +nl_squeeze_ifdef = false # false/true | |
1437 | + | |
1438 | +# Makes the nl_squeeze_ifdef option affect the top-level #ifdefs as well. | |
1439 | +nl_squeeze_ifdef_top_level = false # false/true | |
1440 | + | |
1441 | +# Add or remove blank line before 'if'. | |
1442 | +nl_before_if = ignore # ignore/add/remove/force | |
1443 | + | |
1444 | +# Add or remove blank line after 'if' statement. | |
1445 | +# Add/Force work only if the next token is not a closing brace. | |
1446 | +nl_after_if = ignore # ignore/add/remove/force | |
1447 | + | |
1448 | +# Add or remove blank line before 'for'. | |
1449 | +nl_before_for = ignore # ignore/add/remove/force | |
1450 | + | |
1451 | +# Add or remove blank line after 'for' statement. | |
1452 | +nl_after_for = ignore # ignore/add/remove/force | |
1453 | + | |
1454 | +# Add or remove blank line before 'while'. | |
1455 | +nl_before_while = ignore # ignore/add/remove/force | |
1456 | + | |
1457 | +# Add or remove blank line after 'while' statement. | |
1458 | +nl_after_while = ignore # ignore/add/remove/force | |
1459 | + | |
1460 | +# Add or remove blank line before 'switch'. | |
1461 | +nl_before_switch = ignore # ignore/add/remove/force | |
1462 | + | |
1463 | +# Add or remove blank line after 'switch' statement. | |
1464 | +nl_after_switch = ignore # ignore/add/remove/force | |
1465 | + | |
1466 | +# Add or remove blank line before 'synchronized'. | |
1467 | +nl_before_synchronized = ignore # ignore/add/remove/force | |
1468 | + | |
1469 | +# Add or remove blank line after 'synchronized' statement. | |
1470 | +nl_after_synchronized = ignore # ignore/add/remove/force | |
1471 | + | |
1472 | +# Add or remove blank line before 'do'. | |
1473 | +nl_before_do = ignore # ignore/add/remove/force | |
1474 | + | |
1475 | +# Add or remove blank line after 'do/while' statement. | |
1476 | +nl_after_do = ignore # ignore/add/remove/force | |
1477 | + | |
1478 | +# Whether to double-space commented-entries in struct/union/enum. | |
1479 | +nl_ds_struct_enum_cmt = false # false/true | |
1480 | + | |
1481 | +# force nl before } of a struct/union/enum | |
1482 | +# (lower priority than 'eat_blanks_before_close_brace'). | |
1483 | +nl_ds_struct_enum_close_brace = false # false/true | |
1484 | + | |
1485 | +# Add or remove blank line before 'func_class_def'. | |
1486 | +nl_before_func_class_def = 0 # unsigned number | |
1487 | + | |
1488 | +# Add or remove blank line before 'func_class_proto'. | |
1489 | +nl_before_func_class_proto = 0 # unsigned number | |
1490 | + | |
1491 | +# Add or remove a newline before/after a class colon, | |
1492 | +# (tied to pos_class_colon). | |
1493 | +nl_class_colon = ignore # ignore/add/remove/force | |
1494 | + | |
1495 | +# Add or remove a newline around a class constructor colon. | |
1496 | +# Related to nl_constr_init_args, pos_constr_colon and pos_constr_comma. | |
1497 | +nl_constr_colon = force # ignore/add/remove/force | |
1498 | + | |
1499 | +# If true turns two liner namespace to one liner,else will make then four liners | |
1500 | +nl_namespace_two_to_one_liner = false # false/true | |
1501 | + | |
1502 | +# Change simple unbraced if statements into a one-liner | |
1503 | +# 'if(b)\n i++;' => 'if(b) i++;'. | |
1504 | +nl_create_if_one_liner = false # false/true | |
1505 | + | |
1506 | +# Change simple unbraced for statements into a one-liner | |
1507 | +# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);'. | |
1508 | +nl_create_for_one_liner = false # false/true | |
1509 | + | |
1510 | +# Change simple unbraced while statements into a one-liner | |
1511 | +# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);'. | |
1512 | +nl_create_while_one_liner = false # false/true | |
1513 | + | |
1514 | +# Change simple 4,3,2 liner function def statements into a one-liner | |
1515 | +nl_create_func_def_one_liner = false # false/true | |
1516 | + | |
1517 | +# Change a one-liner if statement into simple unbraced if | |
1518 | +# 'if(b) i++;' => 'if(b)\n i++;'. | |
1519 | +nl_split_if_one_liner = false # false/true | |
1520 | + | |
1521 | +# Change a one-liner for statement into simple unbraced for | |
1522 | +# 'for (i=0;<5;i++) foo(i);' => 'for (i=0;<5;i++)\n foo(i);'. | |
1523 | +nl_split_for_one_liner = false # false/true | |
1524 | + | |
1525 | +# Change a one-liner while statement into simple unbraced while | |
1526 | +# 'while (i<5) foo(i++);' => 'while (i<5)\n foo(i++);'. | |
1527 | +nl_split_while_one_liner = false # false/true | |
1528 | + | |
1529 | +# | |
1530 | +# Blank line options | |
1531 | +# | |
1532 | + | |
1533 | +# The maximum consecutive newlines (3 = 2 blank lines). | |
1534 | +nl_max = 3 # unsigned number | |
1535 | + | |
1536 | +# The maximum consecutive newlines in function. | |
1537 | +nl_max_blank_in_func = 0 # unsigned number | |
1538 | + | |
1539 | +# The number of newlines after a function prototype, if followed by another function prototype. | |
1540 | +nl_after_func_proto = 0 # unsigned number | |
1541 | + | |
1542 | +# The number of newlines after a function prototype, if not followed by another function prototype. | |
1543 | +nl_after_func_proto_group = 0 # unsigned number | |
1544 | + | |
1545 | +# The number of newlines after a function class prototype, if followed by another function class prototype. | |
1546 | +nl_after_func_class_proto = 0 # unsigned number | |
1547 | + | |
1548 | +# The number of newlines after a function class prototype, if not followed by another function class prototype. | |
1549 | +nl_after_func_class_proto_group = 0 # unsigned number | |
1550 | + | |
1551 | +# Whether one-line method definitions inside a class body should be treated | |
1552 | +# as if they were prototypes for the purposes of adding newlines. | |
1553 | +# | |
1554 | +# Requires nl_class_leave_one_liners=true. Overrides nl_before_func_body_def | |
1555 | +# and nl_before_func_class_def for one-liners. | |
1556 | +nl_class_leave_one_liner_groups = false # true/false | |
1557 | + | |
1558 | +# The number of newlines before a multi-line function def body. | |
1559 | +nl_before_func_body_def = 0 # unsigned number | |
1560 | + | |
1561 | +# The number of newlines before a multi-line function prototype body. | |
1562 | +nl_before_func_body_proto = 0 # unsigned number | |
1563 | + | |
1564 | +# The number of newlines after '}' of a multi-line function body. | |
1565 | +nl_after_func_body = 0 # unsigned number | |
1566 | + | |
1567 | +# The number of newlines after '}' of a multi-line function body in a class declaration. | |
1568 | +nl_after_func_body_class = 0 # unsigned number | |
1569 | + | |
1570 | +# The number of newlines after '}' of a single line function body. | |
1571 | +nl_after_func_body_one_liner = 0 # unsigned number | |
1572 | + | |
1573 | +# The minimum number of newlines before a multi-line comment. | |
1574 | +# Doesn't apply if after a brace open or another multi-line comment. | |
1575 | +nl_before_block_comment = 0 # unsigned number | |
1576 | + | |
1577 | +# The minimum number of newlines before a single-line C comment. | |
1578 | +# Doesn't apply if after a brace open or other single-line C comments. | |
1579 | +nl_before_c_comment = 0 # unsigned number | |
1580 | + | |
1581 | +# The minimum number of newlines before a CPP comment. | |
1582 | +# Doesn't apply if after a brace open or other CPP comments. | |
1583 | +nl_before_cpp_comment = 0 # unsigned number | |
1584 | + | |
1585 | +# Whether to force a newline after a multi-line comment. | |
1586 | +nl_after_multiline_comment = false # false/true | |
1587 | + | |
1588 | +# Whether to force a newline after a label's colon. | |
1589 | +nl_after_label_colon = false # false/true | |
1590 | + | |
1591 | +# The number of newlines after '}' or ';' of a struct/enum/union definition. | |
1592 | +nl_after_struct = 0 # unsigned number | |
1593 | + | |
1594 | +# The number of newlines before a class definition. | |
1595 | +nl_before_class = 0 # unsigned number | |
1596 | + | |
1597 | +# The number of newlines after '}' or ';' of a class definition. | |
1598 | +nl_after_class = 0 # unsigned number | |
1599 | + | |
1600 | +# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. | |
1601 | +# Will not change the newline count if after a brace open. | |
1602 | +# 0 = No change. | |
1603 | +nl_before_access_spec = 2 # unsigned number | |
1604 | + | |
1605 | +# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:' or 'slots:' label. | |
1606 | +# 0 = No change. | |
1607 | +# Overrides 'nl_typedef_blk_start' and 'nl_var_def_blk_start'. | |
1608 | +nl_after_access_spec = 1 # unsigned number | |
1609 | + | |
1610 | +# The number of newlines between a function def and the function comment. | |
1611 | +# 0 = No change. | |
1612 | +nl_comment_func_def = 0 # unsigned number | |
1613 | + | |
1614 | +# The number of newlines after a try-catch-finally block that isn't followed by a brace close. | |
1615 | +# 0 = No change. | |
1616 | +nl_after_try_catch_finally = 0 # unsigned number | |
1617 | + | |
1618 | +# The number of newlines before and after a property, indexer or event decl. | |
1619 | +# 0 = No change. | |
1620 | +nl_around_cs_property = 0 # unsigned number | |
1621 | + | |
1622 | +# The number of newlines between the get/set/add/remove handlers in C#. | |
1623 | +# 0 = No change. | |
1624 | +nl_between_get_set = 0 # unsigned number | |
1625 | + | |
1626 | +# Add or remove newline between C# property and the '{'. | |
1627 | +nl_property_brace = ignore # ignore/add/remove/force | |
1628 | + | |
1629 | +# The number of newlines after '{' of a namespace. This also adds newlines | |
1630 | +# before the matching '}'. | |
1631 | +# | |
1632 | +# 0 = Apply eat_blanks_after_open_brace or eat_blanks_before_close_brace if | |
1633 | +# applicable, otherwise no change. | |
1634 | +# | |
1635 | +# Overrides eat_blanks_after_open_brace and eat_blanks_before_close_brace. | |
1636 | +nl_inside_namespace = 0 # unsigned number | |
1637 | + | |
1638 | +# Whether to remove blank lines after '{'. | |
1639 | +eat_blanks_after_open_brace = false # false/true | |
1640 | + | |
1641 | +# Whether to remove blank lines before '}'. | |
1642 | +eat_blanks_before_close_brace = false # false/true | |
1643 | + | |
1644 | +# How aggressively to remove extra newlines not in preproc. | |
1645 | +# 0: No change | |
1646 | +# 1: Remove most newlines not handled by other config | |
1647 | +# 2: Remove all newlines and reformat completely by config | |
1648 | +nl_remove_extra_newlines = 0 # unsigned number | |
1649 | + | |
1650 | +# Whether to put a blank line before 'return' statements, unless after an open brace. | |
1651 | +nl_before_return = false # false/true | |
1652 | + | |
1653 | +# Whether to put a blank line after 'return' statements, unless followed by a close brace. | |
1654 | +nl_after_return = false # false/true | |
1655 | + | |
1656 | +# Whether to put a newline after a Java annotation statement. | |
1657 | +# Only affects annotations that are after a newline. | |
1658 | +nl_after_annotation = ignore # ignore/add/remove/force | |
1659 | + | |
1660 | +# Controls the newline between two annotations. | |
1661 | +nl_between_annotation = ignore # ignore/add/remove/force | |
1662 | + | |
1663 | +# | |
1664 | +# Positioning options | |
1665 | +# | |
1666 | + | |
1667 | +# The position of arithmetic operators in wrapped expressions. | |
1668 | +pos_arith = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1669 | + | |
1670 | +# The position of assignment in wrapped expressions. | |
1671 | +# Do not affect '=' followed by '{'. | |
1672 | +pos_assign = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1673 | + | |
1674 | +# The position of boolean operators in wrapped expressions. | |
1675 | +pos_bool = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1676 | + | |
1677 | +# The position of comparison operators in wrapped expressions. | |
1678 | +pos_compare = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1679 | + | |
1680 | +# The position of conditional (b ? t : f) operators in wrapped expressions. | |
1681 | +pos_conditional = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1682 | + | |
1683 | +# The position of the comma in wrapped expressions. | |
1684 | +pos_comma = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1685 | + | |
1686 | +# The position of the comma in enum entries. | |
1687 | +pos_enum_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1688 | + | |
1689 | +# The position of the comma in the base class list if there are more than one line, | |
1690 | +# (tied to nl_class_init_args). | |
1691 | +pos_class_comma = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1692 | + | |
1693 | +# The position of the comma in the constructor initialization list. | |
1694 | +# Related to nl_constr_colon, nl_constr_init_args and pos_constr_colon. | |
1695 | +pos_constr_comma = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1696 | + | |
1697 | +# The position of trailing/leading class colon, between class and base class list | |
1698 | +# (tied to nl_class_colon). | |
1699 | +pos_class_colon = lead_force # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1700 | + | |
1701 | +# The position of colons between constructor and member initialization, | |
1702 | +# (tied to nl_constr_colon). | |
1703 | +# Related to nl_constr_colon, nl_constr_init_args and pos_constr_comma. | |
1704 | +pos_constr_colon = lead_break # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force | |
1705 | + | |
1706 | +# | |
1707 | +# Line Splitting options | |
1708 | +# | |
1709 | + | |
1710 | +# Try to limit code width to N number of columns | |
1711 | +code_width = 100 # unsigned number | |
1712 | + | |
1713 | +# Whether to fully split long 'for' statements at semi-colons. | |
1714 | +ls_for_split_full = false # false/true | |
1715 | + | |
1716 | +# Whether to fully split long function protos/calls at commas. | |
1717 | +ls_func_split_full = false # false/true | |
1718 | + | |
1719 | +# Whether to split lines as close to code_width as possible and ignore some groupings. | |
1720 | +ls_code_width = false # false/true | |
1721 | + | |
1722 | +# | |
1723 | +# Code alignment (not left column spaces/tabs) | |
1724 | +# | |
1725 | + | |
1726 | +# Whether to keep non-indenting tabs. | |
1727 | +align_keep_tabs = false # false/true | |
1728 | + | |
1729 | +# Whether to use tabs for aligning. | |
1730 | +align_with_tabs = false # false/true | |
1731 | + | |
1732 | +# Whether to bump out to the next tab when aligning. | |
1733 | +align_on_tabstop = false # false/true | |
1734 | + | |
1735 | +# Whether to right-align numbers. | |
1736 | +align_number_right = false # false/true | |
1737 | + | |
1738 | +# Whether to keep whitespace not required for alignment. | |
1739 | +align_keep_extra_space = false # false/true | |
1740 | + | |
1741 | +# Align variable definitions in prototypes and functions. | |
1742 | +align_func_params = false # false/true | |
1743 | + | |
1744 | +# The span for aligning parameter definitions in function on parameter name (0=don't align). | |
1745 | +align_func_params_span = 0 # unsigned number | |
1746 | + | |
1747 | +# The threshold for aligning function parameter definitions (0=no limit). | |
1748 | +align_func_params_thresh = 0 # unsigned number | |
1749 | + | |
1750 | +# The gap for aligning function parameter definitions. | |
1751 | +align_func_params_gap = 0 # unsigned number | |
1752 | + | |
1753 | +# Align parameters in single-line functions that have the same name. | |
1754 | +# The function names must already be aligned with each other. | |
1755 | +align_same_func_call_params = false # false/true | |
1756 | + | |
1757 | +# The span for aligning function-call parameters for single line functions. | |
1758 | +# 0 = Don't align (default). | |
1759 | +align_same_func_call_params_span = 0 # unsigned number | |
1760 | + | |
1761 | +# The threshold for aligning function-call parameters for single line | |
1762 | +# functions. | |
1763 | +# 0 = No limit (default). | |
1764 | +align_same_func_call_params_thresh = 0 # unsigned number | |
1765 | + | |
1766 | +# The span for aligning variable definitions (0=don't align) | |
1767 | +align_var_def_span = 0 # unsigned number | |
1768 | + | |
1769 | +# How to align the star in variable definitions. | |
1770 | +# 0=Part of the type 'void * foo;' | |
1771 | +# 1=Part of the variable 'void *foo;' | |
1772 | +# 2=Dangling 'void *foo;' | |
1773 | +align_var_def_star_style = 0 # unsigned number | |
1774 | + | |
1775 | +# How to align the '&' in variable definitions. | |
1776 | +# 0=Part of the type | |
1777 | +# 1=Part of the variable | |
1778 | +# 2=Dangling | |
1779 | +align_var_def_amp_style = 0 # unsigned number | |
1780 | + | |
1781 | +# The threshold for aligning variable definitions (0=no limit) | |
1782 | +align_var_def_thresh = 0 # unsigned number | |
1783 | + | |
1784 | +# The gap for aligning variable definitions. | |
1785 | +align_var_def_gap = 0 # unsigned number | |
1786 | + | |
1787 | +# Whether to align the colon in struct bit fields. | |
1788 | +align_var_def_colon = false # false/true | |
1789 | + | |
1790 | +# align variable defs gap for bit colons. | |
1791 | +align_var_def_colon_gap = 0 # unsigned number | |
1792 | + | |
1793 | +# Whether to align any attribute after the variable name. | |
1794 | +align_var_def_attribute = false # false/true | |
1795 | + | |
1796 | +# Whether to align inline struct/enum/union variable definitions. | |
1797 | +align_var_def_inline = false # false/true | |
1798 | + | |
1799 | +# The span for aligning on '=' in assignments (0=don't align) | |
1800 | +align_assign_span = 0 # unsigned number | |
1801 | + | |
1802 | +# The threshold for aligning on '=' in assignments (0=no limit) | |
1803 | +align_assign_thresh = 0 # unsigned number | |
1804 | + | |
1805 | +# How to apply align_assign_span to function declaration "assignments", i.e. | |
1806 | +# 'virtual void foo() = 0' or '~foo() = {default|delete}'. | |
1807 | +# 0: Align with other assignments (default) | |
1808 | +# 1: Align with each other, ignoring regular assignments | |
1809 | +# 2: Don't align | |
1810 | +align_assign_decl_func = 0 # unsigned number | |
1811 | + | |
1812 | +# The span for aligning on '=' in enums (0=don't align) | |
1813 | +align_enum_equ_span = 0 # unsigned number | |
1814 | + | |
1815 | +# The threshold for aligning on '=' in enums (0=no limit) | |
1816 | +align_enum_equ_thresh = 0 # unsigned number | |
1817 | + | |
1818 | +# The span for aligning class (0=don't align) | |
1819 | +align_var_class_span = 0 # unsigned number | |
1820 | + | |
1821 | +# The threshold for aligning class member definitions (0=no limit). | |
1822 | +align_var_class_thresh = 0 # unsigned number | |
1823 | + | |
1824 | +# The gap for aligning class member definitions. | |
1825 | +align_var_class_gap = 0 # unsigned number | |
1826 | + | |
1827 | +# The span for aligning struct/union (0=don't align) | |
1828 | +align_var_struct_span = 0 # unsigned number | |
1829 | + | |
1830 | +# The threshold for aligning struct/union member definitions (0=no limit) | |
1831 | +align_var_struct_thresh = 0 # unsigned number | |
1832 | + | |
1833 | +# The gap for aligning struct/union member definitions. | |
1834 | +align_var_struct_gap = 0 # unsigned number | |
1835 | + | |
1836 | +# The span for aligning struct initializer values (0=don't align) | |
1837 | +align_struct_init_span = 0 # unsigned number | |
1838 | + | |
1839 | +# The minimum space between the type and the synonym of a typedef. | |
1840 | +align_typedef_gap = 0 # unsigned number | |
1841 | + | |
1842 | +# The span for aligning single-line typedefs (0=don't align). | |
1843 | +align_typedef_span = 0 # unsigned number | |
1844 | + | |
1845 | +# How to align typedef'd functions with other typedefs | |
1846 | +# 0: Don't mix them at all | |
1847 | +# 1: align the open paren with the types | |
1848 | +# 2: align the function type name with the other type names | |
1849 | +align_typedef_func = 0 # unsigned number | |
1850 | + | |
1851 | +# Controls the positioning of the '*' in typedefs. Just try it. | |
1852 | +# 0: Align on typedef type, ignore '*' | |
1853 | +# 1: The '*' is part of type name: typedef int *pint; | |
1854 | +# 2: The '*' is part of the type, but dangling: typedef int *pint; | |
1855 | +align_typedef_star_style = 0 # unsigned number | |
1856 | + | |
1857 | +# Controls the positioning of the '&' in typedefs. Just try it. | |
1858 | +# 0: Align on typedef type, ignore '&' | |
1859 | +# 1: The '&' is part of type name: typedef int &pint; | |
1860 | +# 2: The '&' is part of the type, but dangling: typedef int &pint; | |
1861 | +align_typedef_amp_style = 0 # unsigned number | |
1862 | + | |
1863 | +# The span for aligning comments that end lines (0=don't align) | |
1864 | +align_right_cmt_span = 0 # unsigned number | |
1865 | + | |
1866 | +# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment. | |
1867 | +align_right_cmt_mix = false # false/true | |
1868 | + | |
1869 | +# Whether to only align trailing comments that are at the same brace level. | |
1870 | +align_right_cmt_same_level = false # true/false | |
1871 | + | |
1872 | +# If a trailing comment is more than this number of columns away from the text it follows, | |
1873 | +# it will qualify for being aligned. This has to be > 0 to do anything. | |
1874 | +align_right_cmt_gap = 0 # unsigned number | |
1875 | + | |
1876 | +# Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) | |
1877 | +align_right_cmt_at_col = 0 # unsigned number | |
1878 | + | |
1879 | +# The span for aligning function prototypes (0=don't align). | |
1880 | +align_func_proto_span = 0 # unsigned number | |
1881 | + | |
1882 | +# Minimum gap between the return type and the function name. | |
1883 | +align_func_proto_gap = 0 # unsigned number | |
1884 | + | |
1885 | +# Align function protos on the 'operator' keyword instead of what follows. | |
1886 | +align_on_operator = false # false/true | |
1887 | + | |
1888 | +# Whether to mix aligning prototype and variable declarations. | |
1889 | +# If True, align_var_def_XXX options are used instead of align_func_proto_XXX options. | |
1890 | +align_mix_var_proto = false # false/true | |
1891 | + | |
1892 | +# Align single-line functions with function prototypes, uses align_func_proto_span. | |
1893 | +align_single_line_func = false # false/true | |
1894 | + | |
1895 | +# Aligning the open brace of single-line functions. | |
1896 | +# Requires align_single_line_func=True, uses align_func_proto_span. | |
1897 | +align_single_line_brace = false # false/true | |
1898 | + | |
1899 | +# Gap for align_single_line_brace. | |
1900 | +align_single_line_brace_gap = 0 # unsigned number | |
1901 | + | |
1902 | +# The span for aligning ObjC msg spec (0=don't align) | |
1903 | +align_oc_msg_spec_span = 0 # unsigned number | |
1904 | + | |
1905 | +# Whether to align macros wrapped with a backslash and a newline. | |
1906 | +# This will not work right if the macro contains a multi-line comment. | |
1907 | +align_nl_cont = false # false/true | |
1908 | + | |
1909 | +# # Align macro functions and variables together. | |
1910 | +align_pp_define_together = false # false/true | |
1911 | + | |
1912 | +# The minimum space between label and value of a preprocessor define. | |
1913 | +align_pp_define_gap = 0 # unsigned number | |
1914 | + | |
1915 | +# The span for aligning on '#define' bodies (0=don't align, other=number of lines including comments between blocks) | |
1916 | +align_pp_define_span = 0 # unsigned number | |
1917 | + | |
1918 | +# Align lines that start with '<<' with previous '<<'. Default=True. | |
1919 | +align_left_shift = true # false/true | |
1920 | + | |
1921 | +# Align text after asm volatile () colons. | |
1922 | +align_asm_colon = false # false/true | |
1923 | + | |
1924 | +# Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) | |
1925 | +align_oc_msg_colon_span = 0 # unsigned number | |
1926 | + | |
1927 | +# If True, always align with the first parameter, even if it is too short. | |
1928 | +align_oc_msg_colon_first = false # false/true | |
1929 | + | |
1930 | +# Aligning parameters in an Obj-C '+' or '-' declaration on the ':'. | |
1931 | +align_oc_decl_colon = false # false/true | |
1932 | + | |
1933 | +# | |
1934 | +# Comment modifications | |
1935 | +# | |
1936 | + | |
1937 | +# Try to wrap comments at cmt_width columns | |
1938 | +cmt_width = 0 # unsigned number | |
1939 | + | |
1940 | +# Set the comment reflow mode (Default=0) | |
1941 | +# 0: no reflowing (apart from the line wrapping due to cmt_width) | |
1942 | +# 1: no touching at all | |
1943 | +# 2: full reflow | |
1944 | +cmt_reflow_mode = 0 # unsigned number | |
1945 | + | |
1946 | +# Whether to convert all tabs to spaces in comments. Default is to leave tabs inside comments alone, unless used for indenting. | |
1947 | +cmt_convert_tab_to_spaces = false # false/true | |
1948 | + | |
1949 | +# If False, disable all multi-line comment changes, including cmt_width. keyword substitution and leading chars. | |
1950 | +# Default=True. | |
1951 | +cmt_indent_multi = false # false/true | |
1952 | + | |
1953 | +# Whether to group c-comments that look like they are in a block. | |
1954 | +cmt_c_group = false # false/true | |
1955 | + | |
1956 | +# Whether to put an empty '/*' on the first line of the combined c-comment. | |
1957 | +cmt_c_nl_start = false # false/true | |
1958 | + | |
1959 | +# Whether to put a newline before the closing '*/' of the combined c-comment. | |
1960 | +cmt_c_nl_end = false # false/true | |
1961 | + | |
1962 | +# Whether to group cpp-comments that look like they are in a block. | |
1963 | +cmt_cpp_group = false # false/true | |
1964 | + | |
1965 | +# Whether to put an empty '/*' on the first line of the combined cpp-comment. | |
1966 | +cmt_cpp_nl_start = false # false/true | |
1967 | + | |
1968 | +# Whether to put a newline before the closing '*/' of the combined cpp-comment. | |
1969 | +cmt_cpp_nl_end = false # false/true | |
1970 | + | |
1971 | +# Whether to change cpp-comments into c-comments. | |
1972 | +cmt_cpp_to_c = false # false/true | |
1973 | + | |
1974 | +# Whether to put a star on subsequent comment lines. | |
1975 | +cmt_star_cont = false # false/true | |
1976 | + | |
1977 | +# The number of spaces to insert at the start of subsequent comment lines. | |
1978 | +cmt_sp_before_star_cont = 0 # unsigned number | |
1979 | + | |
1980 | +# The number of spaces to insert after the star on subsequent comment lines. | |
1981 | +cmt_sp_after_star_cont = 0 # number | |
1982 | + | |
1983 | +# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of | |
1984 | +# the comment are the same length. Default=True. | |
1985 | +cmt_multi_check_last = true # false/true | |
1986 | + | |
1987 | +# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of | |
1988 | +# the comment are the same length AND if the length is bigger as the first_len minimum. Default=4 | |
1989 | +cmt_multi_first_len_minimum = 4 # unsigned number | |
1990 | + | |
1991 | +# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. | |
1992 | +# Will substitute $(filename) with the current file's name. | |
1993 | +cmt_insert_file_header = "" # string | |
1994 | + | |
1995 | +# The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. | |
1996 | +# Will substitute $(filename) with the current file's name. | |
1997 | +cmt_insert_file_footer = "" # string | |
1998 | + | |
1999 | +# The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. | |
2000 | +# Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. | |
2001 | +# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }. | |
2002 | +cmt_insert_func_header = "" # string | |
2003 | + | |
2004 | +# The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. | |
2005 | +# Will substitute $(class) with the class name. | |
2006 | +cmt_insert_class_header = "" # string | |
2007 | + | |
2008 | +# The filename that contains text to insert before a Obj-C message specification if the method isn't preceded with a C/C++ comment. | |
2009 | +# Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. | |
2010 | +cmt_insert_oc_msg_header = "" # string | |
2011 | + | |
2012 | +# If a preprocessor is encountered when stepping backwards from a function name, then | |
2013 | +# this option decides whether the comment should be inserted. | |
2014 | +# Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header. | |
2015 | +cmt_insert_before_preproc = false # false/true | |
2016 | + | |
2017 | +# If a function is declared inline to a class definition, then | |
2018 | +# this option decides whether the comment should be inserted. | |
2019 | +# Affects cmt_insert_func_header. | |
2020 | +cmt_insert_before_inlines = true # false/true | |
2021 | + | |
2022 | +# If the function is a constructor/destructor, then | |
2023 | +# this option decides whether the comment should be inserted. | |
2024 | +# Affects cmt_insert_func_header. | |
2025 | +cmt_insert_before_ctor_dtor = false # false/true | |
2026 | + | |
2027 | +# | |
2028 | +# Code modifying options (non-whitespace) | |
2029 | +# | |
2030 | + | |
2031 | +# Add or remove braces on single-line 'do' statement. | |
2032 | +mod_full_brace_do = force # ignore/add/remove/force | |
2033 | + | |
2034 | +# Add or remove braces on single-line 'for' statement. | |
2035 | +mod_full_brace_for = force # ignore/add/remove/force | |
2036 | + | |
2037 | +# Add or remove braces on single-line function definitions. (Pawn). | |
2038 | +mod_full_brace_function = force # ignore/add/remove/force | |
2039 | + | |
2040 | +# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. | |
2041 | +mod_full_brace_if = force # ignore/add/remove/force | |
2042 | + | |
2043 | +# Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. | |
2044 | +# If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. | |
2045 | +mod_full_brace_if_chain = false # false/true | |
2046 | + | |
2047 | +# Make all if/elseif/else statements with at least one 'else' or 'else if' fully braced. | |
2048 | +# If mod_full_brace_if_chain is used together with this option, all if-else chains will get braces, | |
2049 | +# and simple 'if' statements will lose them (if possible). | |
2050 | +mod_full_brace_if_chain_only = false # false/true | |
2051 | + | |
2052 | +# Don't remove braces around statements that span N newlines | |
2053 | +mod_full_brace_nl = 0 # unsigned number | |
2054 | + | |
2055 | +# Blocks removal of braces if the parenthesis of if/for/while/.. span multiple lines. | |
2056 | +mod_full_brace_nl_block_rem_mlcond = false # false/true | |
2057 | + | |
2058 | +# Add or remove braces on single-line 'while' statement. | |
2059 | +mod_full_brace_while = force # ignore/add/remove/force | |
2060 | + | |
2061 | +# Add or remove braces on single-line 'using ()' statement. | |
2062 | +mod_full_brace_using = force # ignore/add/remove/force | |
2063 | + | |
2064 | +# Add or remove unnecessary paren on 'return' statement. | |
2065 | +mod_paren_on_return = remove # ignore/add/remove/force | |
2066 | + | |
2067 | +# Whether to change optional semicolons to real semicolons. | |
2068 | +mod_pawn_semicolon = true # false/true | |
2069 | + | |
2070 | +# Add parens on 'while' and 'if' statement around bools. | |
2071 | +mod_full_paren_if_bool = false # false/true | |
2072 | + | |
2073 | +# Whether to remove superfluous semicolons. | |
2074 | +mod_remove_extra_semicolon = true # false/true | |
2075 | + | |
2076 | +# If a function body exceeds the specified number of newlines and doesn't have a comment after | |
2077 | +# the close brace, a comment will be added. | |
2078 | +mod_add_long_function_closebrace_comment = 0 # unsigned number | |
2079 | + | |
2080 | +# If a namespace body exceeds the specified number of newlines and doesn't have a comment after | |
2081 | +# the close brace, a comment will be added. | |
2082 | +mod_add_long_namespace_closebrace_comment = 0 # unsigned number | |
2083 | + | |
2084 | +# If a class body exceeds the specified number of newlines and doesn't have a comment after | |
2085 | +# the close brace, a comment will be added. | |
2086 | +mod_add_long_class_closebrace_comment = 0 # unsigned number | |
2087 | + | |
2088 | +# If a switch body exceeds the specified number of newlines and doesn't have a comment after | |
2089 | +# the close brace, a comment will be added. | |
2090 | +mod_add_long_switch_closebrace_comment = 0 # unsigned number | |
2091 | + | |
2092 | +# If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after | |
2093 | +# the #endif, a comment will be added. | |
2094 | +mod_add_long_ifdef_endif_comment = 0 # unsigned number | |
2095 | + | |
2096 | +# If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after | |
2097 | +# the #else, a comment will be added. | |
2098 | +mod_add_long_ifdef_else_comment = 0 # unsigned number | |
2099 | + | |
2100 | +# If True, will sort consecutive single-line 'import' statements [Java, D]. | |
2101 | +mod_sort_import = false # false/true | |
2102 | + | |
2103 | +# If True, will sort consecutive single-line 'using' statements [C#]. | |
2104 | +mod_sort_using = false # false/true | |
2105 | + | |
2106 | +# If True, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] | |
2107 | +# This is generally a bad idea, as it may break your code. | |
2108 | +mod_sort_include = false # false/true | |
2109 | + | |
2110 | +# If True, it will move a 'break' that appears after a fully braced 'case' before the close brace. | |
2111 | +mod_move_case_break = false # false/true | |
2112 | + | |
2113 | +# Will add or remove the braces around a fully braced case statement. | |
2114 | +# Will only remove the braces if there are no variable declarations in the block. | |
2115 | +mod_case_brace = ignore # ignore/add/remove/force | |
2116 | + | |
2117 | +# If True, it will remove a void 'return;' that appears as the last statement in a function. | |
2118 | +mod_remove_empty_return = true # false/true | |
2119 | + | |
2120 | +# Add or remove the comma after the last value of an enumeration. | |
2121 | +mod_enum_last_comma = ignore # ignore/add/remove/force | |
2122 | + | |
2123 | +# If True, it will organize the properties (Obj-C). | |
2124 | +mod_sort_oc_properties = false # false/true | |
2125 | + | |
2126 | +# Determines weight of class property modifier (Obj-C). | |
2127 | +mod_sort_oc_property_class_weight = 0 # number | |
2128 | + | |
2129 | +# Determines weight of atomic, nonatomic (Obj-C). | |
2130 | +mod_sort_oc_property_thread_safe_weight = 0 # number | |
2131 | + | |
2132 | +# Determines weight of readwrite (Obj-C). | |
2133 | +mod_sort_oc_property_readwrite_weight = 0 # number | |
2134 | + | |
2135 | +# Determines weight of reference type (retain, copy, assign, weak, strong) (Obj-C). | |
2136 | +mod_sort_oc_property_reference_weight = 0 # number | |
2137 | + | |
2138 | +# Determines weight of getter type (getter=) (Obj-C). | |
2139 | +mod_sort_oc_property_getter_weight = 0 # number | |
2140 | + | |
2141 | +# Determines weight of setter type (setter=) (Obj-C). | |
2142 | +mod_sort_oc_property_setter_weight = 0 # number | |
2143 | + | |
2144 | +# Determines weight of nullability type (nullable, nonnull, null_unspecified, null_resettable) (Obj-C). | |
2145 | +mod_sort_oc_property_nullability_weight = 0 # number | |
2146 | + | |
2147 | +# | |
2148 | +# Preprocessor options | |
2149 | +# | |
2150 | + | |
2151 | +# Control indent of preprocessors inside #if blocks at brace level 0 (file-level). | |
2152 | +pp_indent = ignore # ignore/add/remove/force | |
2153 | + | |
2154 | +# Whether to indent #if/#else/#endif at the brace level (True) or from column 1 (False). | |
2155 | +pp_indent_at_level = false # false/true | |
2156 | + | |
2157 | +# Specifies the number of columns to indent preprocessors per level at brace level 0 (file-level). | |
2158 | +# If pp_indent_at_level=False, specifies the number of columns to indent preprocessors per level at brace level > 0 (function-level). | |
2159 | +# Default=1. | |
2160 | +pp_indent_count = 2 # unsigned number | |
2161 | + | |
2162 | +# Add or remove space after # based on pp_level of #if blocks. | |
2163 | +pp_space = ignore # ignore/add/remove/force | |
2164 | + | |
2165 | +# Sets the number of spaces added with pp_space. | |
2166 | +pp_space_count = 0 # unsigned number | |
2167 | + | |
2168 | +# The indent for #region and #endregion in C# and '#pragma region' in C/C++. | |
2169 | +pp_indent_region = 0 # number | |
2170 | + | |
2171 | +# Whether to indent the code between #region and #endregion. | |
2172 | +pp_region_indent_code = false # false/true | |
2173 | + | |
2174 | +# If pp_indent_at_level=True, sets the indent for #if, #else and #endif when not at file-level. | |
2175 | +# 0: indent preprocessors using output_tab_size. | |
2176 | +# >0: column at which all preprocessors will be indented. | |
2177 | +pp_indent_if = 0 # number | |
2178 | + | |
2179 | +# Control whether to indent the code between #if, #else and #endif. | |
2180 | +pp_if_indent_code = false # false/true | |
2181 | + | |
2182 | +# Whether to indent '#define' at the brace level (True) or from column 1 (false). | |
2183 | +pp_define_at_level = false # false/true | |
2184 | + | |
2185 | +# Whether to ignore the '#define' body while formatting. | |
2186 | +pp_ignore_define_body = false # false/true | |
2187 | + | |
2188 | +# Whether to indent case statements between #if, #else, and #endif. | |
2189 | +# Only applies to the indent of the preprocesser that the case statements directly inside of. | |
2190 | +pp_indent_case = true # false/true | |
2191 | + | |
2192 | +# Whether to indent whole function definitions between #if, #else, and #endif. | |
2193 | +# Only applies to the indent of the preprocesser that the function definition is directly inside of. | |
2194 | +pp_indent_func_def = true # false/true | |
2195 | + | |
2196 | +# Whether to indent extern C blocks between #if, #else, and #endif. | |
2197 | +# Only applies to the indent of the preprocesser that the extern block is directly inside of. | |
2198 | +pp_indent_extern = true # false/true | |
2199 | + | |
2200 | +# Whether to indent braces directly inside #if, #else, and #endif. | |
2201 | +# Only applies to the indent of the preprocesser that the braces are directly inside of. | |
2202 | +pp_indent_brace = true # false/true | |
2203 | + | |
2204 | +# | |
2205 | +# Sort includes options | |
2206 | +# | |
2207 | + | |
2208 | +# The regex for include category with priority 0. | |
2209 | +include_category_0 = "" # string | |
2210 | + | |
2211 | +# The regex for include category with priority 1. | |
2212 | +include_category_1 = "" # string | |
2213 | + | |
2214 | +# The regex for include category with priority 2. | |
2215 | +include_category_2 = "" # string | |
2216 | + | |
2217 | +# | |
2218 | +# Use or Do not Use options | |
2219 | +# | |
2220 | + | |
2221 | +# True: indent_func_call_param will be used (default) | |
2222 | +# False: indent_func_call_param will NOT be used. | |
2223 | +use_indent_func_call_param = true # false/true | |
2224 | + | |
2225 | +# The value of the indentation for a continuation line is calculate differently if the statement is: | |
2226 | +# a declaration: your case with QString fileName ... | |
2227 | +# an assignment: your case with pSettings = new QSettings( ... | |
2228 | +# At the second case the indentation value might be used twice: | |
2229 | +# at the assignment | |
2230 | +# at the function call (if present) | |
2231 | +# To prevent the double use of the indentation value, use this option with the value 'True'. | |
2232 | +# True: indent_continue will be used only once | |
2233 | +# False: indent_continue will be used every time (default). | |
2234 | +use_indent_continue_only_once = false # false/true | |
2235 | + | |
2236 | +# the value might be used twice: | |
2237 | +# at the assignment | |
2238 | +# at the opening brace | |
2239 | +# To prevent the double use of the indentation value, use this option with the value 'True'. | |
2240 | +# True: indentation will be used only once | |
2241 | +# False: indentation will be used every time (default). | |
2242 | +indent_cpp_lambda_only_once = false # false/true | |
2243 | + | |
2244 | +# SIGNAL/SLOT Qt macros have special formatting options. See options_for_QT.cpp for details. | |
2245 | +# Default=True. | |
2246 | +use_options_overriding_for_qt_macros = true # false/true | |
2247 | + | |
2248 | +# | |
2249 | +# Warn levels - 1: error, 2: warning (default), 3: note | |
2250 | +# | |
2251 | + | |
2252 | +# Warning is given if doing tab-to-\t replacement and we have found one in a C# verbatim string literal. | |
2253 | +warn_level_tabs_found_in_verbatim_string_literals = 2 # unsigned number | |
2254 | + | |
2255 | +# Meaning of the settings: | |
2256 | +# Ignore - do not do any changes | |
2257 | +# Add - makes sure there is 1 or more space/brace/newline/etc | |
2258 | +# Force - makes sure there is exactly 1 space/brace/newline/etc, | |
2259 | +# behaves like Add in some contexts | |
2260 | +# Remove - removes space/brace/newline/etc | |
2261 | +# | |
2262 | +# | |
2263 | +# - Token(s) can be treated as specific type(s) with the 'set' option: | |
2264 | +# `set tokenType tokenString [tokenString...]` | |
2265 | +# | |
2266 | +# Example: | |
2267 | +# `set BOOL __AND__ __OR__` | |
2268 | +# | |
2269 | +# tokenTypes are defined in src/token_enum.h, use them without the | |
2270 | +# 'CT_' prefix: 'CT_BOOL' -> 'BOOL' | |
2271 | +# | |
2272 | +# | |
2273 | +# - Token(s) can be treated as type(s) with the 'type' option. | |
2274 | +# `type tokenString [tokenString...]` | |
2275 | +# | |
2276 | +# Example: | |
2277 | +# `type int c_uint_8 Rectangle` | |
2278 | +# | |
2279 | +# This can also be achieved with `set TYPE int c_uint_8 Rectangle` | |
2280 | +# | |
2281 | +# | |
2282 | +# To embed whitespace in tokenStrings use the '\' escape character, or quote | |
2283 | +# the tokenStrings. These quotes are supported: "'` | |
2284 | +# | |
2285 | +# | |
2286 | +# - Support for the auto detection of languages through the file ending can be | |
2287 | +# added using the 'file_ext' command. | |
2288 | +# `file_ext langType langString [langString..]` | |
2289 | +# | |
2290 | +# Example: | |
2291 | +# `file_ext CPP .ch .cxx .cpp.in` | |
2292 | +# | |
2293 | +# langTypes are defined in uncrusify_types.h in the lang_flag_e enum, use | |
2294 | +# them without the 'LANG_' prefix: 'LANG_CPP' -> 'CPP' | |
2295 | +# | |
2296 | +# | |
2297 | +# - Custom macro-based indentation can be set up using 'macro-open', | |
2298 | +# 'macro-else' and 'macro-close'. | |
2299 | +# `(macro-open | macro-else | macro-close) tokenString` | |
2300 | +# | |
2301 | +# Example: | |
2302 | +# `macro-open BEGIN_TEMPLATE_MESSAGE_MAP` | |
2303 | +# `macro-open BEGIN_MESSAGE_MAP` | |
2304 | +# `macro-close END_MESSAGE_MAP` | |
2305 | +# | |
2306 | +# | |
2307 | +# option(s) with 'not default' value: 0 | |
2308 | +# |
+++ p9n_interface/.vscode/c_cpp_properties.json
... | ... | @@ -0,0 +1,21 @@ |
1 | +{ | |
2 | + "configurations": [ | |
3 | + { | |
4 | + "browse": { | |
5 | + "databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db", | |
6 | + "limitSymbolsToIncludedHeaders": false | |
7 | + }, | |
8 | + "includePath": [ | |
9 | + "/opt/ros/galactic/include/**", | |
10 | + "/usr/include/**", | |
11 | + "${workspaceFolder}/include/**" | |
12 | + ], | |
13 | + "name": "ROS", | |
14 | + "intelliSenseMode": "clang-x64", | |
15 | + "compilerPath": "/usr/bin/gcc", | |
16 | + "cStandard": "c99", | |
17 | + "cppStandard": "c++17" | |
18 | + } | |
19 | + ], | |
20 | + "version": 4 | |
21 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ p9n_interface/.vscode/cspell.json
... | ... | @@ -0,0 +1,1 @@ |
1 | +../../.vscode/cspell.json(파일 끝에 줄바꿈 문자 없음) |
+++ p9n_interface/.vscode/settings.json
... | ... | @@ -0,0 +1,1 @@ |
1 | +../../.vscode/settings.json(파일 끝에 줄바꿈 문자 없음) |
+++ p9n_interface/.vscode/uncrustify.cfg
... | ... | @@ -0,0 +1,1 @@ |
1 | +../../.vscode/uncrustify.cfg(파일 끝에 줄바꿈 문자 없음) |
+++ p9n_interface/CMakeLists.txt
... | ... | @@ -0,0 +1,27 @@ |
1 | +cmake_minimum_required(VERSION 3.8) | |
2 | +project(p9n_interface) | |
3 | + | |
4 | +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | |
5 | + add_compile_options(-Wall -Wextra -Wpedantic) | |
6 | +endif() | |
7 | + | |
8 | +find_package(ament_cmake_auto REQUIRED) | |
9 | +ament_auto_find_build_dependencies() | |
10 | + | |
11 | +# p9n interface ===================================================== | |
12 | +ament_auto_add_library( | |
13 | + ${PROJECT_NAME} | |
14 | + STATIC | |
15 | + ./src/${PROJECT_NAME}.cpp | |
16 | +) | |
17 | +set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) | |
18 | +# End p9n interface ================================================= | |
19 | + | |
20 | +if(BUILD_TESTING) | |
21 | + find_package(ament_lint_auto REQUIRED) | |
22 | + set(ament_cmake_copyright_FOUND TRUE) | |
23 | + set(ament_cmake_cpplint_FOUND TRUE) | |
24 | + ament_lint_auto_find_test_dependencies() | |
25 | +endif() | |
26 | + | |
27 | +ament_auto_package() |
+++ p9n_interface/include/p9n_interface/hw_types.hpp
... | ... | @@ -0,0 +1,41 @@ |
1 | +// Copyright 2022 HarvestX Inc. | |
2 | +// | |
3 | +// Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | +// you may not use this file except in compliance with the License. | |
5 | +// You may obtain a copy of the License at | |
6 | +// | |
7 | +// http://www.apache.org/licenses/LICENSE-2.0 | |
8 | +// | |
9 | +// Unless required by applicable law or agreed to in writing, software | |
10 | +// distributed under the License is distributed on an "AS IS" BASIS, | |
11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | +// See the License for the specific language governing permissions and | |
13 | +// limitations under the License. | |
14 | + | |
15 | +#pragma once | |
16 | + | |
17 | +#include <string> | |
18 | + | |
19 | +namespace p9n_interface | |
20 | +{ | |
21 | +enum class HW_TYPE | |
22 | +{ | |
23 | + DUALSHOCK3, | |
24 | + DUALSHOCK4, | |
25 | + DUALSENSE, | |
26 | +}; | |
27 | + | |
28 | +std::string getHWName(const HW_TYPE & hw_type) | |
29 | +{ | |
30 | + switch (hw_type) { | |
31 | + case HW_TYPE::DUALSHOCK3: | |
32 | + return "DualShock3"; | |
33 | + case HW_TYPE::DUALSHOCK4: | |
34 | + return "DualShock4"; | |
35 | + case HW_TYPE::DUALSENSE: | |
36 | + return "DualSense"; | |
37 | + default: | |
38 | + return "Unknown"; | |
39 | + } | |
40 | +} | |
41 | +} // namespace p9n_interface |
+++ p9n_interface/include/p9n_interface/p9n_interface.hpp
... | ... | @@ -0,0 +1,100 @@ |
1 | +// Copyright 2022 HarvestX Inc. | |
2 | +// | |
3 | +// Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | +// you may not use this file except in compliance with the License. | |
5 | +// You may obtain a copy of the License at | |
6 | +// | |
7 | +// http://www.apache.org/licenses/LICENSE-2.0 | |
8 | +// | |
9 | +// Unless required by applicable law or agreed to in writing, software | |
10 | +// distributed under the License is distributed on an "AS IS" BASIS, | |
11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | +// See the License for the specific language governing permissions and | |
13 | +// limitations under the License. | |
14 | + | |
15 | +#pragma once | |
16 | + | |
17 | +#include "p9n_interface/hw_types.hpp" | |
18 | + | |
19 | +#include "p9n_interface/ps3_dualshock3.hpp" | |
20 | +#include "p9n_interface/ps4_dualshock4.hpp" | |
21 | +#include "p9n_interface/ps5_dualsense.hpp" | |
22 | + | |
23 | +#include <rclcpp/rclcpp.hpp> | |
24 | +#include <sensor_msgs/msg/joy.hpp> | |
25 | + | |
26 | +namespace p9n_interface | |
27 | +{ | |
28 | +typedef struct | |
29 | +{ | |
30 | + size_t square; | |
31 | + size_t circle; | |
32 | + size_t triangle; | |
33 | + size_t cross; | |
34 | + | |
35 | + size_t L1; | |
36 | + size_t R1; | |
37 | + size_t R2; | |
38 | + size_t L2; | |
39 | + | |
40 | + size_t select; | |
41 | + size_t start; | |
42 | + size_t PS; | |
43 | +} JoyButtonIdx; | |
44 | + | |
45 | +typedef struct | |
46 | +{ | |
47 | + | |
48 | + size_t d_pad_x; | |
49 | + size_t d_pad_y; | |
50 | + size_t stick_lx; | |
51 | + size_t stick_ly; | |
52 | + size_t stick_rx; | |
53 | + size_t stick_ry; | |
54 | + | |
55 | + size_t R2_analog; | |
56 | + size_t L2_analog; | |
57 | +} JoyAxesIdx; | |
58 | + | |
59 | +class PlayStationInterface | |
60 | +{ | |
61 | +private: | |
62 | + HW_TYPE HW_TYPE_; | |
63 | + sensor_msgs::msg::Joy::UniquePtr joy_; | |
64 | + const rclcpp::Logger LOGGER_; | |
65 | + std::unique_ptr<JoyButtonIdx> btn_idx_; | |
66 | + std::unique_ptr<JoyAxesIdx> axes_idx_; | |
67 | + | |
68 | +private: | |
69 | + bool isAvailable(); | |
70 | + | |
71 | +public: | |
72 | + explicit PlayStationInterface(const HW_TYPE); | |
73 | + void setJoyMsg(sensor_msgs::msg::Joy::UniquePtr); | |
74 | + | |
75 | + bool pressedSquare(); | |
76 | + bool pressedCircle(); | |
77 | + bool pressedTriangle(); | |
78 | + bool pressedCross(); | |
79 | + | |
80 | + bool pressedL1(); | |
81 | + bool pressedR1(); | |
82 | + bool pressedR2(); | |
83 | + bool pressedL2(); | |
84 | + | |
85 | + bool pressedSelect(); | |
86 | + bool pressedStart(); | |
87 | + bool pressedPS(); | |
88 | + | |
89 | + float pressedDPadX(); | |
90 | + float pressedDPadY(); | |
91 | + | |
92 | + float tiltedStickLX(); | |
93 | + float tiltedStickLY(); | |
94 | + float tiltedStickRX(); | |
95 | + float tiltedStickRY(); | |
96 | + | |
97 | + float pressedR2Analog(); | |
98 | + float pressedL2Analog(); | |
99 | +}; | |
100 | +} // namespace p9n_interface |
+++ p9n_interface/include/p9n_interface/ps3_dualshock3.hpp
... | ... | @@ -0,0 +1,20 @@ |
1 | +// Copyright 2022 HarvestX Inc. | |
2 | +// | |
3 | +// Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | +// you may not use this file except in compliance with the License. | |
5 | +// You may obtain a copy of the License at | |
6 | +// | |
7 | +// http://www.apache.org/licenses/LICENSE-2.0 | |
8 | +// | |
9 | +// Unless required by applicable law or agreed to in writing, software | |
10 | +// distributed under the License is distributed on an "AS IS" BASIS, | |
11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | +// See the License for the specific language governing permissions and | |
13 | +// limitations under the License. | |
14 | + | |
15 | +#pragma once | |
16 | + | |
17 | +namespace p9n_interface | |
18 | +{ | |
19 | +// TODO: Implement it | |
20 | +} // namespace p9n_interface |
+++ p9n_interface/include/p9n_interface/ps4_dualshock4.hpp
... | ... | @@ -0,0 +1,20 @@ |
1 | +// Copyright 2022 HarvestX Inc. | |
2 | +// | |
3 | +// Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | +// you may not use this file except in compliance with the License. | |
5 | +// You may obtain a copy of the License at | |
6 | +// | |
7 | +// http://www.apache.org/licenses/LICENSE-2.0 | |
8 | +// | |
9 | +// Unless required by applicable law or agreed to in writing, software | |
10 | +// distributed under the License is distributed on an "AS IS" BASIS, | |
11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | +// See the License for the specific language governing permissions and | |
13 | +// limitations under the License. | |
14 | + | |
15 | +#pragma once | |
16 | + | |
17 | +namespace p9n_interface | |
18 | +{ | |
19 | +// TODO: Implement it | |
20 | +} // namespace p9n_interface |
+++ p9n_interface/include/p9n_interface/ps5_dualsense.hpp
... | ... | @@ -0,0 +1,46 @@ |
1 | +// Copyright 2022 HarvestX Inc. | |
2 | +// | |
3 | +// Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | +// you may not use this file except in compliance with the License. | |
5 | +// You may obtain a copy of the License at | |
6 | +// | |
7 | +// http://www.apache.org/licenses/LICENSE-2.0 | |
8 | +// | |
9 | +// Unless required by applicable law or agreed to in writing, software | |
10 | +// distributed under the License is distributed on an "AS IS" BASIS, | |
11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | +// See the License for the specific language governing permissions and | |
13 | +// limitations under the License. | |
14 | + | |
15 | +#pragma once | |
16 | + | |
17 | +namespace p9n_interface | |
18 | +{ | |
19 | +enum class BUTTONS_DUALSENSE | |
20 | +{ | |
21 | + CROSS = 0, | |
22 | + CIRCLE, | |
23 | + TRIANGLE, | |
24 | + SQUARE, | |
25 | + L1, | |
26 | + R1, | |
27 | + L2, | |
28 | + R2, | |
29 | + SELECT, | |
30 | + START, | |
31 | + PS | |
32 | +}; | |
33 | + | |
34 | +enum class AXES_DUALSENSE | |
35 | +{ | |
36 | + STICK_LX = 0, | |
37 | + STICK_LY, | |
38 | + L2, | |
39 | + STICK_RX, | |
40 | + STICK_RY, | |
41 | + R2, | |
42 | + DPAD_X, | |
43 | + DPAD_Y, | |
44 | +}; | |
45 | + | |
46 | +} // namespace p9n_interface |
+++ p9n_interface/package.xml
... | ... | @@ -0,0 +1,20 @@ |
1 | +<?xml version="1.0"?> | |
2 | +<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | |
3 | +<package format="3"> | |
4 | + <name>p9n_interface</name> | |
5 | + <version>0.0.0</version> | |
6 | + <description>PlayStation JoyController Interface</description> | |
7 | + <maintainer email="m12watanabe1a@gmail.com">m12watanabe1a</maintainer> | |
8 | + <license>Apache License 2.0</license> | |
9 | + | |
10 | + <buildtool_depend>ament_cmake_auto</buildtool_depend> | |
11 | + | |
12 | + <depend>rclcpp</depend> | |
13 | + | |
14 | + <test_depend>ament_lint_auto</test_depend> | |
15 | + <test_depend>ament_lint_common</test_depend> | |
16 | + | |
17 | + <export> | |
18 | + <build_type>ament_cmake</build_type> | |
19 | + </export> | |
20 | +</package> |
+++ p9n_interface/src/p9n_interface.cpp
... | ... | @@ -0,0 +1,281 @@ |
1 | +// Copyright 2022 HarvestX Inc. | |
2 | +// | |
3 | +// Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | +// you may not use this file except in compliance with the License. | |
5 | +// You may obtain a copy of the License at | |
6 | +// | |
7 | +// http://www.apache.org/licenses/LICENSE-2.0 | |
8 | +// | |
9 | +// Unless required by applicable law or agreed to in writing, software | |
10 | +// distributed under the License is distributed on an "AS IS" BASIS, | |
11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | +// See the License for the specific language governing permissions and | |
13 | +// limitations under the License. | |
14 | + | |
15 | +#include "p9n_interface/p9n_interface.hpp" | |
16 | + | |
17 | +namespace p9n_interface | |
18 | +{ | |
19 | +PlayStationInterface::PlayStationInterface( | |
20 | + const HW_TYPE type | |
21 | +) | |
22 | +: HW_TYPE_(type), | |
23 | + LOGGER_(rclcpp::get_logger("PlayStationInterface")) | |
24 | +{ | |
25 | + RCLCPP_INFO( | |
26 | + this->LOGGER_, | |
27 | + "Hardware Type: %s", | |
28 | + getHWName(type).c_str()); | |
29 | + | |
30 | + this->btn_idx_ = std::make_unique<JoyButtonIdx>(); | |
31 | + this->axes_idx_ = std::make_unique<JoyAxesIdx>(); | |
32 | + | |
33 | + switch (this->HW_TYPE_) { | |
34 | + case HW_TYPE::DUALSHOCK3: | |
35 | + throw std::runtime_error("Not supported yet."); | |
36 | + case HW_TYPE::DUALSHOCK4: | |
37 | + throw std::runtime_error("Not supported yet."); | |
38 | + case HW_TYPE::DUALSENSE: | |
39 | + { | |
40 | + using BTN_IDX = BUTTONS_DUALSENSE; | |
41 | + using AXES_IDX = AXES_DUALSENSE; | |
42 | + | |
43 | + this->btn_idx_->cross = | |
44 | + static_cast<size_t>(BTN_IDX::CROSS); | |
45 | + this->btn_idx_->circle = | |
46 | + static_cast<size_t>(BTN_IDX::CIRCLE); | |
47 | + this->btn_idx_->triangle = | |
48 | + static_cast<size_t>(BTN_IDX::TRIANGLE); | |
49 | + this->btn_idx_->square = | |
50 | + static_cast<size_t>(BTN_IDX::SQUARE); | |
51 | + | |
52 | + this->btn_idx_->L1 = | |
53 | + static_cast<size_t>(BTN_IDX::L1); | |
54 | + this->btn_idx_->R1 = | |
55 | + static_cast<size_t>(BTN_IDX::R1); | |
56 | + this->btn_idx_->L2 = | |
57 | + static_cast<size_t>(BTN_IDX::L2); | |
58 | + this->btn_idx_->R2 = | |
59 | + static_cast<size_t>(BTN_IDX::R2); | |
60 | + | |
61 | + this->btn_idx_->select = | |
62 | + static_cast<size_t>(BTN_IDX::SELECT); | |
63 | + this->btn_idx_->start = | |
64 | + static_cast<size_t>(BTN_IDX::START); | |
65 | + this->btn_idx_->PS = | |
66 | + static_cast<size_t>(BTN_IDX::PS); | |
67 | + | |
68 | + this->axes_idx_->stick_lx = | |
69 | + static_cast<size_t>(AXES_IDX::STICK_LX); | |
70 | + this->axes_idx_->stick_ly = | |
71 | + static_cast<size_t>(AXES_IDX::STICK_LY); | |
72 | + this->axes_idx_->stick_rx = | |
73 | + static_cast<size_t>(AXES_IDX::STICK_RX); | |
74 | + this->axes_idx_->stick_ry = | |
75 | + static_cast<size_t>(AXES_IDX::STICK_RY); | |
76 | + this->axes_idx_->R2_analog = | |
77 | + static_cast<size_t>(AXES_IDX::R2); | |
78 | + this->axes_idx_->L2_analog = | |
79 | + static_cast<size_t>(AXES_IDX::L2); | |
80 | + this->axes_idx_->d_pad_x = | |
81 | + static_cast<size_t>(AXES_IDX::DPAD_X); | |
82 | + this->axes_idx_->d_pad_y = | |
83 | + static_cast<size_t>(AXES_IDX::DPAD_Y); | |
84 | + | |
85 | + break; | |
86 | + } | |
87 | + default: | |
88 | + throw std::runtime_error("Unknown Hardware Type."); | |
89 | + break; | |
90 | + } | |
91 | +} | |
92 | + | |
93 | +bool PlayStationInterface::isAvailable() | |
94 | +{ | |
95 | + if (this->joy_) { | |
96 | + return true; | |
97 | + } | |
98 | + RCLCPP_ERROR_ONCE( | |
99 | + this->LOGGER_, | |
100 | + "Joy Message not set. Please call setJotMsg before use."); | |
101 | + return false; | |
102 | +} | |
103 | + | |
104 | +void PlayStationInterface::setJoyMsg(sensor_msgs::msg::Joy::UniquePtr msg) | |
105 | +{ | |
106 | + this->joy_ = std::move(msg); | |
107 | +} | |
108 | + | |
109 | +bool PlayStationInterface::pressedSquare() | |
110 | +{ | |
111 | + if (!this->isAvailable()) { | |
112 | + return false; | |
113 | + } | |
114 | + return this->joy_->buttons.at( | |
115 | + this->btn_idx_->square); | |
116 | +} | |
117 | + | |
118 | +bool PlayStationInterface::pressedCircle() | |
119 | +{ | |
120 | + if (!this->isAvailable()) { | |
121 | + return false; | |
122 | + } | |
123 | + return this->joy_->buttons.at( | |
124 | + this->btn_idx_->circle); | |
125 | +} | |
126 | + | |
127 | +bool PlayStationInterface::pressedTriangle() | |
128 | +{ | |
129 | + if (!this->isAvailable()) { | |
130 | + return false; | |
131 | + } | |
132 | + return this->joy_->buttons.at( | |
133 | + this->btn_idx_->triangle); | |
134 | +} | |
135 | + | |
136 | +bool PlayStationInterface::pressedCross() | |
137 | +{ | |
138 | + if (!this->isAvailable()) { | |
139 | + return false; | |
140 | + } | |
141 | + return this->joy_->buttons.at( | |
142 | + this->btn_idx_->cross); | |
143 | +} | |
144 | + | |
145 | +bool PlayStationInterface::pressedL1() | |
146 | +{ | |
147 | + if (!this->isAvailable()) { | |
148 | + return false; | |
149 | + } | |
150 | + return this->joy_->buttons.at( | |
151 | + this->btn_idx_->L1); | |
152 | +} | |
153 | + | |
154 | +bool PlayStationInterface::pressedR1() | |
155 | +{ | |
156 | + if (!this->isAvailable()) { | |
157 | + return false; | |
158 | + } | |
159 | + return this->joy_->buttons.at( | |
160 | + this->btn_idx_->R1); | |
161 | +} | |
162 | + | |
163 | +bool PlayStationInterface::pressedR2() | |
164 | +{ | |
165 | + if (!this->isAvailable()) { | |
166 | + return false; | |
167 | + } | |
168 | + return this->joy_->buttons.at( | |
169 | + this->btn_idx_->R2); | |
170 | +} | |
171 | + | |
172 | +bool PlayStationInterface::pressedL2() | |
173 | +{ | |
174 | + if (!this->isAvailable()) { | |
175 | + return false; | |
176 | + } | |
177 | + return this->joy_->buttons.at( | |
178 | + this->btn_idx_->L2); | |
179 | +} | |
180 | + | |
181 | +bool PlayStationInterface::pressedSelect() | |
182 | +{ | |
183 | + if (!this->isAvailable()) { | |
184 | + return false; | |
185 | + } | |
186 | + return this->joy_->buttons.at( | |
187 | + this->btn_idx_->select); | |
188 | +} | |
189 | + | |
190 | +bool PlayStationInterface::pressedStart() | |
191 | +{ | |
192 | + if (!this->isAvailable()) { | |
193 | + return false; | |
194 | + } | |
195 | + return this->joy_->buttons.at( | |
196 | + this->btn_idx_->start); | |
197 | +} | |
198 | + | |
199 | +bool PlayStationInterface::pressedPS() | |
200 | +{ | |
201 | + if (!this->isAvailable()) { | |
202 | + return false; | |
203 | + } | |
204 | + return this->joy_->buttons.at( | |
205 | + this->btn_idx_->PS); | |
206 | +} | |
207 | + | |
208 | +float PlayStationInterface::pressedDPadX() | |
209 | +{ | |
210 | + if (!this->isAvailable()) { | |
211 | + return false; | |
212 | + } | |
213 | + return this->joy_->axes.at( | |
214 | + this->axes_idx_->d_pad_x); | |
215 | +} | |
216 | + | |
217 | +float PlayStationInterface::pressedDPadY() | |
218 | +{ | |
219 | + if (!this->isAvailable()) { | |
220 | + return false; | |
221 | + } | |
222 | + return this->joy_->axes.at( | |
223 | + this->axes_idx_->d_pad_y); | |
224 | +} | |
225 | + | |
226 | +float PlayStationInterface::tiltedStickLX() | |
227 | +{ | |
228 | + if (!this->isAvailable()) { | |
229 | + return false; | |
230 | + } | |
231 | + return this->joy_->axes.at( | |
232 | + this->axes_idx_->stick_lx); | |
233 | +} | |
234 | + | |
235 | +float PlayStationInterface::tiltedStickLY() | |
236 | +{ | |
237 | + if (!this->isAvailable()) { | |
238 | + return false; | |
239 | + } | |
240 | + return this->joy_->axes.at( | |
241 | + this->axes_idx_->stick_ly); | |
242 | +} | |
243 | + | |
244 | +float PlayStationInterface::tiltedStickRX() | |
245 | +{ | |
246 | + if (!this->isAvailable()) { | |
247 | + return false; | |
248 | + } | |
249 | + return this->joy_->axes.at( | |
250 | + this->axes_idx_->stick_rx); | |
251 | +} | |
252 | + | |
253 | +float PlayStationInterface::tiltedStickRY() | |
254 | +{ | |
255 | + if (!this->isAvailable()) { | |
256 | + return false; | |
257 | + } | |
258 | + return this->joy_->axes.at( | |
259 | + this->axes_idx_->stick_ry); | |
260 | +} | |
261 | + | |
262 | +float PlayStationInterface::pressedR2Analog() | |
263 | +{ | |
264 | + if (!this->isAvailable()) { | |
265 | + return false; | |
266 | + } | |
267 | + return this->joy_->axes.at( | |
268 | + this->axes_idx_->R2_analog); | |
269 | +} | |
270 | + | |
271 | +float PlayStationInterface::pressedL2Analog() | |
272 | +{ | |
273 | + if (!this->isAvailable()) { | |
274 | + return false; | |
275 | + } | |
276 | + return this->joy_->axes.at( | |
277 | + this->axes_idx_->L2_analog); | |
278 | +} | |
279 | + | |
280 | + | |
281 | +} // namespace p9n_interface |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?