Move base Tag class to zeek namespace

This commit is contained in:
Tim Wojtulewicz 2020-07-01 14:19:13 -07:00
parent 8517d70e52
commit 87054d9d6b
10 changed files with 53 additions and 45 deletions

View file

@ -6,19 +6,19 @@
const input::Tag input::Tag::Error;
input::Tag::Tag(type_t type, subtype_t subtype)
: ::Tag(input_mgr->GetTagType(), type, subtype)
: zeek::Tag(input_mgr->GetTagType(), type, subtype)
{
}
input::Tag& input::Tag::operator=(const input::Tag& other)
{
::Tag::operator=(other);
zeek::Tag::operator=(other);
return *this;
}
const zeek::EnumValPtr& input::Tag::AsVal() const
{
return ::Tag::AsVal(input_mgr->GetTagType());
return zeek::Tag::AsVal(input_mgr->GetTagType());
}
zeek::EnumVal* input::Tag::AsEnumVal() const
@ -27,9 +27,9 @@ zeek::EnumVal* input::Tag::AsEnumVal() const
}
input::Tag::Tag(zeek::EnumValPtr val)
: ::Tag(std::move(val))
: zeek::Tag(std::move(val))
{ }
input::Tag::Tag(zeek::EnumVal* val)
: ::Tag({zeek::NewRef{}, val})
: zeek::Tag({zeek::NewRef{}, val})
{ }

View file

@ -30,18 +30,18 @@ class Component;
*
* The script-layer analogue is Input::Reader.
*/
class Tag : public ::Tag {
class Tag : public zeek::Tag {
public:
/*
* Copy constructor.
*/
Tag(const Tag& other) : ::Tag(other) {}
Tag(const Tag& other) : zeek::Tag(other) {}
/**
* Default constructor. This initializes the tag with an error value
* that will make \c operator \c bool return false.
*/
Tag() : ::Tag() {}
Tag() : zeek::Tag() {}
/**
* Destructor.
@ -64,7 +64,7 @@ public:
*/
bool operator==(const Tag& other) const
{
return ::Tag::operator==(other);
return zeek::Tag::operator==(other);
}
/**
@ -72,7 +72,7 @@ public:
*/
bool operator!=(const Tag& other) const
{
return ::Tag::operator!=(other);
return zeek::Tag::operator!=(other);
}
/**
@ -80,7 +80,7 @@ public:
*/
bool operator<(const Tag& other) const
{
return ::Tag::operator<(other);
return zeek::Tag::operator<(other);
}
/**