move includes around to lessen overall load

This commit is contained in:
moneromooo-monero 2017-11-25 22:25:05 +00:00
parent 38ecd0526e
commit 09ce03d612
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
73 changed files with 212 additions and 161 deletions

View file

@ -27,6 +27,7 @@
#pragma once
#include "misc_log_ex.h"
#include "string_tools.h"
#include <atomic>
#include <condition_variable>
#include <functional>
@ -37,6 +38,8 @@
#include <stdio.h>
#endif
#include <boost/thread.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#ifdef HAVE_READLINE
#include "readline_buffer.h"

View file

@ -29,7 +29,8 @@
#define _FILE_IO_UTILS_H_
#include <iostream>
#include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
namespace epee
{
@ -63,7 +64,7 @@ namespace file_io_utils
}
inline
bool get_file_time(const std::string& path_to_file, OUT time_t& ft)
bool get_file_time(const std::string& path_to_file, time_t& ft)
{
boost::system::error_code ec;
ft = boost::filesystem::last_write_time(boost::filesystem::path(path_to_file), ec);

View file

@ -37,6 +37,7 @@
#include <boost/uuid/random_generator.hpp>
#include "misc_os_dependent.h"
#include "syncobj.h"
namespace epee
{

View file

@ -28,26 +28,7 @@
#ifndef _MISC_LOG_EX_H_
#define _MISC_LOG_EX_H_
#include "static_initializer.h"
#include "string_tools.h"
#include "time_helper.h"
#include "misc_os_dependent.h"
#include "syncobj.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <list>
#include <map>
#include <string>
#include <time.h>
#include <boost/cstdint.hpp>
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include "easylogging++.h"

View file

@ -42,6 +42,9 @@
#include <mach/mach.h>
#endif
#include <iostream>
#include <boost/lexical_cast.hpp>
#pragma once
namespace epee
{

View file

@ -50,6 +50,7 @@
#include "http_auth.h"
#include "to_nonconst_iterator.h"
#include "net_parse_helpers.h"
#include "syncobj.h"
//#include "shlwapi.h"

View file

@ -38,8 +38,8 @@ namespace epee
virtual ~i_sub_handler(){}
virtual bool update_in( std::string& piece_of_transfer)=0;
virtual void stop(std::string& OUT collect_remains)=0;
virtual bool update_and_stop(std::string& OUT collect_remains, bool& is_changed)
virtual void stop(std::string& collect_remains)=0;
virtual bool update_and_stop(std::string& collect_remains, bool& is_changed)
{
is_changed = true;
bool res = this->update_in(collect_remains);
@ -66,7 +66,7 @@ namespace epee
{
return m_powner_filter->handle_target_data(piece_of_transfer);
}
virtual void stop(std::string& OUT collect_remains)
virtual void stop(std::string& collect_remains)
{
}

View file

@ -35,6 +35,8 @@
#include "levin_base.h"
#include "misc_language.h"
#include "syncobj.h"
#include "misc_os_dependent.h"
#include <random>
#include <chrono>

View file

@ -31,23 +31,16 @@
//#include <Winsock2.h>
//#include <Ws2tcpip.h>
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <istream>
#include <ostream>
#include <string>
#include <boost/version.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/preprocessor/selection/min.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include "net/net_utils_base.h"
#include "misc_language.h"
//#include "profile_tools.h"
#include "../string_tools.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net"

View file

@ -29,13 +29,11 @@
#ifndef _NET_UTILS_BASE_H_
#define _NET_UTILS_BASE_H_
#include <boost/asio/io_service.hpp>
#include <boost/uuid/uuid.hpp>
#include <memory>
#include <boost/asio/io_service.hpp>
#include <typeinfo>
#include <type_traits>
#include "serialization/keyvalue_serialization.h"
#include "string_tools.h"
#include "misc_log_ex.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
@ -45,7 +43,6 @@
#define MAKE_IP( a1, a2, a3, a4 ) (a1|(a2<<8)|(a3<<16)|(a4<<24))
#endif
namespace epee
{
namespace net_utils
@ -214,19 +211,8 @@ namespace net_utils
inline bool operator>=(const network_address& lhs, const network_address& rhs)
{ return !lhs.less(rhs); }
inline bool create_network_address(network_address &address, const std::string &string, uint16_t default_port = 0)
{
uint32_t ip;
uint16_t port;
if (epee::string_tools::parse_peer_from_string(ip, port, string))
{
if (default_port && !port)
port = default_port;
address = ipv4_network_address{ip, port};
return true;
}
return false;
}
bool create_network_address(network_address &address, const std::string &string, uint16_t default_port = 0);
/************************************************************************/
/* */
/************************************************************************/
@ -309,21 +295,8 @@ namespace net_utils
//some helpers
inline
std::string print_connection_context(const connection_context_base& ctx)
{
std::stringstream ss;
ss << ctx.m_remote_address.str() << " " << epee::string_tools::get_str_from_guid_a(ctx.m_connection_id) << (ctx.m_is_income ? " INC":" OUT");
return ss.str();
}
inline
std::string print_connection_context_short(const connection_context_base& ctx)
{
std::stringstream ss;
ss << ctx.m_remote_address.str() << (ctx.m_is_income ? " INC":" OUT");
return ss.str();
}
std::string print_connection_context(const connection_context_base& ctx);
std::string print_connection_context_short(const connection_context_base& ctx);
inline MAKE_LOGGABLE(connection_context_base, ct, os)
{

View file

@ -28,6 +28,8 @@
#ifndef _PROFILE_TOOLS_H_
#define _PROFILE_TOOLS_H_
#include "misc_os_dependent.h"
namespace epee
{

View file

@ -2,9 +2,7 @@
#include <streambuf>
#include <sstream>
#include <iostream>
#include <vector>
#include <algorithm>
namespace rdln
{

View file

@ -29,7 +29,7 @@
#define _REG_EXP_DEFINER_H_
#include <boost/interprocess/detail/atomic.hpp>
#include "syncobj.h"
namespace epee
{

View file

@ -26,6 +26,13 @@
#pragma once
#include <set>
#include <list>
#include <vector>
#include <deque>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/contains_fwd.hpp>
namespace epee
{
namespace serialization

View file

@ -25,6 +25,8 @@
//
#pragma once
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include "parserse_base_utils.h"
#include "file_io_utils.h"

View file

@ -28,6 +28,7 @@
#pragma once
#include "pragma_comp_defs.h"
#include "misc_language.h"
#include "portable_storage_base.h"

View file

@ -28,7 +28,7 @@
#pragma once
#include <regex>
#include <boost/regex.hpp>
#include "misc_language.h"
#include "portable_storage_base.h"
@ -146,7 +146,7 @@ POP_WARNINGS
if(std::all_of(from.begin(), from.end(), ::isdigit))
to = boost::lexical_cast<uint64_t>(from);
// MyMonero ISO 8061 timestamp (2017-05-06T16:27:06Z)
else if (std::regex_match (from, std::regex("\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\dZ")))
else if (boost::regex_match (from, boost::regex("\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\dZ")))
{
// Convert to unix timestamp
std::tm tm = {};

View file

@ -35,15 +35,15 @@
# include <windows.h>
#endif
#include <string.h>
#include <locale>
#include <cstdlib>
#include <string>
#include <type_traits>
#include <regex>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include "hex.h"
#include "span.h"
#include "warnings.h"
@ -350,11 +350,8 @@ POP_WARNINGS
s = *(t_pod_type*)bin_buff.data();
return true;
}
//----------------------------------------------------------------------------
inline bool validate_hex(uint64_t length, const std::string& str)
{
return std::regex_match(str, std::regex("'^[0-9abcdefABCDEF]+$'")) && str.size() == length;
}
//----------------------------------------------------------------------------
bool validate_hex(uint64_t length, const std::string& str);
//----------------------------------------------------------------------------
inline std::string get_extension(const std::string& str)
{