mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
32 lines
696 B
C++
32 lines
696 B
C++
#include <cstdio>
|
|
#include <string>
|
|
#include <list>
|
|
#include "ID.h"
|
|
#include "BroDocObj.h"
|
|
|
|
BroDocObj::BroDocObj(const ID* id, std::list<std::string>*& reST)
|
|
{
|
|
broID = id;
|
|
reST_doc_strings = reST;
|
|
reST = 0;
|
|
}
|
|
|
|
BroDocObj::~BroDocObj()
|
|
{
|
|
delete reST_doc_strings;
|
|
}
|
|
|
|
void BroDocObj::WriteReST(FILE* file) const
|
|
{
|
|
if ( reST_doc_strings )
|
|
{
|
|
std::list<std::string>::const_iterator it;
|
|
for ( it = reST_doc_strings->begin();
|
|
it != reST_doc_strings->end(); ++it)
|
|
fprintf(file, "%s\n", it->c_str());
|
|
}
|
|
|
|
ODesc desc;
|
|
broID->DescribeExtended(&desc);
|
|
fprintf(file, "%s\n", desc.Description());
|
|
}
|