1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Contrib. demo
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleskandars Gluchovas
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __IFCONTEXT_G__
13 #define __IFCONTEXT_G__
15 #include "srcparser.h"
25 inline spBookmark() {}
27 inline spBookmark( int from
, int len
, int fileNo
)
28 : mFrom( from
), mLen( len
), mFileNo( fileNo
)
32 #if defined( wxUSE_TEMPLATE_STL )
34 typedef vector
<spBookmark
) BookmarkListT
38 typedef WXSTL_VECTOR_SHALLOW_COPY(spBookmark
) BookmarkListT
;
43 class spInterFileContext
: public spContext
47 BookmarkListT mDeletionMarks
;
49 BookmarkListT mFiltered
;
53 CJSourceParser mParser
;
57 size_t GetFileNoOfContext( spContext
& ctx
);
58 size_t GetFileNo( const wxString
& fname
);
60 void InsertBookmarkSorted( BookmarkListT
& lst
, spBookmark
& mark
);
62 void DoAppendSourceFragment( wxString
& source
,
67 void GenerateContextBody( spContext
& ctx
,
71 size_t& lastKnownPos
);
81 ~spInterFileContext();
83 void AddFile( const wxString
& fname
, const wxString
& content
);
85 void RemoveContext( spContext
& ctx
);
87 void GenrateContents();
89 void ParseContents( SourceParserPlugin
* pPlugin
= NULL
);
93 // overriden method of the base class (finds out the source fragment)
95 virtual wxString
GetBody( spContext
* pCtx
= NULL
);
97 virtual wxString
GetHeader( spContext
* pCtx
= NULL
);