zeek/src/ZeekArgs.h
Robin Sommer 3d3d5e7eb4 Merge remote-tracking branch 'origin/topic/jsiwek/add-backtrace-bif'
(Added a Doxygen comment.)

* origin/topic/jsiwek/add-backtrace-bif:
  Add backtrace() and print_backtrace()
2020-07-06 14:56:28 +00:00

40 lines
1 KiB
C++

// See the file "COPYING" in the main distribution directory for copyright.
#pragma once
#include <vector>
#include "BroList.h"
namespace zeek {
class VectorVal;
class RecordType;
template <class T> class IntrusivePtr;
using ValPtr = IntrusivePtr<Val>;
using VectorValPtr = IntrusivePtr<VectorVal>;
using RecordTypePtr = IntrusivePtr<RecordType>;
using Args = std::vector<ValPtr>;
/**
* Converts a legacy-style argument list for use in modern Zeek function
* calling or event queueing APIs.
* @param vl the argument list to convert, the returned value takes ownership
* of a reference to each element in the list
* @return the converted argument list
*
*/
Args val_list_to_args(const val_list& vl);
/**
* Creates a vector of "call_argument" meta data describing the arguments to
* function/event invocation.
*
* @param vals call arguments
* @param types function parameters
* @return vector of script-level type "call_argument_vector"
*/
VectorValPtr MakeCallArgumentVector(const Args& vals, const RecordTypePtr& types);
} // namespace zeek