Skip to content

Commit 3e9be8e

Browse files
committed
Apply uncrustify to all repo
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
1 parent ad19575 commit 3e9be8e

13 files changed

Lines changed: 292 additions & 309 deletions

File tree

ddsenabler/examples/action/CLIParser.hpp

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -50,50 +50,50 @@ class CLIParser
5050
static void print_help(
5151
uint8_t return_code)
5252
{
53-
std::cout << "Usage: ddsenabler_example_action <client|server> [options]" <<
54-
std::endl;
55-
std::cout << "" <<
56-
std::endl;
57-
std::cout << "--config <str> Path to the configuration file" <<
58-
std::endl;
59-
std::cout << " (optional, if not provided default config is used)" <<
60-
std::endl;
61-
std::cout << "--action-name <str> Name of the action to be registered" <<
62-
std::endl;
63-
std::cout << " (Default: 'fibonacci')" <<
64-
std::endl;
65-
std::cout << "--timeout <num> Time (seconds) to wait before stopping the" <<
66-
std::endl;
67-
std::cout << " program if expectations are not met" <<
68-
std::endl;
69-
std::cout << " (Default: 30)" <<
70-
std::endl;
71-
std::cout << "--persistence-path <str> Path to the persistence directory" <<
72-
std::endl;
73-
std::cout << " (No default value as it is required)" <<
74-
std::endl;
75-
std::cout << "\n-------------------------------------SERVER OPTIONS------------------------------------\n" <<
76-
std::endl;
77-
std::cout << "--expected-requests <num> Number of requests expected to be received" <<
78-
std::endl;
79-
std::cout << " (Default: 0, meaning infinite)" <<
80-
std::endl;
81-
std::cout << "\n-------------------------------------CLIENT OPTIONS------------------------------------\n" <<
82-
std::endl;
83-
std::cout << "--request-initial-wait <num> Time (seconds) to wait before starting" <<
84-
std::endl;
85-
std::cout << " requests publication since server matching" <<
86-
std::endl;
87-
std::cout << " (Default: 0)" <<
88-
std::endl;
89-
std::cout << "--cancel-requests <bool> Whether to cancel requests after sending them" <<
90-
std::endl;
91-
std::cout << " (Default: false)" <<
92-
std::endl;
93-
std::cout << "--goals-path <str> Directory containing goal JSON files" <<
94-
std::endl;
95-
std::cout << " (No default value as it is required for client mode)" <<
96-
std::endl;
53+
std::cout << "Usage: ddsenabler_example_action <client|server> [options]"
54+
<< std::endl;
55+
std::cout << ""
56+
<< std::endl;
57+
std::cout << "--config <str> Path to the configuration file"
58+
<< std::endl;
59+
std::cout << " (optional, if not provided default config is used)"
60+
<< std::endl;
61+
std::cout << "--action-name <str> Name of the action to be registered"
62+
<< std::endl;
63+
std::cout << " (Default: 'fibonacci')"
64+
<< std::endl;
65+
std::cout << "--timeout <num> Time (seconds) to wait before stopping the"
66+
<< std::endl;
67+
std::cout << " program if expectations are not met"
68+
<< std::endl;
69+
std::cout << " (Default: 30)"
70+
<< std::endl;
71+
std::cout << "--persistence-path <str> Path to the persistence directory"
72+
<< std::endl;
73+
std::cout << " (No default value as it is required)"
74+
<< std::endl;
75+
std::cout << "\n-------------------------------------SERVER OPTIONS------------------------------------\n"
76+
<< std::endl;
77+
std::cout << "--expected-requests <num> Number of requests expected to be received"
78+
<< std::endl;
79+
std::cout << " (Default: 0, meaning infinite)"
80+
<< std::endl;
81+
std::cout << "\n-------------------------------------CLIENT OPTIONS------------------------------------\n"
82+
<< std::endl;
83+
std::cout << "--request-initial-wait <num> Time (seconds) to wait before starting"
84+
<< std::endl;
85+
std::cout << " requests publication since server matching"
86+
<< std::endl;
87+
std::cout << " (Default: 0)"
88+
<< std::endl;
89+
std::cout << "--cancel-requests <bool> Whether to cancel requests after sending them"
90+
<< std::endl;
91+
std::cout << " (Default: false)"
92+
<< std::endl;
93+
std::cout << "--goals-path <str> Directory containing goal JSON files"
94+
<< std::endl;
95+
std::cout << " (No default value as it is required for client mode)"
96+
<< std::endl;
9797
std::exit(return_code);
9898
}
9999

