zeek/src/file_analysis/Analyzer.cc
Tim Wojtulewicz 0618be792f Remove all of the random single-file deprecations
These are the changes that don't require a ton of changes to other files outside
of the original removal.
2021-01-27 10:52:40 -07:00

39 lines
910 B
C++

// See the file "COPYING" in the main distribution directory for copyright.
#include "zeek/file_analysis/Analyzer.h"
#include "zeek/file_analysis/Manager.h"
#include "zeek/Val.h"
namespace zeek::file_analysis {
ID Analyzer::id_counter = 0;
Analyzer::~Analyzer()
{
DBG_LOG(DBG_FILE_ANALYSIS, "Destroy file analyzer %s",
file_mgr->GetComponentName(tag).c_str());
}
void Analyzer::SetAnalyzerTag(const file_analysis::Tag& arg_tag)
{
assert(! tag || tag == arg_tag);
tag = arg_tag;
}
Analyzer::Analyzer(file_analysis::Tag arg_tag,
RecordValPtr arg_args,
File* arg_file)
: tag(arg_tag),
args(std::move(arg_args)),
file(arg_file),
got_stream_delivery(false),
skip(false)
{
id = ++id_counter;
}
Analyzer::Analyzer(RecordValPtr arg_args, File* arg_file)
: Analyzer({}, std::move(arg_args), arg_file)
{}
} // namespace zeek::file_analysis