Move a few low-use classes to namespaces

This commit is contained in:
Tim Wojtulewicz 2020-07-21 16:19:14 -07:00
parent 886fc102b8
commit c9ab1f93e7
53 changed files with 252 additions and 122 deletions

View file

@ -16,7 +16,7 @@
using namespace threading;
bool Field::Read(SerializationFormat* fmt)
bool Field::Read(zeek::detail::SerializationFormat* fmt)
{
int t;
int st;
@ -53,7 +53,7 @@ bool Field::Read(SerializationFormat* fmt)
return true;
}
bool Field::Write(SerializationFormat* fmt) const
bool Field::Write(zeek::detail::SerializationFormat* fmt) const
{
assert(name);
@ -173,7 +173,7 @@ bool Value::IsCompatibleType(zeek::Type* t, bool atomic_only)
return false;
}
bool Value::Read(SerializationFormat* fmt)
bool Value::Read(zeek::detail::SerializationFormat* fmt)
{
int ty, sty;
@ -323,7 +323,7 @@ bool Value::Read(SerializationFormat* fmt)
return false;
}
bool Value::Write(SerializationFormat* fmt) const
bool Value::Write(zeek::detail::SerializationFormat* fmt) const
{
if ( ! (fmt->Write((int)type, "type") &&
fmt->Write((int)subtype, "subtype") &&

View file

@ -9,7 +9,7 @@
#include "Type.h"
#include "net_util.h"
class SerializationFormat;
ZEEK_FORWARD_DECLARE_NAMESPACED(SerializationFormat, zeek::detail);
namespace threading {
@ -55,7 +55,7 @@ struct Field {
*
* @return False if an error occured.
*/
bool Read(SerializationFormat* fmt);
bool Read(zeek::detail::SerializationFormat* fmt);
/**
* Serializes a field.
@ -65,7 +65,7 @@ struct Field {
*
* @return False if an error occured.
*/
bool Write(SerializationFormat* fmt) const;
bool Write(zeek::detail::SerializationFormat* fmt) const;
/**
* Returns a textual description of the field's type. This method is
@ -171,7 +171,7 @@ struct Value {
*
* @return False if an error occured.
*/
bool Read(SerializationFormat* fmt);
bool Read(zeek::detail::SerializationFormat* fmt);
/**
* Serializes a value.
@ -181,7 +181,7 @@ struct Value {
*
* @return False if an error occured.
*/
bool Write(SerializationFormat* fmt) const;
bool Write(zeek::detail::SerializationFormat* fmt) const;
/**
* Returns true if the type can be represented by a Value. If