Commit graph

476 commits

Author SHA1 Message Date
Tim Wojtulewicz
5b8aaf6497 Revert Attributes::Attrs back to return an attr_list and mark it deprecated 2020-06-30 10:39:03 -07:00
Tim Wojtulewicz
e1338cc379 GH-1034: Revert TypeList::Types() back to return a type_list* and mark it deprecated 2020-06-29 17:50:09 -07:00
Tim Wojtulewicz
137e416a03 Rename BroType to Type 2020-06-10 14:27:36 -07:00
Tim Wojtulewicz
ed13972924 Move Type types to zeek namespace 2020-06-09 17:20:45 -07:00
Tim Wojtulewicz
cbdb8ee074 Expr: move all classes into zeek::detail 2020-06-03 15:16:18 -07:00
Jon Siwek
5b4313b593 Deprecate Val(double, TypeTag) ctor, add TimeVal/DoubleVal subclasses
This also updates all usages of the deprecated Val ctor to use
either IntervalVal, TimeVal, or DoubleVal ctors.  The reason for
doing away with the old constructor is that using it with TYPE_INTERVAL
isn't strictly correct since there exists a more specific subclass,
IntervalVal, with overriden ValDescribe() method that ought to be used
to print such values in a more descriptive way.
2020-06-02 23:33:40 -07:00
Jon Siwek
9c133b9b10 Integrate review feedback
* Add deprecation for MIME_Entity::ContentType(), use GetContentType()

* Add deprecation for MIME_Entity::ContentSubType(), use GetContentSubType()

* Add deprecation for MIME_Message::BuildHeaderVal(), use ToHeaderVal()

* Add deprecation for MIME_Message::BuildHeaderTable(), use ToHeaderTable()

* Add deprecation for mime::new_string_val(), use mime::to_stringval()

* Add deprecation for ARP_Analyzer::ConstructAddrVal(), use ToAddrVal()

* Add deprecation for ARP_Analyzer::EthAddrToStr(), use ToEthAddrStr()

