mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Val: forward-declare class PDict, reduce includes
This commit is contained in:
parent
dfac4572e7
commit
4aac78cf29
6 changed files with 14 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "zeek-config.h"
|
||||
|
||||
#include "CompHash.h"
|
||||
#include "Dict.h"
|
||||
#include "Val.h"
|
||||
#include "Reporter.h"
|
||||
#include "Func.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "Attr.h"
|
||||
#include "Dict.h"
|
||||
#include "Net.h"
|
||||
#include "File.h"
|
||||
#include "Func.h"
|
||||
|
@ -1357,6 +1358,11 @@ void TableVal::RemoveAll()
|
|||
val.table_val->SetDeleteFunc(table_entry_val_delete_func);
|
||||
}
|
||||
|
||||
int TableVal::Size() const
|
||||
{
|
||||
return AsTable()->Length();
|
||||
}
|
||||
|
||||
int TableVal::RecursiveSize() const
|
||||
{
|
||||
int n = AsTable()->Length();
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Type.h"
|
||||
#include "Dict.h"
|
||||
#include "CompHash.h"
|
||||
#include "BroString.h"
|
||||
#include "Timer.h"
|
||||
|
@ -31,6 +30,9 @@ using std::string;
|
|||
#define UDP_PORT_MASK 0x20000
|
||||
#define ICMP_PORT_MASK 0x30000
|
||||
|
||||
template<typename T> class PDict;
|
||||
class IterCookie;
|
||||
|
||||
class Val;
|
||||
class BroFunc;
|
||||
class Func;
|
||||
|
@ -786,7 +788,7 @@ public:
|
|||
Attributes* Attrs() { return attrs; }
|
||||
|
||||
// Returns the size of the table.
|
||||
int Size() const { return AsTable()->Length(); }
|
||||
int Size() const;
|
||||
int RecursiveSize() const;
|
||||
|
||||
// Returns the Prefix table used inside the table (if present).
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "IntrusivePtr.h"
|
||||
#include "Reporter.h"
|
||||
#include "NetVar.h"
|
||||
#include "Dict.h"
|
||||
|
||||
namespace probabilistic {
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <sstream>
|
||||
|
||||
#include "iosource/Manager.h"
|
||||
#include "Dict.h"
|
||||
#include "Reporter.h"
|
||||
#include "Scope.h"
|
||||
#include "DebugLogger.h"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#endif
|
||||
|
||||
#include "Desc.h"
|
||||
#include "Dict.h"
|
||||
#include "digest.h"
|
||||
#include "input.h"
|
||||
#include "Obj.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue