Remove other using statements from headers

This commit is contained in:
Tim Wojtulewicz 2020-04-07 13:14:17 -07:00
parent eb010290eb
commit a525f9532e
22 changed files with 123 additions and 171 deletions

View file

@ -1,12 +1,10 @@
#pragma once
#include <iosfwd>
#include <thread>
#include <stdint.h>
using namespace std;
#include <iosfwd>
#include <thread>
namespace threading {

View file

@ -2,12 +2,10 @@
#pragma once
#include "Type.h"
#include "SerialTypes.h"
#include <string>
using std::string;
#include "Type.h"
#include "SerialTypes.h"
namespace threading {
@ -17,7 +15,7 @@ namespace formatter {
/**
* A thread-safe class for converting values into some textual format. This
* is a base class that implements the interface for common
* is a base class that implements the interface for common
* rendering/parsing code needed by a number of input/output threads.
*/
class Formatter {
@ -69,7 +67,7 @@ public:
* @return Returns true on success, false on error. Errors are also
* flagged via the thread.
*/
virtual bool Describe(ODesc* desc, threading::Value* val, const string& name = "") const = 0;
virtual bool Describe(ODesc* desc, threading::Value* val, const std::string& name = "") const = 0;
/**
* Convert an implementation-specific textual representation of a
@ -83,7 +81,7 @@ public:
* @return The new value, or null on error. Errors must also be
* flagged via the thread.
*/
virtual threading::Value* ParseValue(const string& s, const string& name, TypeTag type, TypeTag subtype = TYPE_ERROR) const = 0;
virtual threading::Value* ParseValue(const std::string& s, const std::string& name, TypeTag type, TypeTag subtype = TYPE_ERROR) const = 0;
/**
* Convert an IP address into a string.
@ -94,7 +92,7 @@ public:
*
* @return An ASCII representation of the address.
*/
static string Render(const threading::Value::addr_t& addr);
static std::string Render(const threading::Value::addr_t& addr);
/**
* Convert an subnet value into a string.
@ -105,7 +103,7 @@ public:
*
* @return An ASCII representation of the subnet.
*/
static string Render(const threading::Value::subnet_t& subnet);
static std::string Render(const threading::Value::subnet_t& subnet);
/**
* Convert a double into a string. This renders the double with Bro's
@ -117,7 +115,7 @@ public:
*
* @return An ASCII representation of the double.
*/
static string Render(double d);
static std::string Render(double d);
/**
* Convert a transport protocol into a string.
@ -128,7 +126,7 @@ public:
*
* @return An ASCII representation of the protocol.
*/
static string Render(TransportProto proto);
static std::string Render(TransportProto proto);
/**
* Convert a string into a TransportProto. The string must be one of
@ -141,7 +139,7 @@ public:
* @return The transport protocol, which will be \c TRANSPORT_UNKNOWN
* on error. Errors are also flagged via the thread.
*/
TransportProto ParseProto(const string &proto) const;
TransportProto ParseProto(const std::string &proto) const;
/**
* Convert a string into a Value::addr_t.
@ -153,7 +151,7 @@ public:
* @return The address, which will be all-zero on error. Errors are
* also flagged via the thread.
*/
threading::Value::addr_t ParseAddr(const string &addr) const;
threading::Value::addr_t ParseAddr(const std::string &addr) const;
protected:
/**