mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/266-namespaces'
Merge adjustments: - Preserved original `base_type_no_ref` argument type as ::TypeTag - Removed superfluous #pragma guard around deprecated TableVal ctor - Clarify NEWS regarding MetaHook{Pre,Post} deprecations - Simplify some `::zeek::` qualifications to just `zeek::` - Prefixed FORWARD_DECLARE_NAMESPACED macro with ZEEK_ * origin/topic/timw/266-namespaces: Disable some deprecation diagnostics for GCC Rename BroType to Type Update NEWS Review cleanup Move Type types to zeek namespace Move Flare/Pipe from the bro namespace to zeek::detail Move Attr to the zeek::detail namespace Move Trigger into the zeek::detail namespace Move ID to the zeek::detail namespace Move Anon.h into zeek::detail namespace Mark all of the aliased classes in plugin/Plugin.h deprecated, and fix all of the plugins that were using them Move all of the base plugin classes into the zeek::plugin namespace Expr: move all classes into zeek::detail Stmt: move Stmt classes into zeek::detail namespace Add utility macro for creating namespaced aliases for classes
This commit is contained in:
commit
d4f3cad7d1
256 changed files with 4277 additions and 3501 deletions
51
src/Var.h
51
src/Var.h
|
@ -6,47 +6,48 @@
|
|||
#include "ID.h"
|
||||
#include "Type.h"
|
||||
|
||||
class Expr;
|
||||
class FuncType;
|
||||
class Stmt;
|
||||
class Scope;
|
||||
class EventHandlerPtr;
|
||||
class StringVal;
|
||||
class TableVal;
|
||||
class ListVal;
|
||||
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(FuncType, zeek);
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(Stmt, zeek::detail);
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(Expr, zeek::detail);
|
||||
|
||||
typedef enum { VAR_REGULAR, VAR_CONST, VAR_REDEF, VAR_OPTION, } decl_type;
|
||||
|
||||
extern void add_global(const IntrusivePtr<ID>& id,
|
||||
IntrusivePtr<BroType> t,
|
||||
init_class c,
|
||||
IntrusivePtr<Expr> init,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attr,
|
||||
extern void add_global(const IntrusivePtr<zeek::detail::ID>& id,
|
||||
IntrusivePtr<zeek::Type> t,
|
||||
zeek::detail::init_class c,
|
||||
IntrusivePtr<zeek::detail::Expr> init,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<zeek::detail::Attr>>> attr,
|
||||
decl_type dt);
|
||||
|
||||
extern IntrusivePtr<Stmt> add_local(IntrusivePtr<ID> id,
|
||||
IntrusivePtr<BroType> t,
|
||||
init_class c,
|
||||
IntrusivePtr<Expr> init,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attr,
|
||||
decl_type dt);
|
||||
extern IntrusivePtr<zeek::detail::Stmt> add_local(IntrusivePtr<zeek::detail::ID> id,
|
||||
IntrusivePtr<zeek::Type> t,
|
||||
zeek::detail::init_class c,
|
||||
IntrusivePtr<zeek::detail::Expr> init,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<zeek::detail::Attr>>> attr,
|
||||
decl_type dt);
|
||||
|
||||
extern IntrusivePtr<Expr> add_and_assign_local(IntrusivePtr<ID> id,
|
||||
IntrusivePtr<Expr> init,
|
||||
extern IntrusivePtr<zeek::detail::Expr> add_and_assign_local(IntrusivePtr<zeek::detail::ID> id,
|
||||
IntrusivePtr<zeek::detail::Expr> init,
|
||||
IntrusivePtr<Val> val = nullptr);
|
||||
|
||||
extern void add_type(ID* id, IntrusivePtr<BroType> t,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attr);
|
||||
extern void add_type(zeek::detail::ID* id, IntrusivePtr<zeek::Type> t,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<zeek::detail::Attr>>> attr);
|
||||
|
||||
extern void begin_func(IntrusivePtr<ID> id, const char* module_name,
|
||||
function_flavor flavor, bool is_redef,
|
||||
IntrusivePtr<FuncType> t,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attrs = nullptr);
|
||||
extern void begin_func(IntrusivePtr<zeek::detail::ID> id, const char* module_name,
|
||||
zeek::FunctionFlavor flavor, bool is_redef,
|
||||
IntrusivePtr<zeek::FuncType> t,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<zeek::detail::Attr>>> attrs = nullptr);
|
||||
|
||||
extern void end_func(IntrusivePtr<Stmt> body);
|
||||
extern void end_func(IntrusivePtr<zeek::detail::Stmt> body);
|
||||
|
||||
// Gather all IDs referenced inside a body that aren't part of a given scope.
|
||||
extern id_list gather_outer_ids(Scope* scope, Stmt* body);
|
||||
extern id_list gather_outer_ids(Scope* scope, zeek::detail::Stmt* body);
|
||||
|
||||
[[deprecated("Remove in v4.1. Use zeek::id::find_val().")]]
|
||||
extern Val* internal_val(const char* name);
|
||||
|
@ -76,7 +77,7 @@ extern TableVal* opt_internal_table(const char* name); // nil if not defined
|
|||
extern ListVal* internal_list_val(const char* name);
|
||||
|
||||
[[deprecated("Remove in v4.1. Use zeek::id::find_type().")]]
|
||||
extern BroType* internal_type(const char* name);
|
||||
extern zeek::Type* internal_type(const char* name);
|
||||
|
||||
[[deprecated("Remove in v4.1. Use zeek::id::find_func().")]]
|
||||
extern Func* internal_func(const char* name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue