mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
accessors / friends needed for compiling-to-C++
This commit is contained in:
parent
66fb3e0f56
commit
1ede6a8424
3 changed files with 17 additions and 5 deletions
|
@ -747,11 +747,14 @@ public:
|
||||||
|
|
||||||
const EnumValPtr& GetEnumVal(bro_int_t i);
|
const EnumValPtr& GetEnumVal(bro_int_t i);
|
||||||
|
|
||||||
|
// Only for use by C++-generated code. Non-protected because we
|
||||||
|
// don't know in advance the names of the functions that will
|
||||||
|
// access it.
|
||||||
|
void AddNameInternal(const std::string& full_name, bro_int_t val);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void AddNameInternal(const std::string& module_name,
|
void AddNameInternal(const std::string& module_name,
|
||||||
const char* name, bro_int_t val, bool is_export);
|
const char* name, bro_int_t val, bool is_export);
|
||||||
|
|
||||||
void AddNameInternal(const std::string& full_name, bro_int_t val);
|
|
||||||
|
|
||||||
void CheckAndAddName(const std::string& module_name,
|
void CheckAndAddName(const std::string& module_name,
|
||||||
const char* name, bro_int_t val, bool is_export,
|
const char* name, bro_int_t val, bool is_export,
|
||||||
|
|
|
@ -450,10 +450,11 @@ public:
|
||||||
// Returns a masked port number
|
// Returns a masked port number
|
||||||
static uint32_t Mask(uint32_t port_num, TransportProto port_type);
|
static uint32_t Mask(uint32_t port_num, TransportProto port_type);
|
||||||
|
|
||||||
protected:
|
// Only meant for use by ValManager and compiled-to-C++ script
|
||||||
friend class ValManager;
|
// functions.
|
||||||
PortVal(uint32_t p);
|
PortVal(uint32_t p);
|
||||||
|
|
||||||
|
protected:
|
||||||
void ValDescribe(ODesc* d) const override;
|
void ValDescribe(ODesc* d) const override;
|
||||||
ValPtr DoClone(CloneState* state) override;
|
ValPtr DoClone(CloneState* state) override;
|
||||||
|
|
||||||
|
@ -1435,6 +1436,8 @@ protected:
|
||||||
friend class Val;
|
friend class Val;
|
||||||
friend class EnumType;
|
friend class EnumType;
|
||||||
|
|
||||||
|
friend EnumValPtr make_enum__CPP(TypePtr t, int i);
|
||||||
|
|
||||||
template<class T, class... Ts>
|
template<class T, class... Ts>
|
||||||
friend IntrusivePtr<T> make_intrusive(Ts&&... args);
|
friend IntrusivePtr<T> make_intrusive(Ts&&... args);
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,12 @@ const AnyIndexExpr* Expr::AsAnyIndexExpr() const
|
||||||
return (const AnyIndexExpr*) this;
|
return (const AnyIndexExpr*) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LambdaExpr* Expr::AsLambdaExpr()
|
||||||
|
{
|
||||||
|
CHECK_TAG(tag, EXPR_LAMBDA, "ExprVal::AsLambdaExpr", expr_name)
|
||||||
|
return (LambdaExpr*) this;
|
||||||
|
}
|
||||||
|
|
||||||
const LambdaExpr* Expr::AsLambdaExpr() const
|
const LambdaExpr* Expr::AsLambdaExpr() const
|
||||||
{
|
{
|
||||||
CHECK_TAG(tag, EXPR_LAMBDA, "ExprVal::AsLambdaExpr", expr_name)
|
CHECK_TAG(tag, EXPR_LAMBDA, "ExprVal::AsLambdaExpr", expr_name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue