Skip to content

Commit

Permalink
Remove a bunch of needless using namespace declrns
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyelewis committed Nov 22, 2017
1 parent 3ca6706 commit 33bfda3
Show file tree
Hide file tree
Showing 95 changed files with 118 additions and 166 deletions.
1 change: 0 additions & 1 deletion source/biocore/chain_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include "common/exception/invalid_argument_exception.hpp"

using namespace boost::algorithm;
using namespace cath;
using namespace cath::common;
using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion source/biocore/residue_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@

#include "common/exception/invalid_argument_exception.hpp"

using namespace boost::algorithm;
using namespace cath;
using namespace cath::common;
using namespace std;

using boost::algorithm::is_alnum;
using boost::algorithm::is_digit;
using boost::lexical_cast;
using boost::optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include "outputter/superposition_outputter/superposition_outputter_list.hpp"
#include "superposition/superposition_context.hpp"

using namespace boost::program_options;
using namespace cath;
using namespace cath::align;
using namespace cath::chop;
Expand All @@ -57,6 +56,7 @@ using namespace cath::file;
using namespace cath::opts;

using boost::none;
using boost::program_options::variables_map;
using std::istream;
using std::string;
using std::unique_ptr;
Expand Down
1 change: 0 additions & 1 deletion source/cluster/file/cluster_membership_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <sstream>
#include <string>

using namespace boost::log;
using namespace cath;
using namespace cath::clust;
using namespace cath::common;
Expand Down
1 change: 0 additions & 1 deletion source/display_colour/display_colour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

#include <tuple>

using namespace boost::algorithm;
using namespace cath;
using namespace cath::common;
using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion source/display_colour/display_colour_gradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#include "common/exception/invalid_argument_exception.hpp"
#include "display_colour/display_colour.hpp"

using namespace boost::algorithm;
using namespace cath;
using namespace cath::common;
using namespace std;

using boost::algorithm::clamp;
using boost::lexical_cast;
using boost::numeric_cast;

Expand Down
1 change: 0 additions & 1 deletion source/display_colour/display_colour_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "display_colour/display_colour.hpp"
#include "display_colour/display_colour_type_aliases.hpp"

using namespace boost::algorithm;
using namespace cath;
using namespace cath::common;
using namespace std;
Expand Down
4 changes: 3 additions & 1 deletion source/executables/cath_ssap/cath_ssap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
#include "ssap/options/cath_ssap_options.hpp"
#include "ssap/ssap.hpp"

using namespace boost::log::trivial;
using namespace cath::common;
using namespace cath::opts;
using namespace std;

using boost::log::trivial::severity;
using boost::log::trivial::trace;

namespace cath {

/// \brief A concrete program_exception_wrapper that implements do_run_program() to parse the options and then pass them to call_ssap()
Expand Down
6 changes: 4 additions & 2 deletions source/options/executable/env_var_option_name_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>

using namespace boost::algorithm;
using namespace boost::program_options;
using namespace cath::opts;
using namespace std;

using boost::algorithm::replace_all_copy;
using boost::algorithm::starts_with;
using boost::erase_first_copy;
using boost::program_options::options_description;
using boost::to_lower_copy;
using boost::to_upper_copy;

/// \brief Ctor for env_var_option_name_handler
env_var_option_name_handler::env_var_option_name_handler(string arg_prefix, ///< The prefix string to strip off all environment variable names(eg "CATH_TOOLS_"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@

#include "options/executable/env_var_option_name_handler.hpp"

using namespace boost::program_options;
using namespace cath::opts;
using namespace std;

using boost::program_options::options_description;

namespace cath {
namespace test {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "options/options_block/check_pdb_options_block.hpp"
#include "options/options_block/options_block_tester.hpp"

using namespace boost::program_options;
using namespace cath::common;
using namespace cath::opts;
using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "options/options_block/detail_help_options_block.hpp"
#include "options/options_block/options_block_tester.hpp"

using namespace boost::program_options;
using namespace cath::common;
using namespace cath::opts;
using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "options/options_block/extract_pdb_options_block.hpp"
#include "options/options_block/options_block_tester.hpp"

using namespace boost::program_options;
using namespace cath::common;
using namespace cath::opts;
using namespace std;
Expand Down
4 changes: 3 additions & 1 deletion source/options/options_block/ids_options_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@

#include <iostream>

using namespace boost::program_options;
using namespace cath;
using namespace cath::common;
using namespace cath::opts;
using namespace std;

using boost::none;
using boost::program_options::options_description;
using boost::program_options::value;
using boost::program_options::variables_map;

const string ids_options_block::PO_ID( "id" ); ///< The option name for the id option

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "options/options_block/misc_help_version_options_block.hpp"
#include "options/options_block/options_block_tester.hpp"

using namespace boost::program_options;
using namespace cath::opts;
using namespace std;

Expand Down
3 changes: 2 additions & 1 deletion source/options/options_block/options_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "common/boost_addenda/program_options/variables_map_contains.hpp"
#include "common/clone/check_uptr_clone_against_this.hpp"

using namespace boost::program_options;
using namespace cath;
using namespace cath::common;
using namespace cath::opts;
Expand All @@ -40,6 +39,8 @@ using boost::algorithm::any_of;
using boost::filesystem::is_empty;
using boost::filesystem::path;
using boost::numeric_cast;
using boost::program_options::options_description;
using boost::program_options::variables_map;

/// \brief A string to use to separate (valid values and their descriptions) from each other
const string options_block::SUB_DESC_SEPARATOR = "\n ";
Expand Down
5 changes: 4 additions & 1 deletion source/options/options_block/options_block_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@
#include "options/options_block/pdb_input_options_block.hpp"
#include "test/boost_addenda/boost_check_no_throw_diag.hpp"

using namespace boost::program_options;
using namespace cath;
using namespace cath::opts;
using namespace std;

using boost::program_options::options_description;
using boost::program_options::unknown_option;
using boost::program_options::variables_map;

BOOST_TEST_DONT_PRINT_LOG_VALUE(type_info)

/// \brief A type alias for a list of all the different types of options_blocks, so they can all be tested
Expand Down
5 changes: 4 additions & 1 deletion source/options/options_block/options_block_tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
#include "common/argc_argv_faker.hpp"
#include "options/options_block/options_block.hpp"

using namespace boost::program_options;
using namespace cath;
using namespace cath::opts;
using namespace std;

using boost::program_options::command_line_parser;
using boost::program_options::options_description;
using boost::program_options::variables_map;

const string options_block_tester::UNKNOWN_OPT ( "--it-does-not-know-me" );
const string options_block_tester::TEST_OPTION_1( "test_help_option_1" );
const string options_block_tester::TEST_OPTION_2( "test_help_option_2" );
Expand Down
3 changes: 2 additions & 1 deletion source/options/options_block/string_options_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@

#include "common/clone/make_uptr_clone.hpp"

using namespace boost::program_options;
using namespace cath;
using namespace cath::common;
using namespace cath::opts;

using boost::none;
using boost::optional;
using boost::program_options::options_description;
using boost::program_options::variables_map;
using std::string;
using std::unique_ptr;

Expand Down
2 changes: 0 additions & 2 deletions source/src_common/common/clone/clone_ptr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

namespace cath { namespace test { } }

using namespace boost::archive;
using namespace boost::test_tools;
using namespace cath::common;
using namespace cath::common::detail;
using namespace cath::test;
Expand Down
18 changes: 12 additions & 6 deletions source/src_common/common/program_exception_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/numeric/conversion/cast.hpp>

using namespace boost::log;
using namespace boost::log::expressions;
using namespace boost::log::trivial;
using namespace cath::common;
using namespace std;

using boost::log::expressions::format_date_time;
using boost::log::expressions::message;
using boost::log::expressions::smessage;
using boost::log::expressions::stream;
using boost::log::keywords::filter;
using boost::log::keywords::format;
using boost::log::trivial::severity;
using boost::log::trivial::warning;

/// \brief A simple private function to provide a standard way of outputting the context of a catch to a stream.
void program_exception_wrapper::output_catch_context(ostream &arg_os,
const char * const arg_program_name
Expand Down Expand Up @@ -80,14 +86,14 @@ int program_exception_wrapper::run_program(int arg_c, ///< The main()-sty
// If using Boost Log, then add a sink that writes to stderr, rather than using the default stdout sink
boost_log_sink_sptr = boost::log::add_console_log(
cerr,
keywords::format = (
format = (
stream << format_date_time< boost::posix_time::ptime >("TimeStamp", "%Y-%m-%d %H:%M:%S.%f")
// << "] [" << attr<boost::log::attributes::current_thread_id::value_type >("ThreadID")
<< " [" << do_get_program_name()
<< "|\033[1m" << left << setw( 7 ) << setfill(' ') << trivial::severity
<< "|\033[1m" << left << setw( 7 ) << setfill(' ') << severity
<< "\033[0m] " << smessage
),
keywords::filter = ( severity >= warning )
filter = ( severity >= warning )
);
boost::log::add_common_attributes();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
#include <sstream>
#include <string>

using namespace boost::test_tools;
using namespace cath;
using namespace cath::common;
using namespace std;

using boost::test_tools::output_test_stream;
using boost::algorithm::contains;

namespace cath {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "file/pdb/pdb_list.hpp"
#include "file/pdb/pdb_residue.hpp"

using namespace boost::log;
using namespace cath::chop;
using namespace cath::common;
using namespace cath::file;
Expand Down
1 change: 0 additions & 1 deletion source/uni/alignment/alignment_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "common/exception/invalid_argument_exception.hpp"
#include "common/exception/not_implemented_exception.hpp"

using namespace boost::log;
using namespace cath::align;
using namespace cath::align::detail;
using namespace cath::common;
Expand Down
2 changes: 1 addition & 1 deletion source/uni/alignment/alignment_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@

#include <utility>

using namespace boost::test_tools;
using namespace cath;
using namespace cath::align;
using namespace cath::common;
using namespace cath::common::test;
using namespace std;

using boost::none;
using boost::test_tools::output_test_stream;

namespace cath {
namespace test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <algorithm>
#include <numeric>

using namespace boost::math;
using namespace cath;
using namespace cath::align;
using namespace cath::common;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "common/clone/make_uptr_clone.hpp"
#include "common/exception/invalid_argument_exception.hpp"

using namespace boost::math;
using namespace cath;
using namespace cath::align;
using namespace cath::common;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <algorithm>
#include <string>

using namespace boost::algorithm;
using namespace cath;
using namespace cath::align::detail;
using namespace cath::align::gap;
Expand All @@ -57,6 +56,7 @@ using boost::algorithm::is_space;
using boost::algorithm::is_upper;
using boost::algorithm::token_compress_on;
using boost::algorithm::trim_copy;
using boost::empty_formatter;
using boost::lexical_cast;
using boost::numeric_cast;
using boost::range::count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include "common/size_t_literal.hpp"
#include "test/boost_addenda/boost_check_no_throw_diag.hpp"

using namespace cath::align;
using namespace cath::common;
using namespace cath::align;
using namespace cath::common;

/// \brief TODOCUMENT
///
Expand Down
2 changes: 1 addition & 1 deletion source/uni/alignment/gap/alignment_gap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
#include "common/size_t_literal.hpp"
#include "common/type_aliases.hpp"

using namespace boost::algorithm;
using namespace cath;
using namespace cath::align;
using namespace cath::align::gap;
using namespace cath::common;
using namespace std;

using boost::algorithm::erase_all_copy;
using boost::none;
using boost::numeric_cast;

Expand Down

0 comments on commit 33bfda3

Please sign in to comment.