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

@ -14,13 +14,13 @@ file_analysis::Tag::Tag(type_t type, subtype_t subtype)
file_analysis::Tag& file_analysis::Tag::operator=(const file_analysis::Tag& other)
{
::Tag::operator=(other);
zeek::Tag::operator=(other);
return *this;
}
const zeek::EnumValPtr& file_analysis::Tag::AsVal() const
{
return ::Tag::AsVal(file_mgr->GetTagType());
return zeek::Tag::AsVal(file_mgr->GetTagType());
}
zeek::EnumVal* file_analysis::Tag::AsEnumVal() const
@ -29,9 +29,9 @@ zeek::EnumVal* file_analysis::Tag::AsEnumVal() const
}
file_analysis::Tag::Tag(zeek::EnumValPtr val)
: ::Tag(std::move(val))
: zeek::Tag(std::move(val))
{ }
file_analysis::Tag::Tag(zeek::EnumVal* val)
: ::Tag({zeek::NewRef{}, val})
: zeek::Tag({zeek::NewRef{}, val})
{ }

View file

@ -29,18 +29,18 @@ class Component;
*
* The script-layer analogue is Files::Tag.
*/
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.
@ -63,7 +63,7 @@ public:
*/
bool operator==(const Tag& other) const
{
return ::Tag::operator==(other);
return zeek::Tag::operator==(other);
}
/**
@ -71,7 +71,7 @@ public:
*/
bool operator!=(const Tag& other) const
{
return ::Tag::operator!=(other);
return zeek::Tag::operator!=(other);
}
/**
@ -79,7 +79,7 @@ public:
*/
bool operator<(const Tag& other) const
{
return ::Tag::operator<(other);
return zeek::Tag::operator<(other);
}
/**