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 string
& fname
);
60 void InsertBookmarkSorted( BookmarkListT
& lst
, spBookmark
& mark
);
62 void DoAppendSourceFragment( string
& source
,
64 size_t pos
, size_t len
);
66 void GenerateContextBody( spContext
& ctx
,
70 size_t& lastKnownPos
);
80 ~spInterFileContext();
82 void AddFile( const string
& fname
, const string
& content
);
84 void RemoveContext( spContext
& ctx
);
86 void GenrateContents();
88 void ParseContents( SourceParserPlugin
* pPlugin
= NULL
);
92 // overriden method of the base class (finds out the source fragment)
94 virtual wxString
GetBody( spContext
* pCtx
= NULL
);
96 virtual wxString
GetHeader( spContext
* pCtx
= NULL
);