mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Adding override/final to overridden virtual methods.
C++11 compilers complain about overridden virtual methods not being specified as either final or overridden.
This commit is contained in:
parent
ad61267ce6
commit
a58c308427
15 changed files with 282 additions and 282 deletions
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
void RemoveAttr(attr_tag t);
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void DescribeReST(ODesc* d) const;
|
||||
|
||||
attr_list* Attrs() { return attrs; }
|
||||
|
|
|
@ -201,7 +201,7 @@ public:
|
|||
|
||||
bool IsPersistent() { return persistent; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void IDString(ODesc* d) const;
|
||||
|
||||
TimerMgr* GetTimerMgr() const;
|
||||
|
@ -336,7 +336,7 @@ public:
|
|||
{ Init(arg_conn, arg_timer, arg_do_expire); }
|
||||
virtual ~ConnectionTimer();
|
||||
|
||||
void Dispatch(double t, int is_expire);
|
||||
void Dispatch(double t, int is_expire) override;
|
||||
|
||||
protected:
|
||||
ConnectionTimer() {}
|
||||
|
|
214
src/Expr.h
214
src/Expr.h
|
@ -220,18 +220,18 @@ public:
|
|||
|
||||
ID* Id() const { return id; }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN);
|
||||
Expr* MakeLvalue();
|
||||
int IsPure() const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN) override;
|
||||
Expr* MakeLvalue() override;
|
||||
int IsPure() const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
NameExpr() { id = 0; }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(NameExpr);
|
||||
|
||||
|
@ -246,15 +246,15 @@ public:
|
|||
|
||||
Val* Value() const { return val; }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
ConstExpr() { val = 0; }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
DECLARE_SERIAL(ConstExpr);
|
||||
|
||||
Val* val;
|
||||
|
@ -267,11 +267,11 @@ public:
|
|||
// UnaryExpr::Eval correctly handles vector types. Any child
|
||||
// class that overrides Eval() should be modified to handle
|
||||
// vectors correctly as necessary.
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -280,7 +280,7 @@ protected:
|
|||
UnaryExpr(BroExprTag arg_tag, Expr* arg_op);
|
||||
virtual ~UnaryExpr();
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
// Returns the expression folded using the given constant.
|
||||
virtual Val* Fold(Val* v) const;
|
||||
|
@ -295,14 +295,14 @@ public:
|
|||
Expr* Op1() const { return op1; }
|
||||
Expr* Op2() const { return op2; }
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
// BinaryExpr::Eval correctly handles vector types. Any child
|
||||
// class that overrides Eval() should be modified to handle
|
||||
// vectors correctly as necessary.
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -340,7 +340,7 @@ protected:
|
|||
// operands and also set expression's type).
|
||||
void PromoteType(TypeTag t, bool is_vector);
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(BinaryExpr);
|
||||
|
||||
|
@ -351,13 +351,13 @@ protected:
|
|||
class CloneExpr : public UnaryExpr {
|
||||
public:
|
||||
CloneExpr(Expr* op);
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
CloneExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(CloneExpr);
|
||||
};
|
||||
|
@ -366,9 +366,9 @@ class IncrExpr : public UnaryExpr {
|
|||
public:
|
||||
IncrExpr(BroExprTag tag, Expr* op);
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
Val* DoSingleEval(Frame* f, Val* v) const;
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -385,7 +385,7 @@ protected:
|
|||
friend class Expr;
|
||||
NotExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(NotExpr);
|
||||
};
|
||||
|
@ -398,7 +398,7 @@ protected:
|
|||
friend class Expr;
|
||||
PosExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(PosExpr);
|
||||
};
|
||||
|
@ -411,7 +411,7 @@ protected:
|
|||
friend class Expr;
|
||||
NegExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(NegExpr);
|
||||
};
|
||||
|
@ -419,20 +419,20 @@ protected:
|
|||
class SizeExpr : public UnaryExpr {
|
||||
public:
|
||||
SizeExpr(Expr* op);
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
SizeExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
DECLARE_SERIAL(SizeExpr);
|
||||
};
|
||||
|
||||
class AddExpr : public BinaryExpr {
|
||||
public:
|
||||
AddExpr(Expr* op1, Expr* op2);
|
||||
void Canonicize();
|
||||
void Canonicize() override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -445,7 +445,7 @@ protected:
|
|||
class AddToExpr : public BinaryExpr {
|
||||
public:
|
||||
AddToExpr(Expr* op1, Expr* op2);
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -457,7 +457,7 @@ protected:
|
|||
class RemoveFromExpr : public BinaryExpr {
|
||||
public:
|
||||
RemoveFromExpr(Expr* op1, Expr* op2);
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -481,7 +481,7 @@ protected:
|
|||
class TimesExpr : public BinaryExpr {
|
||||
public:
|
||||
TimesExpr(Expr* op1, Expr* op2);
|
||||
void Canonicize();
|
||||
void Canonicize() override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -499,7 +499,7 @@ protected:
|
|||
friend class Expr;
|
||||
DivideExpr() { }
|
||||
|
||||
Val* AddrFold(Val* v1, Val* v2) const;
|
||||
Val* AddrFold(Val* v1, Val* v2) const override;
|
||||
|
||||
DECLARE_SERIAL(DivideExpr);
|
||||
|
||||
|
@ -520,7 +520,7 @@ class BoolExpr : public BinaryExpr {
|
|||
public:
|
||||
BoolExpr(BroExprTag tag, Expr* op1, Expr* op2);
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
Val* DoSingleEval(Frame* f, Val* v1, Expr* op2) const;
|
||||
|
||||
protected:
|
||||
|
@ -533,13 +533,13 @@ protected:
|
|||
class EqExpr : public BinaryExpr {
|
||||
public:
|
||||
EqExpr(BroExprTag tag, Expr* op1, Expr* op2);
|
||||
void Canonicize();
|
||||
void Canonicize() override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
EqExpr() { }
|
||||
|
||||
Val* Fold(Val* v1, Val* v2) const;
|
||||
Val* Fold(Val* v1, Val* v2) const override;
|
||||
|
||||
DECLARE_SERIAL(EqExpr);
|
||||
};
|
||||
|
@ -547,7 +547,7 @@ protected:
|
|||
class RelExpr : public BinaryExpr {
|
||||
public:
|
||||
RelExpr(BroExprTag tag, Expr* op1, Expr* op2);
|
||||
void Canonicize();
|
||||
void Canonicize() override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -565,16 +565,16 @@ public:
|
|||
const Expr* Op2() const { return op2; }
|
||||
const Expr* Op3() const { return op3; }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
int IsPure() const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
CondExpr() { op1 = op2 = op3 = 0; }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(CondExpr);
|
||||
|
||||
|
@ -587,8 +587,8 @@ class RefExpr : public UnaryExpr {
|
|||
public:
|
||||
RefExpr(Expr* op);
|
||||
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN);
|
||||
Expr* MakeLvalue();
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN) override;
|
||||
Expr* MakeLvalue() override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -604,12 +604,12 @@ public:
|
|||
AssignExpr(Expr* op1, Expr* op2, int is_init, Val* val = 0, attr_list* attrs = 0);
|
||||
virtual ~AssignExpr() { Unref(val); }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
void EvalIntoAggregate(const BroType* t, Val* aggr, Frame* f) const;
|
||||
BroType* InitType() const;
|
||||
int IsRecordElement(TypeDecl* td) const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
int IsPure() const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
void EvalIntoAggregate(const BroType* t, Val* aggr, Frame* f) const override;
|
||||
BroType* InitType() const override;
|
||||
int IsRecordElement(TypeDecl* td) const override;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
@ -628,28 +628,28 @@ class IndexExpr : public BinaryExpr {
|
|||
public:
|
||||
IndexExpr(Expr* op1, ListExpr* op2, bool is_slice = false);
|
||||
|
||||
int CanAdd() const;
|
||||
int CanDel() const;
|
||||
int CanAdd() const override;
|
||||
int CanDel() const override;
|
||||
|
||||
void Add(Frame* f);
|
||||
void Delete(Frame* f);
|
||||
void Add(Frame* f) override;
|
||||
void Delete(Frame* f) override;
|
||||
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN);
|
||||
Expr* MakeLvalue();
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN) override;
|
||||
Expr* MakeLvalue() override;
|
||||
|
||||
// Need to override Eval since it can take a vector arg but does
|
||||
// not necessarily return a vector.
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
IndexExpr() { }
|
||||
|
||||
Val* Fold(Val* v1, Val* v2) const;
|
||||
Val* Fold(Val* v1, Val* v2) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(IndexExpr);
|
||||
};
|
||||
|
@ -662,20 +662,20 @@ public:
|
|||
int Field() const { return field; }
|
||||
const char* FieldName() const { return field_name; }
|
||||
|
||||
int CanDel() const;
|
||||
int CanDel() const override;
|
||||
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN);
|
||||
void Delete(Frame* f);
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN) override;
|
||||
void Delete(Frame* f) override;
|
||||
|
||||
Expr* MakeLvalue();
|
||||
Expr* MakeLvalue() override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
FieldExpr() { field_name = 0; td = 0; }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(FieldExpr);
|
||||
|
||||
|
@ -697,9 +697,9 @@ protected:
|
|||
friend class Expr;
|
||||
HasFieldExpr() { field_name = 0; }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(HasFieldExpr);
|
||||
|
||||
|
@ -716,10 +716,10 @@ protected:
|
|||
friend class Expr;
|
||||
RecordConstructorExpr() { }
|
||||
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
Val* Fold(Val* v) const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(RecordConstructorExpr);
|
||||
};
|
||||
|
@ -732,15 +732,15 @@ public:
|
|||
|
||||
Attributes* Attrs() { return attrs; }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
TableConstructorExpr() { }
|
||||
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(TableConstructorExpr);
|
||||
|
||||
|
@ -755,15 +755,15 @@ public:
|
|||
|
||||
Attributes* Attrs() { return attrs; }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
SetConstructorExpr() { }
|
||||
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(SetConstructorExpr);
|
||||
|
||||
|
@ -774,15 +774,15 @@ class VectorConstructorExpr : public UnaryExpr {
|
|||
public:
|
||||
VectorConstructorExpr(ListExpr* constructor_list, BroType* arg_type = 0);
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
VectorConstructorExpr() { }
|
||||
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(VectorConstructorExpr);
|
||||
};
|
||||
|
@ -793,14 +793,14 @@ public:
|
|||
|
||||
const char* FieldName() const { return field_name.c_str(); }
|
||||
|
||||
void EvalIntoAggregate(const BroType* t, Val* aggr, Frame* f) const;
|
||||
int IsRecordElement(TypeDecl* td) const;
|
||||
void EvalIntoAggregate(const BroType* t, Val* aggr, Frame* f) const override;
|
||||
int IsRecordElement(TypeDecl* td) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
FieldAssignExpr() { }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(FieldAssignExpr);
|
||||
|
||||
|
@ -816,7 +816,7 @@ protected:
|
|||
ArithCoerceExpr() { }
|
||||
|
||||
Val* FoldSingleVal(Val* v, InternalTypeTag t) const;
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(ArithCoerceExpr);
|
||||
};
|
||||
|
@ -830,8 +830,8 @@ protected:
|
|||
friend class Expr;
|
||||
RecordCoerceExpr() { map = 0; }
|
||||
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
Val* Fold(Val* v) const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(RecordCoerceExpr);
|
||||
|
||||
|
@ -850,7 +850,7 @@ protected:
|
|||
friend class Expr;
|
||||
TableCoerceExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(TableCoerceExpr);
|
||||
};
|
||||
|
@ -864,7 +864,7 @@ protected:
|
|||
friend class Expr;
|
||||
VectorCoerceExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(VectorCoerceExpr);
|
||||
};
|
||||
|
@ -879,7 +879,7 @@ protected:
|
|||
friend class Expr;
|
||||
FlattenExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const;
|
||||
Val* Fold(Val* v) const override;
|
||||
|
||||
DECLARE_SERIAL(FlattenExpr);
|
||||
|
||||
|
@ -907,20 +907,20 @@ public:
|
|||
ScheduleExpr(Expr* when, EventExpr* event);
|
||||
~ScheduleExpr();
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
Expr* When() const { return when; }
|
||||
EventExpr* Event() const { return event; }
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
ScheduleExpr() { when = 0; event = 0; }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(ScheduleExpr);
|
||||
|
||||
|
@ -936,7 +936,7 @@ protected:
|
|||
friend class Expr;
|
||||
InExpr() { }
|
||||
|
||||
Val* Fold(Val* v1, Val* v2) const;
|
||||
Val* Fold(Val* v1, Val* v2) const override;
|
||||
|
||||
DECLARE_SERIAL(InExpr);
|
||||
|
||||
|
@ -950,17 +950,17 @@ public:
|
|||
Expr* Func() const { return func; }
|
||||
ListExpr* Args() const { return args; }
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
CallExpr() { func = 0; args = 0; }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(CallExpr);
|
||||
|
||||
|
@ -977,15 +977,15 @@ public:
|
|||
ListExpr* Args() const { return args; }
|
||||
EventHandlerPtr Handler() const { return handler; }
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
EventExpr() { args = 0; }
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(EventExpr);
|
||||
|
||||
|
@ -1006,24 +1006,24 @@ public:
|
|||
expr_list& Exprs() { return exprs; }
|
||||
|
||||
// True if the entire list represents pure values.
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
// True if the entire list represents constant values.
|
||||
int AllConst() const;
|
||||
|
||||
Val* Eval(Frame* f) const;
|
||||
Val* Eval(Frame* f) const override;
|
||||
|
||||
BroType* InitType() const;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const;
|
||||
Expr* MakeLvalue();
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN);
|
||||
BroType* InitType() const override;
|
||||
Val* InitVal(const BroType* t, Val* aggr) const override;
|
||||
Expr* MakeLvalue() override;
|
||||
void Assign(Frame* f, Val* v, Opcode op = OP_ASSIGN) override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
Val* AddSetInit(const BroType* t, Val* aggr) const;
|
||||
|
||||
void ExprDescribe(ODesc* d) const;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(ListExpr);
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ class RecordAssignExpr : public ListExpr {
|
|||
public:
|
||||
RecordAssignExpr(Expr* record, Expr* init_list, int is_init);
|
||||
|
||||
Val* Eval(Frame* f) const { return ListExpr::Eval(f); }
|
||||
Val* Eval(Frame* f) const override { return ListExpr::Eval(f); }
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
// closed, not active, or whatever.
|
||||
int Close();
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
void SetRotateInterval(double secs);
|
||||
|
||||
|
|
14
src/Func.h
14
src/Func.h
|
@ -92,15 +92,15 @@ public:
|
|||
BroFunc(ID* id, Stmt* body, id_list* inits, int frame_size, int priority);
|
||||
~BroFunc();
|
||||
|
||||
int IsPure() const;
|
||||
Val* Call(val_list* args, Frame* parent) const;
|
||||
int IsPure() const override;
|
||||
Val* Call(val_list* args, Frame* parent) const override;
|
||||
|
||||
void AddBody(Stmt* new_body, id_list* new_inits, int new_frame_size,
|
||||
int priority);
|
||||
int priority) override;
|
||||
|
||||
int FrameSize() const { return frame_size; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
protected:
|
||||
BroFunc() : Func(BRO_FUNC) {}
|
||||
|
@ -118,11 +118,11 @@ public:
|
|||
BuiltinFunc(built_in_func func, const char* name, int is_pure);
|
||||
~BuiltinFunc();
|
||||
|
||||
int IsPure() const;
|
||||
Val* Call(val_list* args, Frame* parent) const;
|
||||
int IsPure() const override;
|
||||
Val* Call(val_list* args, Frame* parent) const override;
|
||||
built_in_func TheFunc() const { return func; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
protected:
|
||||
BuiltinFunc() { func = 0; is_pure = 0; }
|
||||
|
|
2
src/ID.h
2
src/ID.h
|
@ -87,7 +87,7 @@ public:
|
|||
|
||||
void Error(const char* msg, const BroObj* o2 = 0);
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
// Adds type and value to description.
|
||||
void DescribeExtended(ODesc* d) const;
|
||||
// Produces a description that's reST-ready.
|
||||
|
|
|
@ -48,9 +48,9 @@ public:
|
|||
protected:
|
||||
friend class Val;
|
||||
|
||||
virtual bool DoInit() /* override */;
|
||||
virtual bool DoFeed(const void* data, size_t size) /* override */;
|
||||
virtual StringVal* DoGet() /* override */;
|
||||
virtual bool DoInit() override;
|
||||
virtual bool DoFeed(const void* data, size_t size) override;
|
||||
virtual StringVal* DoGet() override;
|
||||
|
||||
DECLARE_SERIAL(MD5Val);
|
||||
|
||||
|
@ -67,9 +67,9 @@ public:
|
|||
protected:
|
||||
friend class Val;
|
||||
|
||||
virtual bool DoInit() /* override */;
|
||||
virtual bool DoFeed(const void* data, size_t size) /* override */;
|
||||
virtual StringVal* DoGet() /* override */;
|
||||
virtual bool DoInit() override;
|
||||
virtual bool DoFeed(const void* data, size_t size) override;
|
||||
virtual StringVal* DoGet() override;
|
||||
|
||||
DECLARE_SERIAL(SHA1Val);
|
||||
|
||||
|
@ -86,9 +86,9 @@ public:
|
|||
protected:
|
||||
friend class Val;
|
||||
|
||||
virtual bool DoInit() /* override */;
|
||||
virtual bool DoFeed(const void* data, size_t size) /* override */;
|
||||
virtual StringVal* DoGet() /* override */;
|
||||
virtual bool DoInit() override;
|
||||
virtual bool DoFeed(const void* data, size_t size) override;
|
||||
virtual StringVal* DoGet() override;
|
||||
|
||||
DECLARE_SERIAL(SHA256Val);
|
||||
|
||||
|
|
|
@ -169,10 +169,10 @@ public:
|
|||
#define DECLARE_SERIAL(classname) \
|
||||
static classname* Instantiate(); \
|
||||
static SerialTypeRegistrator register_type; \
|
||||
virtual bool DoSerialize(SerialInfo*) const; \
|
||||
virtual bool DoUnserialize(UnserialInfo*); \
|
||||
virtual const TransientID* GetTID() const { return &tid; } \
|
||||
virtual SerialType GetSerialType() const; \
|
||||
virtual bool DoSerialize(SerialInfo*) const override; \
|
||||
virtual bool DoUnserialize(UnserialInfo*) override; \
|
||||
virtual const TransientID* GetTID() const override { return &tid; } \
|
||||
virtual SerialType GetSerialType() const override; \
|
||||
TransientID tid;
|
||||
|
||||
// Only needed (and usable) for non-abstract classes.
|
||||
|
|
122
src/Stmt.h
122
src/Stmt.h
|
@ -124,7 +124,7 @@ protected:
|
|||
friend class Stmt;
|
||||
PrintStmt() {}
|
||||
|
||||
Val* DoExec(val_list* vals, stmt_flow_type& flow) const;
|
||||
Val* DoExec(val_list* vals, stmt_flow_type& flow) const override;
|
||||
|
||||
DECLARE_SERIAL(PrintStmt);
|
||||
};
|
||||
|
@ -134,13 +134,13 @@ public:
|
|||
ExprStmt(Expr* e);
|
||||
virtual ~ExprStmt();
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
const Expr* StmtExpr() const { return e; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -149,7 +149,7 @@ protected:
|
|||
|
||||
virtual Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
DECLARE_SERIAL(ExprStmt);
|
||||
|
||||
|
@ -164,16 +164,16 @@ public:
|
|||
const Stmt* TrueBranch() const { return s1; }
|
||||
const Stmt* FalseBranch() const { return s2; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
IfStmt() { s1 = s2 = 0; }
|
||||
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
DECLARE_SERIAL(IfStmt);
|
||||
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
const Stmt* Body() const { return s; }
|
||||
Stmt* Body() { return s; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
bool Serialize(SerialInfo* info) const;
|
||||
static Case* Unserialize(UnserialInfo* info);
|
||||
|
@ -216,16 +216,16 @@ public:
|
|||
|
||||
const case_list* Cases() const { return cases; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
SwitchStmt() { cases = 0; default_case_idx = -1; comp_hash = 0; }
|
||||
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
DECLARE_SERIAL(SwitchStmt);
|
||||
|
||||
|
@ -252,10 +252,10 @@ class AddStmt : public ExprStmt {
|
|||
public:
|
||||
AddStmt(Expr* e);
|
||||
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const override;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -268,10 +268,10 @@ class DelStmt : public ExprStmt {
|
|||
public:
|
||||
DelStmt(Expr* e);
|
||||
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const override;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -284,9 +284,9 @@ class EventStmt : public ExprStmt {
|
|||
public:
|
||||
EventStmt(EventExpr* e);
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -303,11 +303,11 @@ public:
|
|||
WhileStmt(Expr* loop_condition, Stmt* body);
|
||||
~WhileStmt();
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -315,7 +315,7 @@ protected:
|
|||
WhileStmt()
|
||||
{ loop_condition = 0; body = 0; }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
DECLARE_SERIAL(WhileStmt);
|
||||
|
||||
|
@ -334,17 +334,17 @@ public:
|
|||
const Expr* LoopExpr() const { return e; }
|
||||
const Stmt* LoopBody() const { return body; }
|
||||
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
ForStmt() { loop_vars = 0; body = 0; }
|
||||
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
|
||||
|
||||
DECLARE_SERIAL(ForStmt);
|
||||
|
||||
|
@ -356,12 +356,12 @@ class NextStmt : public Stmt {
|
|||
public:
|
||||
NextStmt() : Stmt(STMT_NEXT) { }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
DECLARE_SERIAL(NextStmt);
|
||||
|
@ -371,12 +371,12 @@ class BreakStmt : public Stmt {
|
|||
public:
|
||||
BreakStmt() : Stmt(STMT_BREAK) { }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
DECLARE_SERIAL(BreakStmt);
|
||||
|
@ -386,12 +386,12 @@ class FallthroughStmt : public Stmt {
|
|||
public:
|
||||
FallthroughStmt() : Stmt(STMT_FALLTHROUGH) { }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
DECLARE_SERIAL(FallthroughStmt);
|
||||
|
@ -401,9 +401,9 @@ class ReturnStmt : public ExprStmt {
|
|||
public:
|
||||
ReturnStmt(Expr* e);
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -417,17 +417,17 @@ public:
|
|||
StmtList();
|
||||
~StmtList();
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
const stmt_list& Stmts() const { return stmts; }
|
||||
stmt_list& Stmts() { return stmts; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
int IsPure() const;
|
||||
int IsPure() const override;
|
||||
|
||||
DECLARE_SERIAL(StmtList);
|
||||
|
||||
|
@ -439,9 +439,9 @@ public:
|
|||
EventBodyList() : StmtList()
|
||||
{ topmost = false; tag = STMT_EVENT_BODY_LIST; }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
// "Topmost" means that this is the main body of a function or event.
|
||||
// void SetTopmost(bool is_topmost) { topmost = is_topmost; }
|
||||
|
@ -465,13 +465,13 @@ public:
|
|||
|
||||
~InitStmt();
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
|
||||
const id_list* Inits() const { return inits; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
friend class Stmt;
|
||||
|
@ -486,12 +486,12 @@ class NullStmt : public Stmt {
|
|||
public:
|
||||
NullStmt() : Stmt(STMT_NULL) { }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
DECLARE_SERIAL(NullStmt);
|
||||
|
@ -503,17 +503,17 @@ public:
|
|||
WhenStmt(Expr* cond, Stmt* s1, Stmt* s2, Expr* timeout, bool is_return);
|
||||
~WhenStmt();
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
|
||||
int IsPure() const override;
|
||||
|
||||
const Expr* Cond() const { return cond; }
|
||||
const Stmt* Body() const { return s1; }
|
||||
const Expr* TimeoutExpr() const { return timeout; }
|
||||
const Stmt* TimeoutBody() const { return s2; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
TraversalCode Traverse(TraversalCallback* cb) const override;
|
||||
|
||||
protected:
|
||||
WhenStmt() { cond = 0; s1 = s2 = 0; timeout = 0; is_return = 0; }
|
||||
|
|
50
src/Type.h
50
src/Type.h
|
@ -248,7 +248,7 @@ public:
|
|||
|
||||
BroType* Ref() { ::Ref(this); return this; }
|
||||
|
||||
virtual void Describe(ODesc* d) const;
|
||||
virtual void Describe(ODesc* d) const override;
|
||||
virtual void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
|
||||
virtual unsigned MemoryAllocation() const;
|
||||
|
@ -312,9 +312,9 @@ public:
|
|||
void Append(BroType* t);
|
||||
void AppendEvenIfNotPure(BroType* t);
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
unsigned int MemoryAllocation() const
|
||||
unsigned int MemoryAllocation() const override
|
||||
{
|
||||
return BroType::MemoryAllocation()
|
||||
+ padded_sizeof(*this) - padded_sizeof(BroType)
|
||||
|
@ -330,15 +330,15 @@ protected:
|
|||
|
||||
class IndexType : public BroType {
|
||||
public:
|
||||
int MatchesIndex(ListExpr*& index) const;
|
||||
int MatchesIndex(ListExpr*& index) const override;
|
||||
|
||||
TypeList* Indices() const { return indices; }
|
||||
const type_list* IndexTypes() const { return indices->Types(); }
|
||||
BroType* YieldType();
|
||||
BroType* YieldType() override;
|
||||
const BroType* YieldType() const;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const override;
|
||||
|
||||
// Returns true if this table is solely indexed by subnet.
|
||||
bool IsSubNetIndex() const;
|
||||
|
@ -397,7 +397,7 @@ public:
|
|||
~FuncType();
|
||||
|
||||
RecordType* Args() const { return args; }
|
||||
BroType* YieldType();
|
||||
BroType* YieldType() override;
|
||||
const BroType* YieldType() const;
|
||||
void SetYieldType(BroType* arg_yield) { yield = arg_yield; }
|
||||
function_flavor Flavor() const { return flavor; }
|
||||
|
@ -407,13 +407,13 @@ public:
|
|||
void ClearYieldType(function_flavor arg_flav)
|
||||
{ Unref(yield); yield = 0; flavor = arg_flav; }
|
||||
|
||||
int MatchesIndex(ListExpr*& index) const;
|
||||
int MatchesIndex(ListExpr*& index) const override;
|
||||
int CheckArgs(const type_list* args, bool is_init = false) const;
|
||||
|
||||
TypeList* ArgTypes() const { return arg_types; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const override;
|
||||
|
||||
protected:
|
||||
FuncType() { args = 0; arg_types = 0; yield = 0; flavor = FUNC_FLAVOR_FUNCTION; }
|
||||
|
@ -463,8 +463,8 @@ public:
|
|||
|
||||
~RecordType();
|
||||
|
||||
int HasField(const char* field) const;
|
||||
BroType* FieldType(const char* field) const;
|
||||
int HasField(const char* field) const override;
|
||||
BroType* FieldType(const char* field) const override;
|
||||
BroType* FieldType(int field) const;
|
||||
Val* FieldDefault(int field) const; // Ref's the returned value; 0 if none.
|
||||
|
||||
|
@ -487,8 +487,8 @@ public:
|
|||
// Takes ownership of list.
|
||||
const char* AddFields(type_decl_list* types, attr_list* attr);
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const override;
|
||||
void DescribeFields(ODesc* d) const;
|
||||
void DescribeFieldsReST(ODesc* d, bool func_args) const;
|
||||
|
||||
|
@ -504,7 +504,7 @@ protected:
|
|||
class SubNetType : public BroType {
|
||||
public:
|
||||
SubNetType();
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
protected:
|
||||
DECLARE_SERIAL(SubNetType)
|
||||
};
|
||||
|
@ -514,9 +514,9 @@ public:
|
|||
FileType(BroType* yield_type);
|
||||
~FileType();
|
||||
|
||||
BroType* YieldType();
|
||||
BroType* YieldType() override;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
protected:
|
||||
FileType() { yield = 0; }
|
||||
|
@ -533,8 +533,8 @@ public:
|
|||
|
||||
const string& Name() const { return name; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const override;
|
||||
|
||||
protected:
|
||||
OpaqueType() { }
|
||||
|
@ -569,7 +569,7 @@ public:
|
|||
// will be fully qualified with their module name.
|
||||
enum_name_list Names() const;
|
||||
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const override;
|
||||
|
||||
protected:
|
||||
EnumType() { counter = 0; }
|
||||
|
@ -599,17 +599,17 @@ class VectorType : public BroType {
|
|||
public:
|
||||
VectorType(BroType* t);
|
||||
virtual ~VectorType();
|
||||
BroType* YieldType();
|
||||
BroType* YieldType() override;
|
||||
const BroType* YieldType() const;
|
||||
|
||||
int MatchesIndex(ListExpr*& index) const;
|
||||
int MatchesIndex(ListExpr*& index) const override;
|
||||
|
||||
// Returns true if this table type is "unspecified", which is what one
|
||||
// gets using an empty "vector()" constructor.
|
||||
bool IsUnspecifiedVector() const;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
void DescribeReST(ODesc* d, bool roles_only = false) const override;
|
||||
|
||||
protected:
|
||||
VectorType() { yield_type = 0; }
|
||||
|
|
76
src/Val.h
76
src/Val.h
|
@ -325,7 +325,7 @@ public:
|
|||
return (MutableVal*) this;
|
||||
}
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
virtual void DescribeReST(ODesc* d) const;
|
||||
|
||||
bool Serialize(SerialInfo* info) const;
|
||||
|
@ -443,7 +443,7 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
virtual uint64 LastModified() const { return last_modified; }
|
||||
virtual uint64 LastModified() const override { return last_modified; }
|
||||
|
||||
// Mark value as changed.
|
||||
void Modified()
|
||||
|
@ -487,7 +487,7 @@ public:
|
|||
protected:
|
||||
IntervalVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(IntervalVal);
|
||||
};
|
||||
|
@ -509,7 +509,7 @@ public:
|
|||
PortVal(uint32 p, TransportProto port_type);
|
||||
PortVal(uint32 p); // used for already-massaged port value.
|
||||
|
||||
Val* SizeVal() const { return new Val(val.uint_val, TYPE_INT); }
|
||||
Val* SizeVal() const override { return new Val(val.uint_val, TYPE_INT); }
|
||||
|
||||
// Returns the port number in host order (not including the mask).
|
||||
uint32 Port() const;
|
||||
|
@ -535,7 +535,7 @@ protected:
|
|||
friend class Val;
|
||||
PortVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(PortVal);
|
||||
};
|
||||
|
@ -545,14 +545,14 @@ public:
|
|||
AddrVal(const char* text);
|
||||
~AddrVal();
|
||||
|
||||
Val* SizeVal() const;
|
||||
Val* SizeVal() const override;
|
||||
|
||||
// Constructor for address already in network order.
|
||||
AddrVal(uint32 addr); // IPv4.
|
||||
AddrVal(const uint32 addr[4]); // IPv6.
|
||||
AddrVal(const IPAddr& addr);
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
|
@ -573,7 +573,7 @@ public:
|
|||
SubNetVal(const IPPrefix& prefix);
|
||||
~SubNetVal();
|
||||
|
||||
Val* SizeVal() const;
|
||||
Val* SizeVal() const override;
|
||||
|
||||
const IPAddr& Prefix() const;
|
||||
int Width() const;
|
||||
|
@ -581,13 +581,13 @@ public:
|
|||
|
||||
bool Contains(const IPAddr& addr) const;
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
SubNetVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(SubNetVal);
|
||||
};
|
||||
|
@ -599,7 +599,7 @@ public:
|
|||
StringVal(const string& s);
|
||||
StringVal(int length, const char* s);
|
||||
|
||||
Val* SizeVal() const
|
||||
Val* SizeVal() const override
|
||||
{ return new Val(val.string_val->Len(), TYPE_COUNT); }
|
||||
|
||||
int Len() { return AsString()->Len(); }
|
||||
|
@ -613,13 +613,13 @@ public:
|
|||
|
||||
StringVal* ToUpper();
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
StringVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(StringVal);
|
||||
};
|
||||
|
@ -629,17 +629,17 @@ public:
|
|||
PatternVal(RE_Matcher* re);
|
||||
~PatternVal();
|
||||
|
||||
int AddTo(Val* v, int is_first_init) const;
|
||||
int AddTo(Val* v, int is_first_init) const override;
|
||||
|
||||
void SetMatcher(RE_Matcher* re);
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
PatternVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(PatternVal);
|
||||
};
|
||||
|
@ -653,7 +653,7 @@ public:
|
|||
|
||||
TypeTag BaseTag() const { return tag; }
|
||||
|
||||
Val* SizeVal() const { return new Val(vals.length(), TYPE_COUNT); }
|
||||
Val* SizeVal() const override { return new Val(vals.length(), TYPE_COUNT); }
|
||||
|
||||
int Length() const { return vals.length(); }
|
||||
Val* Index(const int n) { return vals[n]; }
|
||||
|
@ -677,9 +677,9 @@ public:
|
|||
const val_list* Vals() const { return &vals; }
|
||||
val_list* Vals() { return &vals; }
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
|
@ -760,14 +760,14 @@ public:
|
|||
int Assign(Val* index, Val* new_val, Opcode op = OP_ASSIGN);
|
||||
int Assign(Val* index, HashKey* k, Val* new_val, Opcode op = OP_ASSIGN);
|
||||
|
||||
Val* SizeVal() const { return new Val(Size(), TYPE_COUNT); }
|
||||
Val* SizeVal() const override { return new Val(Size(), TYPE_COUNT); }
|
||||
|
||||
// Add the entire contents of the table to the given value,
|
||||
// which must also be a TableVal.
|
||||
// Returns true if the addition typechecked, false if not.
|
||||
// If is_first_init is true, then this is the *first* initialization
|
||||
// (and so should be strictly adding new elements).
|
||||
int AddTo(Val* v, int is_first_init) const;
|
||||
int AddTo(Val* v, int is_first_init) const override;
|
||||
|
||||
// Same but allows suppression of state operations.
|
||||
int AddTo(Val* v, int is_first_init, bool propagate_ops) const;
|
||||
|
@ -778,7 +778,7 @@ public:
|
|||
// Remove the entire contents of the table from the given value.
|
||||
// which must also be a TableVal.
|
||||
// Returns true if the addition typechecked, false if not.
|
||||
int RemoveFrom(Val* v) const;
|
||||
int RemoveFrom(Val* v) const override;
|
||||
|
||||
// Expands any lists in the index into multiple initializations.
|
||||
// Returns true if the initializations typecheck, false if not.
|
||||
|
@ -813,12 +813,12 @@ public:
|
|||
int Size() const { return AsTable()->Length(); }
|
||||
int RecursiveSize() const;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
void InitTimer(double delay);
|
||||
void DoExpire(double t);
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
|
||||
void ClearTimer(Timer* t)
|
||||
{
|
||||
|
@ -840,8 +840,8 @@ protected:
|
|||
int ExpandCompoundAndInit(val_list* vl, int k, Val* new_val);
|
||||
int CheckAndAssign(Val* index, Val* new_val, Opcode op = OP_ASSIGN);
|
||||
|
||||
bool AddProperties(Properties arg_state);
|
||||
bool RemoveProperties(Properties arg_state);
|
||||
bool AddProperties(Properties arg_state) override;
|
||||
bool RemoveProperties(Properties arg_state) override;
|
||||
|
||||
// Calculates default value for index. Returns 0 if none.
|
||||
Val* Default(Val* index);
|
||||
|
@ -871,7 +871,7 @@ public:
|
|||
RecordVal(RecordType* t);
|
||||
~RecordVal();
|
||||
|
||||
Val* SizeVal() const
|
||||
Val* SizeVal() const override
|
||||
{ return new Val(record_type->NumFields(), TYPE_COUNT); }
|
||||
|
||||
void Assign(int field, Val* new_val, Opcode op = OP_ASSIGN);
|
||||
|
@ -889,7 +889,7 @@ public:
|
|||
*/
|
||||
Val* Lookup(const char* field, bool with_default = false) const;
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void Describe(ODesc* d) const override;
|
||||
|
||||
// This is an experiment to associate a BroObj within the
|
||||
// event engine to a record value in bro script.
|
||||
|
@ -910,15 +910,15 @@ public:
|
|||
RecordVal* CoerceTo(const RecordType* other, Val* aggr, bool allow_orphaning = false) const;
|
||||
RecordVal* CoerceTo(RecordType* other, bool allow_orphaning = false);
|
||||
|
||||
unsigned int MemoryAllocation() const;
|
||||
void DescribeReST(ODesc* d) const;
|
||||
unsigned int MemoryAllocation() const override;
|
||||
void DescribeReST(ODesc* d) const override;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
RecordVal() {}
|
||||
|
||||
bool AddProperties(Properties arg_state);
|
||||
bool RemoveProperties(Properties arg_state);
|
||||
bool AddProperties(Properties arg_state) override;
|
||||
bool RemoveProperties(Properties arg_state) override;
|
||||
|
||||
DECLARE_SERIAL(RecordVal);
|
||||
|
||||
|
@ -934,13 +934,13 @@ public:
|
|||
type = t;
|
||||
}
|
||||
|
||||
Val* SizeVal() const { return new Val(val.int_val, TYPE_INT); }
|
||||
Val* SizeVal() const override { return new Val(val.int_val, TYPE_INT); }
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
EnumVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(EnumVal);
|
||||
};
|
||||
|
@ -951,7 +951,7 @@ public:
|
|||
VectorVal(VectorType* t);
|
||||
~VectorVal();
|
||||
|
||||
Val* SizeVal() const
|
||||
Val* SizeVal() const override
|
||||
{ return new Val(uint32(val.vector_val->size()), TYPE_COUNT); }
|
||||
|
||||
// Returns false if the type of the argument was wrong.
|
||||
|
@ -996,9 +996,9 @@ protected:
|
|||
friend class Val;
|
||||
VectorVal() { }
|
||||
|
||||
bool AddProperties(Properties arg_state);
|
||||
bool RemoveProperties(Properties arg_state);
|
||||
void ValDescribe(ODesc* d) const;
|
||||
bool AddProperties(Properties arg_state) override;
|
||||
bool RemoveProperties(Properties arg_state) override;
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(VectorVal);
|
||||
|
||||
|
|
|
@ -91,15 +91,15 @@ private:
|
|||
|
||||
DECLARE_SERIAL(TCP_Reassembler);
|
||||
|
||||
void Undelivered(uint64 up_to_seq);
|
||||
void Undelivered(uint64 up_to_seq) override;
|
||||
void Gap(uint64 seq, uint64 len);
|
||||
|
||||
void RecordToSeq(uint64 start_seq, uint64 stop_seq, BroFile* f);
|
||||
void RecordBlock(DataBlock* b, BroFile* f);
|
||||
void RecordGap(uint64 start_seq, uint64 upper_seq, BroFile* f);
|
||||
|
||||
void BlockInserted(DataBlock* b);
|
||||
void Overlap(const u_char* b1, const u_char* b2, uint64 n);
|
||||
void BlockInserted(DataBlock* b) override;
|
||||
void Overlap(const u_char* b1, const u_char* b2, uint64 n) override;
|
||||
|
||||
TCP_Endpoint* endp;
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ protected:
|
|||
|
||||
DECLARE_SERIAL(FileReassembler);
|
||||
|
||||
void Undelivered(uint64 up_to_seq);
|
||||
void BlockInserted(DataBlock* b);
|
||||
void Overlap(const u_char* b1, const u_char* b2, uint64 n);
|
||||
void Undelivered(uint64 up_to_seq) override;
|
||||
void BlockInserted(DataBlock* b) override;
|
||||
void Overlap(const u_char* b1, const u_char* b2, uint64 n) override;
|
||||
|
||||
File* the_file;
|
||||
bool flushing;
|
||||
|
|
|
@ -158,11 +158,11 @@ public:
|
|||
static size_t K(size_t cells, size_t capacity);
|
||||
|
||||
// Overridden from BloomFilter.
|
||||
virtual bool Empty() const;
|
||||
virtual void Clear();
|
||||
virtual bool Merge(const BloomFilter* other);
|
||||
virtual BasicBloomFilter* Clone() const;
|
||||
virtual string InternalState() const;
|
||||
virtual bool Empty() const override;
|
||||
virtual void Clear() override;
|
||||
virtual bool Merge(const BloomFilter* other) override;
|
||||
virtual BasicBloomFilter* Clone() const override;
|
||||
virtual string InternalState() const override;
|
||||
|
||||
protected:
|
||||
DECLARE_SERIAL(BasicBloomFilter);
|
||||
|
@ -173,8 +173,8 @@ protected:
|
|||
BasicBloomFilter();
|
||||
|
||||
// Overridden from BloomFilter.
|
||||
virtual void Add(const HashKey* key);
|
||||
virtual size_t Count(const HashKey* key) const;
|
||||
virtual void Add(const HashKey* key) override;
|
||||
virtual size_t Count(const HashKey* key) const override;
|
||||
|
||||
private:
|
||||
BitVector* bits;
|
||||
|
@ -203,11 +203,11 @@ public:
|
|||
~CountingBloomFilter();
|
||||
|
||||
// Overridden from BloomFilter.
|
||||
virtual bool Empty() const;
|
||||
virtual void Clear();
|
||||
virtual bool Merge(const BloomFilter* other);
|
||||
virtual CountingBloomFilter* Clone() const;
|
||||
virtual string InternalState() const;
|
||||
virtual bool Empty() const override;
|
||||
virtual void Clear() override;
|
||||
virtual bool Merge(const BloomFilter* other) override;
|
||||
virtual CountingBloomFilter* Clone() const override;
|
||||
virtual string InternalState() const override;
|
||||
|
||||
protected:
|
||||
DECLARE_SERIAL(CountingBloomFilter);
|
||||
|
@ -218,8 +218,8 @@ protected:
|
|||
CountingBloomFilter();
|
||||
|
||||
// Overridden from BloomFilter.
|
||||
virtual void Add(const HashKey* key);
|
||||
virtual size_t Count(const HashKey* key) const;
|
||||
virtual void Add(const HashKey* key) override;
|
||||
virtual size_t Count(const HashKey* key) const override;
|
||||
|
||||
private:
|
||||
CounterVector* cells;
|
||||
|
|
|
@ -191,9 +191,9 @@ public:
|
|||
DefaultHasher(size_t k, size_t seed);
|
||||
|
||||
// Overridden from Hasher.
|
||||
virtual digest_vector Hash(const void* x, size_t n) const /* final */;
|
||||
virtual DefaultHasher* Clone() const /* final */;
|
||||
virtual bool Equals(const Hasher* other) const /* final */;
|
||||
virtual digest_vector Hash(const void* x, size_t n) const final;
|
||||
virtual DefaultHasher* Clone() const final;
|
||||
virtual bool Equals(const Hasher* other) const final;
|
||||
|
||||
DECLARE_SERIAL(DefaultHasher);
|
||||
|
||||
|
@ -219,9 +219,9 @@ public:
|
|||
DoubleHasher(size_t k, size_t seed);
|
||||
|
||||
// Overridden from Hasher.
|
||||
virtual digest_vector Hash(const void* x, size_t n) const /* final */;
|
||||
virtual DoubleHasher* Clone() const /* final */;
|
||||
virtual bool Equals(const Hasher* other) const /* final */;
|
||||
virtual digest_vector Hash(const void* x, size_t n) const final;
|
||||
virtual DoubleHasher* Clone() const final;
|
||||
virtual bool Equals(const Hasher* other) const final;
|
||||
|
||||
DECLARE_SERIAL(DoubleHasher);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue