Click here to Skip to main content
15,893,487 members
Articles / Desktop Programming / MFC

Include File Hierarchy Viewer

Rate me:
Please Sign up or sign in to vote.
4.84/5 (108 votes)
29 Jul 2003CPOL8 min read 384.5K   4.5K   151  
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: Source level token.
//
//====================================================================

#include "stdafx.h"
#include "Token.h"

//////////////////////////////////////////////////////////////////////
// CToken Implementation.
//////////////////////////////////////////////////////////////////////

CToken::CToken() :
   c_eType( TOKEN_NONE ),
   c_ulPos( 0 ),
   c_ulFlags( 0 )
{
   memset( c_szID, 0, sizeof( c_szID ) );
}
//
// ------------------------------------------------------------------
//
CToken::~CToken()
{
}
//
// ------------------------------------------------------------------
//
void CToken::Reset()
{
   c_szID[0] = _T('\0');
   c_eType = TOKEN_NONE;
}
//
// ------------------------------------------------------------------
//
void CToken::Set( const TCHAR * p_pszID, unsigned long p_ulPos, ParseTokens p_eType )
{
   int a_iLen = _tcslen( p_pszID );
   if( a_iLen+1 > MAX_TOKEN )
   {
      // We must truncate it.
      _tcsncpy( c_szID, p_pszID, MAX_TOKEN-1 );
      c_szID[MAX_TOKEN-1] = _T('\0');
   }
   else
      _tcscpy( c_szID, p_pszID );
   
   c_ulPos = p_ulPos;
   c_eType = p_eType;
}
//
// ------------------------------------------------------------------
//
void CToken::Set( const TCHAR p_cC, unsigned long p_ulPos, ParseTokens p_eType )
{
   c_szID[0] = p_cC;
   c_szID[1] = _T('\0');
   c_eType   = p_eType;
   c_ulPos   = p_ulPos;
}
//
// ------------------------------------------------------------------
//

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)


Written By
Software Developer (Senior)
United States United States
I like to program, I like to sail.

Comments and Discussions