* Change the Func::Call() replacement to be named Func::Invoke()
2020-05-29 19:14:35 -07:00
Jon Siwek
1f45e690a0 Change BroFunc ctor to take const-ref IntrusivePtr<ID> 2020-05-27 17:40:02 -07:00
Jon Siwek
0d19e8fb4c Add version of Frame::SetElement() taking IntrusivePtr<ID>
Expect the version using raw ID* could go away eventually, but this is
convenience for the meantime.
2020-05-27 17:31:02 -07:00
Jon Siwek
2cee468eac Change Scope/Func inits from id_list* to vector<IntrusivePtr<ID>> 2020-05-27 17:27:40 -07:00
Jon Siwek
8b6de5852c Switch parsing to use vector<IntrusivePtr<Attr>> from attr_list
This allows improved passing/storing of Attr references to Exprs,
TypeDecl, Scope, etc.
2020-05-26 18:19:29 -07:00
Jon Siwek
e365105872 Deprecate TypeDecl::FindAttr(), replace with GetAttr() 2020-05-26 15:41:25 -07:00
Jon Siwek
bee321711f Deprecate Attributes::FindAttr(), replace with Find() 2020-05-26 15:25:08 -07:00
Jon Siwek
ccd1cbbc54 Add Attributes ctor that takes IntrusivePtrs 2020-05-26 15:05:38 -07:00
Jon Siwek
102e58b80b Change Attributes to store std:vector<IntrusivePtr<Attr>>
This also changes the return type of Attributes::Attrs() from attr_list*
2020-05-26 13:05:24 -07:00
Jon Siwek
97636e97a5 Deprecate Attr::AttrExpr(), replace with GetExpr() 2020-05-26 12:13:56 -07:00
Jon Siwek
9f4eca081f Deprecate Frame::GetElement(ID*), replace with GetElementByID() 2020-05-23 09:08:45 -07:00
Jon Siwek
e9e2e388f8 Switch Frame::SetElement() to use IntrusivePtr 2020-05-23 08:52:15 -07:00
Jon Siwek
272db640aa Deprecate Plugin::HookCallFunction(), replace with HookFunctionCall()
This also changes the argument type of Func::operator() to zeek::Args*
to allow plugins to be able to alter function arguments in place as
was previously documented.
2020-05-22 21:01:38 -07:00
Jon Siwek
863f02744e Add is_assignable() overload taking TypeTag 2020-05-21 23:00:02 -07:00
Jon Siwek
6a1c312451 Add same_type() overloads for IntrusivePtr args 2020-05-21 21:33:02 -07:00
Jon Siwek
4b17929b6b Deprecate IndexType::Indices(), replace with GetIndices() 2020-05-21 19:46:57 -07:00
Jon Siwek
4e77df3c28 Add is_vector() methods taking const-ref IntrusivePtr 2020-05-21 17:49:47 -07:00
Jon Siwek
a384bb8b81 Deprecate VectorVal::Lookup(), replace with At() 2020-05-21 17:03:46 -07:00
Jon Siwek
40db09ccbf Deprecate VectorVal::Insert() taking raw Val*, use IntrusivePtr 2020-05-21 15:44:06 -07:00
Jon Siwek
de1e3d7d6d Deprecate VectorVal::Assign methods taking raw Val*
And adapt usages to pass in to alternate method taking IntrusivePtr
2020-05-21 15:31:04 -07:00
Jon Siwek
ad224419ad Deprecate TableVal::Attrs(), replace with GetAttrs() 2020-05-20 20:35:08 -07:00
Jon Siwek
dc03f0bb83 Deprecate TableVal::Delete(), replace with Remove() 2020-05-20 20:29:49 -07:00
Jon Siwek
087a0f3636 Switch Func::Call(val_list*) back to returning Val*
And renamed the method returning IntrusivePtr to operator().
This corrects the deprecation process for Func::Call(val_list*).
2020-05-20 18:41:59 -07:00
Jon Siwek
85a0ddd62d Deprecate TableVal::Lookup(), replace with Find()/FindOrDefault() 2020-05-20 18:00:50 -07:00
Jon Siwek
b85cfc6fe4 Deprecate TableVal IsSubsetOf and EqualTo taking Val*, use Val& 2020-05-20 16:00:43 -07:00
Jon Siwek
e5f66cd2e6 Deprecate TableVal::Intersect(), replace with Intersection() 2020-05-20 15:13:55 -07:00
Jon Siwek
7e89c8f0df Deprecate TableVal::Assign methods with Val*, add IntrusivePtr overloads 2020-05-20 12:46:51 -07:00
Jon Siwek
f729247778 Deprecate RecordVal::Lookup(int), replace with GetField(int) 2020-05-19 18:19:58 -07:00
Jon Siwek
cda4738407 Switch RecordVal::CoerceTo() to use IntrusivePtr 2020-05-18 17:52:54 -07:00
Jon Siwek
938ad35a43 Deprecate EventHandler::FType(), replace with GetType() 2020-05-15 18:37:48 -07:00
Jon Siwek
a031f5b727 Deprecate Val(Func*) ctor, replace with one using IntrusivePtr 2020-05-15 16:24:53 -07:00
Jon Siwek
440b0623ac Deprecate RecordVal(RecordType*) ctor
Replaced with one that takes IntrusivePtr
2020-05-14 19:31:43 -07:00
Jon Siwek
8f95a2a0bb Deprecate Scope::Lookup(), replace with Scope::Find() 2020-05-14 17:24:21 -07:00
Jon Siwek
40ee59f0c3 Remove unused FlattenExpr 2020-05-14 17:23:20 -07:00
Jon Siwek
6147804b36 Add missing "vector_coerce" to expr_name() 2020-05-14 17:23:20 -07:00
Jon Siwek
e3f7b38890 Deprecate Expr::Type(), replace with GetType() 2020-05-14 17:23:20 -07:00
Jon Siwek
1eb723fc9d Deprecate Val::Type(), replace with GetType() 2020-05-14 17:23:20 -07:00
Jon Siwek
d4dba40727 Deprecate VectorVal(VectorType*) ctora
Adds a new one taking an IntrusivePtr.
2020-05-14 17:23:20 -07:00
Jon Siwek
32b895f4ba Deprecate ID::ID_Val(), replace with ID::GetVal() 2020-05-14 17:18:00 -07:00
Jon Siwek
4af1a26b1f Add Val TypeType constructor taking an IntrusivePtr 2020-05-14 17:18:00 -07:00
Jon Siwek
3f07c57523 Deprecate ID::Type(), replace with GetType() 2020-05-14 17:18:00 -07:00
Jon Siwek
6e647416d5 Deprecate ID::AsType(), add ID::IsType() and ID::GetType() 2020-05-14 17:18:00 -07:00
Jon Siwek
f26904e031 Deprecate BroType::YieldType(), replace with Yield() 2020-05-14 17:18:00 -07:00
Jon Siwek
103fed9f01 Deprecate RecordType::FieldType(), replace with GetFieldType() 2020-05-14 17:18:00 -07:00