@@ -223,8 +223,8 @@ class CLIParser
223223
}
224224
catch (const std::exception& e)
225225
{
226-
std::cerr << "Invalid --expected-requests argument " << argv[i] << ": " << e.what() <<
227-
std::endl;
226+
std::cerr << "Invalid --expected-requests argument " << argv[i] << ": " << e.what()
227+
<< std::endl;
228228
print_help(EXIT_FAILURE);
229229
}
230230
}
@@ -244,8 +244,8 @@ class CLIParser
244244
}
245245
catch (const std::exception& e)
246246
{
247-
std::cerr << "Invalid --request-initial-wait argument " << argv[i] << ": " << e.what() <<
248-
std::endl;
247+
std::cerr << "Invalid --request-initial-wait argument " << argv[i] << ": " << e.what()
248+
<< std::endl;
249249
print_help(EXIT_FAILURE);
250250
}
251251
}

ddsenabler/examples/publish/CLIParser.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ class CLIParser
135135
}
136136
catch (const std::exception& e)
137137
{
138-
std::cerr << "Invalid --expected-types argument " << std::string(argv[i]) << ": " <<
139-
std::string(e.what()) << std::endl;
138+
std::cerr << "Invalid --expected-types argument " << std::string(argv[i]) << ": "
139+
<< std::string(e.what()) << std::endl;
140140
print_help(EXIT_FAILURE);
141141
}
142142
}
@@ -156,8 +156,8 @@ class CLIParser
156156
}
157157
catch (const std::exception& e)
158158
{
159-
std::cerr << "Invalid --expected-topics argument " << std::string(argv[i]) << ": " <<
160-
std::string(e.what()) << std::endl;
159+
std::cerr << "Invalid --expected-topics argument " << std::string(argv[i]) << ": "
160+
<< std::string(e.what()) << std::endl;
161161
print_help(EXIT_FAILURE);
162162
}
163163
}
@@ -261,8 +261,8 @@ class CLIParser
261261
}
262262
catch (const std::exception& e)
263263
{
264-
std::cerr << "Invalid --publish-period argument " << std::string(argv[i]) << ": " <<
265-
std::string(
264+
std::cerr << "Invalid --publish-period argument " << std::string(argv[i]) << ": "
265+
<< std::string(
266266
e.what()) << std::endl;
267267
print_help(EXIT_FAILURE);
268268
}
@@ -283,8 +283,8 @@ class CLIParser
283283
}
284284
catch (const std::exception& e)
285285
{
286-
std::cerr << "Invalid --publish-initial-wait argument " << std::string(argv[i]) << ": " <<
287-
std::string(
286+
std::cerr << "Invalid --publish-initial-wait argument " << std::string(argv[i]) << ": "
287+
<< std::string(
288288
e.what()) << std::endl;
289289
print_help(EXIT_FAILURE);
290290
}

ddsenabler/examples/publish/main.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static void test_type_notification_callback(
8585
{
8686
std::lock_guard<std::mutex> lock(app_mutex_);
8787
notify = ++received_types_ >= config.expected_types;
88-
std::cout << "Type callback received: " << type_name << ", Total types: " <<
89-
received_types_ << std::endl << serialized_type << std::endl << std::endl;
88+
std::cout << "Type callback received: " << type_name << ", Total types: "
89+
<< received_types_ << std::endl << serialized_type << std::endl << std::endl;
9090
if (!config.persistence_path.empty() &&
9191
!utils::save_type_to_file((std::filesystem::path(config.persistence_path) / TYPES_SUBDIR).string(),
9292
type_name,
@@ -132,9 +132,9 @@ static void test_topic_notification_callback(
132132
{
133133
std::lock_guard<std::mutex> lock(app_mutex_);
134134
notify = ++received_topics_ >= config.expected_topics;
135-
std::cout << "Topic callback received: " << topic_name << " of type " << topic_info.type_name <<
136-
", Total topics: " <<
137-
received_topics_ << std::endl << topic_info.serialized_qos << std::endl << std::endl;
135+
std::cout << "Topic callback received: " << topic_name << " of type " << topic_info.type_name
136+
<< ", Total topics: "
137+
<< received_topics_ << std::endl << topic_info.serialized_qos << std::endl << std::endl;
138138
if (!config.persistence_path.empty() &&
139139
!utils::save_topic_to_file((std::filesystem::path(config.persistence_path) / TOPICS_SUBDIR).string(),
140140
topic_name,
@@ -181,8 +181,8 @@ static void test_data_notification_callback(
181181
{
182182
std::lock_guard<std::mutex> lock(app_mutex_);
183183
notify = ++received_data_ >= config.expected_data;
184-
std::cout << "Data callback received: " << topic_name << ", Total data: " <<
185-
received_data_ << std::endl << json << std::endl << std::endl;
184+
std::cout << "Data callback received: " << topic_name << ", Total data: "
185+
<< received_data_ << std::endl << json << std::endl << std::endl;
186186
if (!config.persistence_path.empty() &&
187187
!utils::save_data_to_file((std::filesystem::path(config.persistence_path) / SAMPLES_SUBDIR).string(),
188188
topic_name, json,

ddsenabler/examples/service/CLIParser.hpp

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -49,46 +49,46 @@ class CLIParser
4949
static void print_help(
5050
uint8_t return_code)
5151
{
52-
std::cout << "Usage: ddsenabler_example_service <client|server> [options]" <<
53-
std::endl;
54-
std::cout << "" <<
55-
std::endl;
56-
std::cout << "--config <str> Path to the configuration file" <<
57-
std::endl;
58-
std::cout << " (optional, if not provided default config is used)" <<
59-
std::endl;
60-
std::cout << "--service-name <str> Name of the service to be registered" <<
61-
std::endl;
62-
std::cout << " (Default: 'add_two_ints')" <<
63-
std::endl;
64-
std::cout << "--timeout <num> Time (seconds) to wait before stopping the" <<
65-
std::endl;
66-
std::cout << " program if expectations are not met" <<
67-
std::endl;
68-
std::cout << " (Default: 30)" <<
69-
std::endl;
70-
std::cout << "--persistence-path <str> Path to the persistence directory" <<
71-
std::endl;
72-
std::cout << " (No default value as it is required)" <<
73-
std::endl;
74-
std::cout << "\n-------------------------------------SERVER OPTIONS------------------------------------\n" <<
75-
std::endl;
76-
std::cout << "--expected-requests <num> Number of requests expected to be received" <<
77-
std::endl;
78-
std::cout << " (Default: 0, meaning infinite)" <<
79-
std::endl;
80-
std::cout << "\n-------------------------------------CLIENT OPTIONS------------------------------------\n" <<
81-
std::endl;
82-
std::cout << "--request-initial-wait <num> Time (seconds) to wait before starting" <<
83-
std::endl;
84-
std::cout << " requests publication since server matching" <<
85-
std::endl;
86-
std::cout << " (Default: 0)" <<
87-
std::endl;
88-
std::cout << "--requests-path <str> Directory containing request JSON files" <<
89-
std::endl;
90-
std::cout << " (No default value as it is required for client mode)" <<
91-
std::endl;
52+
std::cout << "Usage: ddsenabler_example_service <client|server> [options]"
53+
<< std::endl;
54+
std::cout << ""
55+
<< std::endl;
56+
std::cout << "--config <str> Path to the configuration file"
57+
<< std::endl;
58+
std::cout << " (optional, if not provided default config is used)"
59+
<< std::endl;
60+
std::cout << "--service-name <str> Name of the service to be registered"
61+
<< std::endl;
62+
std::cout << " (Default: 'add_two_ints')"
63+
<< std::endl;
64+
std::cout << "--timeout <num> Time (seconds) to wait before stopping the"
65+
<< std::endl;
66+
std::cout << " program if expectations are not met"
67+
<< std::endl;
68+
std::cout << " (Default: 30)"
69+
<< std::endl;
70+
std::cout << "--persistence-path <str> Path to the persistence directory"
71+
<< std::endl;
72+
std::cout << " (No default value as it is required)"
73+
<< std::endl;
74+
std::cout << "\n-------------------------------------SERVER OPTIONS------------------------------------\n"
75+
<< std::endl;
76+
std::cout << "--expected-requests <num> Number of requests expected to be received"
77+
<< std::endl;
78+
std::cout << " (Default: 0, meaning infinite)"
79+
<< std::endl;
80+
std::cout << "\n-------------------------------------CLIENT OPTIONS------------------------------------\n"
81+
<< std::endl;
82+
std::cout << "--request-initial-wait <num> Time (seconds) to wait before starting"
83+
<< std::endl;
84+
std::cout << " requests publication since server matching"
85+
<< std::endl;
86+
std::cout << " (Default: 0)"
87+
<< std::endl;
88+
std::cout << "--requests-path <str> Directory containing request JSON files"
89+
<< std::endl;
90+
std::cout << " (No default value as it is required for client mode)"
91+
<< std::endl;
9292
std::exit(return_code);
9393
}
9494

@@ -218,8 +218,8 @@ class CLIParser
218218
}
219219
catch (const std::exception& e)
220220
{
221-
std::cerr << "Invalid --expected-requests argument " << argv[i] << ": " << e.what() <<
222-
std::endl;
221+
std::cerr << "Invalid --expected-requests argument " << argv[i] << ": " << e.what()
222+
<< std::endl;
223223
print_help(EXIT_FAILURE);
224224
}
225225
}
@@ -239,8 +239,8 @@ class CLIParser
239239
}
240240
catch (const std::exception& e)
241241
{
242-
std::cerr << "Invalid --request-initial-wait argument " << argv[i] << ": " << e.what() <<
243-
std::endl;
242+
std::cerr << "Invalid --request-initial-wait argument " << argv[i] << ": " << e.what()
243+
<< std::endl;
244244
print_help(EXIT_FAILURE);
245245
}
246246
}
@@ -290,8 +290,8 @@ class CLIParser
290290

291291
if (config.persistence_path.empty())
292292
{
293-
std::cerr << "Warning: persistence path is not set, persistence features will be disabled" <<
294-
std::endl;
293+
std::cerr << "Warning: persistence path is not set, persistence features will be disabled"
294+
<< std::endl;
295295
}
296296

297297
return config;

ddsenabler/examples/service/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ bool server_routine(
438438
return false;
439439
}
440440

441-
std::cout << "Received request for service: " << service_name << " with request ID: " << request_id <<
442-
std::endl;
441+
std::cout << "Received request for service: " << service_name << " with request ID: " << request_id
442+
<< std::endl;
443443

444444
// Example response
445445
server_specific_logic(

ddsenabler/src/cpp/DDSEnabler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool DDSEnabler::set_file_watcher(
140140
// WARNING: it is needed to pass file_path, as FileWatcher only retrieves file_name
141141
std::function<void(std::string)> file_watcher_callback =
142142
[this, file_path]
143-
(std::string file_name)
143+
(std::string file_name)
144144
{
145145
EPROSIMA_LOG_INFO(DDSENABLER_EXECUTION,
146146
"FileWatcher notified changes in file " << file_path << ". Reloading configuration");

0 commit comments

Comments
 (0)