Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Include File Hierarchy Viewer

, 29 Jul 2003 CPOL
A tool to view the include file hierarchy of your source code.
//====================================================================
// Although great care has gone into developing this software,
// it is provided without any guarantee of reliability, accuracy
// of information, or correctness of operation.  I am not responsible
// for any damages that may occur as a result of using this software.
// Use this software entirely at your own risk.
// Copyright 2003, Chris Richardson
//
// Description: Document class.
//
//====================================================================

#if !defined(AFX_INCFINDERDOC_H__D538F7B7_9AD4_4486_B648_979D2686996F__INCLUDED_)
#define AFX_INCFINDERDOC_H__D538F7B7_9AD4_4486_B648_979D2686996F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Parser.h"
#include "IncludeFinder.h"

class CIncFinderDoc : public CDocument
{
protected: // create from serialization only
	CIncFinderDoc();
	DECLARE_DYNCREATE(CIncFinderDoc)

// Attributes
public:
   inline CIncludeFinderInfo &      GetFindInfo();
   inline CIncludeFinder &          GetIncludeFinder();
   void                             ClearResults();
   inline void                      AddTopLevelFile( CParsedFile * p_poFile );
   inline CParsedFileArray &        GetTopLevelFiles();

// Operations
public:
   void                             StartStop();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CIncFinderDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	virtual void DeleteContents();
	virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CIncFinderDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
   CIncludeFinderInfo               c_oFindInfo;
   CIncludeFinder                   c_oIncludeFinder;
   CParsedFileArray                 c_oTopLevelFiles;

   bool                             c_bIgnoreSetPathName;

// Generated message map functions
protected:
	//{{AFX_MSG(CIncFinderDoc)
	afx_msg void OnEditConfigureShellex();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

inline CIncludeFinderInfo & CIncFinderDoc::GetFindInfo()
{
   return c_oFindInfo;
}
//
// ------------------------------------------------------------------
//
inline CIncludeFinder & CIncFinderDoc::GetIncludeFinder()
{
   return c_oIncludeFinder;
}
//
// ------------------------------------------------------------------
//
inline void CIncFinderDoc::AddTopLevelFile( CParsedFile * p_poFile )
{
   c_oTopLevelFiles.push_back( p_poFile );
}
//
// ------------------------------------------------------------------
//
inline CParsedFileArray & CIncFinderDoc::GetTopLevelFiles()
{
   return c_oTopLevelFiles;
}
//
// ------------------------------------------------------------------
//


//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_INCFINDERDOC_H__D538F7B7_9AD4_4486_B648_979D2686996F__INCLUDED_)

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Chris Richardson
Software Developer (Senior)
United States United States
I like to program, I like to sail.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150224.1 | Last Updated 30 Jul 2003
Article Copyright 2003 by Chris Richardson
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid