Deprecate names in BifConst, replace with zeek::BifConst

Some Val* types are also replaced with IntrusivePtr at the new location
This commit is contained in:
Jon Siwek 2020-05-13 23:41:01 -07:00
parent eedeb07550
commit 0db5c920f2
39 changed files with 120 additions and 106 deletions

View file

@ -212,6 +212,16 @@ IntrusivePtr<T> lookup_val(std::string_view name)
*/
const IntrusivePtr<Val>& lookup_const(std::string_view name);
/**
* Lookup an ID by its name and return its value (as cast to @c T).
* A fatal occurs if the ID does not exist.
* @param name The identifier name to lookup
* @return The current value of the identifier.
*/
template<class T>
IntrusivePtr<T> lookup_const(std::string_view name)
{ return cast_intrusive<T>(lookup_const(name)); }
/**
* Lookup an ID by its name and return the function it references.
* A fatal occurs if the ID does not exist or if it is not a function.