Skip to content

Commit

Permalink
avdecc - apply astyle formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Ronchetti committed Apr 20, 2016
1 parent 424c9d4 commit eddbf92
Show file tree
Hide file tree
Showing 230 changed files with 15,555 additions and 15,551 deletions.
16 changes: 8 additions & 8 deletions controller/app/cmdline/src/cli_argument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#include "cli_argument.h"

cli_argument::cli_argument(cmd_line *cmd_line_ptr, const std::string name,
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
: m_cmd_line_ptr(cmd_line_ptr)
, m_is_valid(false)
, m_match_min(match_min)
Expand Down Expand Up @@ -135,8 +135,8 @@ size_t cli_argument::get_match_max() const
}

cli_argument_int::cli_argument_int(cmd_line *cmd_line_ptr, const std::string name,
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
: cli_argument(cmd_line_ptr, name, help + " (type int)", hint, match_min, match_max)
{}

Expand Down Expand Up @@ -184,8 +184,8 @@ std::vector<int> cli_argument_int::get_all_value_int() const
}

cli_argument_end_station::cli_argument_end_station(cmd_line *cmd_line_ptr, const std::string name,
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
: cli_argument(cmd_line_ptr, name, help + " (index as int or Entity ID)", hint, match_min, match_max)
{}

Expand Down Expand Up @@ -240,8 +240,8 @@ std::vector<uint32_t> cli_argument_end_station::get_all_value_uint() const
}

cli_argument_string::cli_argument_string(cmd_line *cmd_line_ptr, const std::string name,
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
const std::string help, const std::string hint,
size_t match_min, size_t match_max)
: cli_argument(cmd_line_ptr, name, help + " (type string)", hint, match_min, match_max)
{}

Expand Down
8 changes: 4 additions & 4 deletions controller/app/cmdline/src/cli_argument.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class cli_argument
{
public:
cli_argument(cmd_line *cmd_ptr, const std::string name, const std::string help, const std::string hint,
size_t match_min, size_t match_max);
size_t match_min, size_t match_max);
virtual ~cli_argument() {};

const std::string &get_name() const;
Expand Down Expand Up @@ -89,7 +89,7 @@ class cli_argument_int : public cli_argument
{
public:
cli_argument_int(cmd_line *cmd_ptr, const std::string name, const std::string help, const std::string hint="",
size_t match_min=1, size_t match_max=1);
size_t match_min=1, size_t match_max=1);
virtual ~cli_argument_int() {};

virtual void clear();
Expand All @@ -109,7 +109,7 @@ class cli_argument_end_station : public cli_argument
{
public:
cli_argument_end_station(cmd_line *cmd_ptr, const std::string name, const std::string help, const std::string hint="",
size_t match_min=1, size_t match_max=1);
size_t match_min=1, size_t match_max=1);
virtual ~cli_argument_end_station() {};

virtual void clear();
Expand All @@ -129,7 +129,7 @@ class cli_argument_string : public cli_argument
{
public:
cli_argument_string(cmd_line *cmd_ptr, const std::string name, const std::string help, const std::string hint="",
size_t match_min=1, size_t match_max=1);
size_t match_min=1, size_t match_max=1);
virtual ~cli_argument_string() {};

virtual void clear();
Expand Down
2 changes: 1 addition & 1 deletion controller/app/cmdline/src/cli_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void cli_command::print_help_all(std::string prefix, size_t depth) const
{
std::string sub_prefix(prefix);
if (prefix.length())
sub_prefix += " ";
sub_prefix += " ";
sub_prefix += *iter;

std::map<std::string, cli_command*>::const_iterator cmd_iter = m_sub_commands.find(*iter);
Expand Down
440 changes: 220 additions & 220 deletions controller/app/cmdline/src/cmd_line.cpp

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions controller/app/cmdline/src/cmd_line.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ class cli_argument;

class AtomicOut : public std::ostream
{
public:
public:
AtomicOut() : std::ostream(0), buffer()
{
this->init(buffer.rdbuf());
this->init(buffer.rdbuf());
}

~AtomicOut()
{
// Use printf as cout seems to still be interleaved
printf("%s", buffer.str().c_str());
// Use printf as cout seems to still be interleaved
printf("%s", buffer.str().c_str());
}

private:
private:
std::ostringstream buffer;
};

Expand All @@ -73,7 +73,7 @@ class cmd_line
avdecc_lib::net_interface *netif;
avdecc_lib::system *sys;
avdecc_lib::controller *controller_obj;

cli_command commands;

uint32_t current_end_station;
Expand Down Expand Up @@ -103,9 +103,9 @@ class cmd_line
int print_interfaces_and_select(char *interface);
int get_current_end_station(avdecc_lib::end_station **end_station) const;
int get_current_entity_and_descriptor(avdecc_lib::end_station *end_station,
avdecc_lib::entity_descriptor **entity, avdecc_lib::configuration_descriptor **descriptor);
avdecc_lib::entity_descriptor **entity, avdecc_lib::configuration_descriptor **descriptor);
int get_current_end_station_entity_and_descriptor(avdecc_lib::end_station **end_station,
avdecc_lib::entity_descriptor **entity, avdecc_lib::configuration_descriptor **configuration);
avdecc_lib::entity_descriptor **entity, avdecc_lib::configuration_descriptor **configuration);

void cmd_line_commands_init();

Expand Down Expand Up @@ -151,7 +151,7 @@ class cmd_line
* Display a detailed description of a command.
*/
int cmd_quit(int total_matched, std::vector<cli_argument*> args);

/**
* Display the name at index name_index for a given descriptor.
*/
Expand Down Expand Up @@ -275,13 +275,13 @@ class cmd_line
* Send a ENTITY_AVAILABLE command to determine if another AVDECC Entity is still alive.
*/
int cmd_entity_avail(int total_matched, std::vector<cli_argument*> args);

/**
* Send a REGISTER_UNSOLICITED_NOTIFICATION command to add the controller as being interested
* in receiving unsolicited response notifications.
*/
int cmd_register_unsolicited_notif(int total_matched, std::vector<cli_argument*> args);

/**
* Send a DEREGISTER_UNSOLICITED_NOTIFICATION command to remove the controller as being interested
* in receiving unsolicited response notifications.
Expand All @@ -308,28 +308,28 @@ class cmd_line
* the input or output Streams.
*/
int cmd_get_audio_map(int total_matched, std::vector<cli_argument*> args);

/**
* Send a ADD_PENDING_AUDIO_MAPPING command to add a mapping entry to a library queue.
*/
int cmd_store_pending_audio_mapping(int total_matched, std::vector<cli_argument*> args);

/**
* Send a GET_PENDING_AUDIO_MAPPINGS command to view queued mappings.
*/
int cmd_get_pending_audio_mappings(int total_matched, std::vector<cli_argument*> args);

/**
* Send a CLEAR_PENDING_AUDIO_MAPPINGS command to clear queued mappings.
*/
int cmd_clear_pending_audio_mappings(int total_matched, std::vector<cli_argument*> args);

/**
* Send a ADD_AUDIO_MAPPINGS command to send queued mapping entries indicating dynamic mappings
* between the Audio Clusters and the input or output Streams
*/
int cmd_add_audio_mappings(int total_matched, std::vector<cli_argument*> args);

/**
* Send a REMOVE_AUDIO_MAPPINGS command to remove the queued selected dynamic mappings.
*/
Expand Down Expand Up @@ -359,7 +359,7 @@ class cmd_line
* Send a SET_NAME command to change the value of a name field within a descriptor.
*/
int cmd_set_name(int total_matched, std::vector<cli_argument*> args);

/**
* Send a SET_GROUP_NAME command to change the value of the Entity descriptor group name.
*/
Expand All @@ -369,7 +369,7 @@ class cmd_line
* Send a GET_NAME command to fetch the value of a name field within a descriptor.
*/
int cmd_get_name(int total_matched, std::vector<cli_argument*> args);

/**
* Send a GET_GROUP_NAME command to fetch the group name of the ENTITY descriptor.
*/
Expand All @@ -384,7 +384,7 @@ class cmd_line
* Send a GET_SAMPLING_RATE command to get the current sampling rate of a port or unit.
*/
int cmd_get_sampling_rate(int total_matched, std::vector<cli_argument*> args);

/**
* Send a GET_COUNTERS command to get the current counters of a descriptor.
*/
Expand All @@ -399,7 +399,7 @@ class cmd_line
* Send a GET_CLOCK_SOURCE command to get the current clock source of a clock domain.
*/
int cmd_get_clock_source(int total_matched, std::vector<cli_argument*> args);

/**
* Send a GET_AVB_INFO command to get the dynamic AVB information for an AVB_INTERFACE.
*/
Expand Down
10 changes: 5 additions & 5 deletions controller/app/cmdline/src/cmd_line_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ char *command_generator(const char *text, int state)
(*iter)->get_completion_options(arg_options);
}
completion_options.insert(completion_options.end(),
arg_options.begin(), arg_options.end());
arg_options.begin(), arg_options.end());
}
}

Expand Down Expand Up @@ -264,7 +264,7 @@ int main(int argc, char *argv[])
}

cmd_line avdecc_cmd_line_ref(notification_callback, log_callback,
test_mode, interface, log_level);
test_mode, interface, log_level);

std::vector<std::string> input_argv;
size_t pos = 0;
Expand All @@ -282,7 +282,7 @@ int main(int argc, char *argv[])
// Override to prevent filename completion
#if defined(__MACH__)
rl_completion_entry_function = (Function *)null_completer;
#elif defined(__linux__)
#elif defined(__linux__)
rl_completion_entry_function = null_completer;
#endif

Expand All @@ -301,7 +301,7 @@ int main(int argc, char *argv[])
std::string cmd_input(input);
cmd_input_orig = cmd_input;
add_history(input);
#else
#else
std::string cmd_input;
printf("\n>");
std::getline(std::cin, cmd_input);
Expand All @@ -311,7 +311,7 @@ int main(int argc, char *argv[])
while((pos = cmd_input.find(" ")) != std::string::npos)
{
if (pos)
input_argv.push_back(cmd_input.substr(0, pos));
input_argv.push_back(cmd_input.substr(0, pos));

cmd_input.erase(0, pos + 1);
}
Expand Down
Loading

0 comments on commit eddbf92

Please sign in to comment.