mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Unify plugin::Component and plugin::TaggedComponent into a single class
These two are almost always used in conjunction with each other, and TaggedComponent is never used by itself. Combining them together into a single class will help simplify some of the code around managing the mapping between Tags and Components.
This commit is contained in:
parent
8b544d648d
commit
7d66f4252f
18 changed files with 90 additions and 158 deletions
10
src/Tag.h
10
src/Tag.h
|
@ -153,7 +153,7 @@ public:
|
|||
*
|
||||
* @param etype the script-layer enum type associated with the tag.
|
||||
*/
|
||||
const EnumValPtr& AsVal() const;
|
||||
const EnumValPtr& AsVal() const { return val; }
|
||||
|
||||
/**
|
||||
* Returns false if the tag represents an error value rather than a
|
||||
|
@ -164,10 +164,10 @@ public:
|
|||
static const Tag Error;
|
||||
|
||||
private:
|
||||
type_t type; // Main type.
|
||||
subtype_t subtype; // Subtype.
|
||||
mutable EnumValPtr val; // Script-layer value.
|
||||
mutable EnumTypePtr etype;
|
||||
type_t type = 0; // Main type.
|
||||
subtype_t subtype = 0; // Subtype.
|
||||
EnumValPtr val; // Script-layer value.
|
||||
EnumTypePtr etype;
|
||||
};
|
||||
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue