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:
Jon Siwek 2020-06-11 23:12:02 -07:00
commit d4f3cad7d1
256 changed files with 4277 additions and 3501 deletions

View file

@ -2,23 +2,28 @@
#pragma once
#include "Obj.h"
#include "IntrusivePtr.h"
#include <list>
#include <string>
#include <utility>
#include <fcntl.h>
# ifdef NEED_KRB5_H
# include <krb5.h>
# endif // NEED_KRB5_H
#ifdef NEED_KRB5_H
#include <krb5.h>
#endif // NEED_KRB5_H
#include "Obj.h"
#include "IntrusivePtr.h"
#include "util.h"
class Attributes;
class BroType;
class RecordVal;
namespace zeek { class Type; }
using BroType [[deprecated("Remove in v4.1. Use zeek::Type instead.")]] = zeek::Type;
ZEEK_FORWARD_DECLARE_NAMESPACED(PrintStmt, zeek::detail);
ZEEK_FORWARD_DECLARE_NAMESPACED(Attributes, zeek::detail);
class BroFile final : public BroObj {
public:
explicit BroFile(FILE* arg_f);
@ -38,9 +43,9 @@ public:
void SetBuf(bool buffered); // false=line buffered, true=fully buffered
[[deprecated("Remove in v4.1. Use GetType().")]]
BroType* FType() const { return t.get(); }
zeek::Type* FType() const { return t.get(); }
const IntrusivePtr<BroType>& GetType() const
const IntrusivePtr<zeek::Type>& GetType() const
{ return t; }
// Whether the file is open in a general sense; it might
@ -58,7 +63,7 @@ public:
RecordVal* Rotate();
// Set &raw_output attribute.
void SetAttrs(Attributes* attrs);
void SetAttrs(zeek::detail::Attributes* attrs);
// Returns the current size of the file, after fresh stat'ing.
double Size();
@ -77,7 +82,7 @@ public:
protected:
friend class PrintStmt;
friend class zeek::detail::PrintStmt;
BroFile() { Init(); }
void Init();
@ -101,10 +106,10 @@ protected:
void RaiseOpenEvent();
FILE* f;
IntrusivePtr<BroType> t;
IntrusivePtr<zeek::Type> t;
char* name;
char* access;
Attributes* attrs;
zeek::detail::Attributes* attrs;
double open_time;
bool is_open; // whether the file is open in a general sense
bool buffered;