From 3689307fd13f8059cc5351efd742b1e1d7eea801 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Thu, 3 Jan 2002 13:34:12 +0000
Subject: [PATCH] Added FlushAll to CloseClass, otherwise text was only flushed
 right at the end, and appeared in one file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 utils/HelpGen/src/HelpGen.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/utils/HelpGen/src/HelpGen.cpp b/utils/HelpGen/src/HelpGen.cpp
index 28e9d4460c..a038adc5ee 100644
--- a/utils/HelpGen/src/HelpGen.cpp
+++ b/utils/HelpGen/src/HelpGen.cpp
@@ -909,6 +909,7 @@ void HelpGenVisitor::CloseClass()
         m_inClass = FALSE;
         m_classname.clear();
     }
+	m_file.FlushAll();
 }
 
 void HelpGenVisitor::EndVisit()
@@ -920,6 +921,11 @@ void HelpGenVisitor::EndVisit()
     m_fileHeader.Empty();
 
     m_file.FlushAll();
+	if (m_file.IsOpened())
+	{
+		m_file.Flush();
+		m_file.Close();
+	}
 
     wxLogVerbose("%s: finished generating for the current file.",
                  GetCurrentTime("%H:%M:%S"));
@@ -936,6 +942,12 @@ void HelpGenVisitor::VisitClass( spClass& cl )
 {
     CloseClass();
 
+	if (m_file.IsOpened())
+	{
+		m_file.Flush();
+		m_file.Close();
+	}
+
     wxString name = cl.GetName();
 
     if ( m_ignoreNames.IgnoreClass(name) ) {
@@ -1104,6 +1116,8 @@ void HelpGenVisitor::VisitClass( spClass& cl )
     InsertDataStructuresHeader();
     InsertTypedefDocs();
     InsertEnumDocs();
+
+	m_file.Flush();
 }
 
 void HelpGenVisitor::VisitEnumeration( spEnumeration& en )
@@ -2149,6 +2163,10 @@ static const wxString GetVersionString()
 
 /*
    $Log$
+   Revision 1.19  2002/01/03 13:34:12  JS
+   Added FlushAll to CloseClass, otherwise text was only flushed right at the end,
+   and appeared in one file.
+
    Revision 1.18  2002/01/03 12:02:47  JS
    Added main() and corrected VC++ project settings
 
-- 
2.45.2