mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
header tweaks to provide gen-C++ script optimization with more flexibility
This commit is contained in:
parent
5a3b519fb4
commit
77c34787f3
4 changed files with 17 additions and 10 deletions
|
@ -18,7 +18,16 @@ namespace detail {
|
|||
|
||||
class CPPRuntime {
|
||||
public:
|
||||
static auto RawOptField(const RecordValPtr& rv, int field) { return rv->RawOptField(field); }
|
||||
static auto& RawField(const RecordValPtr& rv, int field) { return rv->RawField(field); }
|
||||
static auto& RawField(RecordVal* rv, int field) { return rv->RawField(field); }
|
||||
static auto& RawOptField(const RecordValPtr& rv, int field) { return rv->RawOptField(field); }
|
||||
static auto& RawOptField(RecordVal* rv, int field) { return rv->RawOptField(field); }
|
||||
|
||||
static const auto& GetCreationInits(const RecordType* rt) { return rt->CreationInits(); }
|
||||
|
||||
static RecordVal* BuildRecordVal(RecordTypePtr t, std::vector<std::optional<ZVal>> init_vals) {
|
||||
return new RecordVal(std::move(t), std::move(init_vals));
|
||||
}
|
||||
};
|
||||
|
||||
// Returns the concatenation of the given strings.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue