Remove empty private interface sections from generated script docs.

This commit is contained in:
Jon Siwek 2011-04-08 10:16:44 -05:00
parent 7d261dcb55
commit 3ad5f0559d

View file

@ -127,6 +127,17 @@ void BroDoc::WriteDocFile() const
WriteBroDocObjList(notices, "Notices", '~'); WriteBroDocObjList(notices, "Notices", '~');
WriteInterface("Public Interface", '-', '~', true, false); WriteInterface("Public Interface", '-', '~', true, false);
BroDocObjList::const_iterator it;
bool hasPrivateIdentifiers = false;
for ( it = all.begin(); it != all.end(); ++it )
if ( ! IsPublicAPI(*it) )
{
hasPrivateIdentifiers = true;
break;
}
if ( hasPrivateIdentifiers )
WriteInterface("Private Interface", '-', '~', false, false); WriteInterface("Private Interface", '-', '~', false, false);
if ( ! port_analysis.empty() ) if ( ! port_analysis.empty() )
@ -220,7 +231,7 @@ void BroDoc::WriteBroDocObjList(const BroDocObjList& l,
{ {
if ( l.empty() ) return; if ( l.empty() ) return;
std::list<const BroDocObj*>::const_iterator it; BroDocObjList::const_iterator it;
bool (*f_ptr)(const BroDocObj* o) = 0; bool (*f_ptr)(const BroDocObj* o) = 0;
if ( wantPublic ) if ( wantPublic )