HelpGen is a prototype of the tool for automatic generation of the .tex files
for wxWindows documentation from C++ headers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
100
utils/HelpGen/include/ifcontext.h
Normal file
100
utils/HelpGen/include/ifcontext.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 27/12/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleskandars Gluchovas
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __IFCONTEXT_G__
|
||||
#define __IFCONTEXT_G__
|
||||
|
||||
#include "srcparser.h"
|
||||
#include "cjparser.h"
|
||||
|
||||
class spBookmark
|
||||
{
|
||||
public:
|
||||
size_t mFrom;
|
||||
size_t mLen;
|
||||
size_t mFileNo;
|
||||
|
||||
inline spBookmark() {}
|
||||
|
||||
inline spBookmark( int from, int len, int fileNo )
|
||||
: mFrom( from ), mLen( len ), mFileNo( fileNo )
|
||||
{}
|
||||
};
|
||||
|
||||
#if defined( wxUSE_TEMPLATE_STL )
|
||||
|
||||
typedef vector<spBookmark) BookmarkListT
|
||||
|
||||
#else
|
||||
|
||||
typedef WXSTL_VECTOR_SHALLOW_COPY(spBookmark) BookmarkListT;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class spInterFileContext : public spContext
|
||||
{
|
||||
protected:
|
||||
|
||||
BookmarkListT mDeletionMarks;
|
||||
|
||||
BookmarkListT mFiltered;
|
||||
|
||||
size_t mCurFileNo;
|
||||
|
||||
CJSourceParser mParser;
|
||||
|
||||
protected:
|
||||
|
||||
size_t GetFileNoOfContext( spContext& ctx );
|
||||
size_t GetFileNo( const string& fname );
|
||||
|
||||
void InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark );
|
||||
|
||||
void DoAppendSourceFragment( string& source,
|
||||
string& result,
|
||||
size_t pos, size_t len );
|
||||
|
||||
void GenerateContextBody( spContext& ctx,
|
||||
string& source,
|
||||
string& result,
|
||||
size_t& lastSavedPos,
|
||||
size_t& lastKnownPos );
|
||||
|
||||
public:
|
||||
|
||||
StrListT mFiles;
|
||||
StrListT mContents;
|
||||
|
||||
public:
|
||||
|
||||
spInterFileContext();
|
||||
~spInterFileContext();
|
||||
|
||||
void AddFile( const string& fname, const string& content );
|
||||
|
||||
void RemoveContext( spContext& ctx );
|
||||
|
||||
void GenrateContents();
|
||||
|
||||
void ParseContents( SourceParserPlugin* pPlugin = NULL );
|
||||
|
||||
void WriteToFiles();
|
||||
|
||||
// overriden method of the base class (finds out the source fragment)
|
||||
|
||||
virtual string GetBody( spContext* pCtx = NULL );
|
||||
|
||||
virtual string GetHeader( spContext* pCtx = NULL );
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user