mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Minor interface changes to provide more accessor methods for class
information. In particular, adding a few const versions of methods.
This commit is contained in:
parent
b6c1b35bb8
commit
f0fe270029
4 changed files with 39 additions and 6 deletions
2
src/ID.h
2
src/ID.h
|
@ -32,9 +32,11 @@ public:
|
|||
|
||||
void SetType(BroType* t) { Unref(type); type = t; }
|
||||
BroType* Type() { return type; }
|
||||
const BroType* Type() const { return type; }
|
||||
|
||||
void MakeType() { is_type = 1; }
|
||||
BroType* AsType() { return is_type ? Type() : 0; }
|
||||
const BroType* AsType() const { return is_type ? Type() : 0; }
|
||||
|
||||
// If weak_ref is false, the Val is assumed to be already ref'ed
|
||||
// and will be deref'ed when the ID is deleted.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue