|
/* ==========================================================================
File : AutoDocumenter.cpp
Class : CAutoDocumenterApp
Author : Johan Rosengren, Abstrakt Mekanik AB
Date : 2004-06-18
Purpose : "CAutoDocumenterApp" is the application class for
AutoDocumenter. This application automatically documents
classes generated by the UML-editor.
Description : The class is a standard "CWinApp"-derived application
class.
Usage : The application is not a general documenter. It demands
that all functions are documented in a special way (the
files of AutoDocumenter is documented in this way and
can be used as a reference), that there is only one
class defined in each cpp-file and that no functions
are defined in the header.
The application can be started with command line
switches. The switches "/i:{inputdirectory}" and
"/o:{outputdirectory}" sets up the input- and output
directories respectively, displays a special dialog
and 'silently' generates the documentation. If the
output directory is empty, the input directory + '_docs'
is used for output.
========================================================================*/
#include "stdafx.h"
#include "AutoDocumenter.h"
#include "AutoDocumenterDlg.h"
#include "AutoDocumenterCommandLineInfo.h"
#include "GeneratorDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAutoDocumenterApp
BEGIN_MESSAGE_MAP(CAutoDocumenterApp, CWinApp)
//{{AFX_MSG_MAP(CAutoDocumenterApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAutoDocumenterApp construction
CAutoDocumenterApp::CAutoDocumenterApp()
/* ============================================================
Function : CAutoDocumenterApp::CAutoDocumenterApp
Description : Constructor
Access : Public
Return : void
Parameters : none
Usage : Instantiated by MFC.
============================================================*/
{
}
/////////////////////////////////////////////////////////////////////////////
// CAutoDocumenterApp initialization
BOOL CAutoDocumenterApp::InitInstance()
/* ============================================================
Function : CAutoDocumenterApp::InitInstance
Description : Standard initialization
Access : Public
Return : BOOL - No used.
Parameters : none
Usage : Called from MFC. Will display the main
dialog or, if the appropriate command line
parameters are submitted, the 'silent'-
generation dialog.
============================================================*/
{
AfxEnableControlContainer();
CAutoDocumenterCommandLineInfo cmdInfo;
ParseCommandLine( cmdInfo );
if( cmdInfo.m_input.GetLength() )
{
CGeneratorDlg dlg;
dlg.m_input = cmdInfo.m_input;
dlg.m_output = cmdInfo.m_output;
m_pMainWnd = &dlg;
dlg.DoModal();
}
else
{
CAutoDocumenterDlg dlg;
m_pMainWnd = &dlg;
dlg.DoModal();
}
return FALSE;
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CAutoDocumenterApp object
CAutoDocumenterApp theApp;
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
45 years old, married, three kids.
Started with computers more than 20 years ago on a CBM-64.
Read Theoretical Philosophy at the University of Lund.
Working as a C++ consultant developer.
Science-fiction freak. Enjoy vintage punkrock.