git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34457
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// return true if we ignore this class entirely
bool IgnoreClass(const wxString& classname) const
{
// return true if we ignore this class entirely
bool IgnoreClass(const wxString& classname) const
{
- IgnoreListEntry ignore(classname, _T(""));
+ IgnoreListEntry ignore(classname, wxEmptyString);
return m_ignore.Index(&ignore) != wxNOT_FOUND;
}
return m_ignore.Index(&ignore) != wxNOT_FOUND;
}
#ifdef __WXDEBUG__
if ( 0 && ctxTop )
#ifdef __WXDEBUG__
if ( 0 && ctxTop )
+ ctxTop->Dump(wxEmptyString);
m_funcName =
m_textFunc =
m_textStoredTypedefs =
m_funcName =
m_textFunc =
m_textStoredTypedefs =
- m_textStoredFunctionComment = "";
+ m_textStoredFunctionComment = wxEmptyString;
}
m_textFunc << "\\param{" << param.m_Type << " }{" << param.GetName();
}
m_textFunc << "\\param{" << param.m_Type << " }{" << param.GetName();
- wxString defvalue = param.mInitVal;
+ wxString defvalue = param.m_InitVal;
if ( !defvalue.empty() ) {
m_textFunc << " = " << defvalue;
}
if ( !defvalue.empty() ) {
m_textFunc << " = " << defvalue;
}
- if ( param.GetDefValue() != ctxParam->mInitVal.c_str() ) {
+ if ( param.GetDefValue() != ctxParam->m_InitVal.c_str() ) {
wxLogWarning("Default value of parameter '%s' of "
"'%s::%s' should be '%s' and not "
"'%s'.",
ctxParam->m_Name.c_str(),
nameClass.c_str(),
nameMethod.c_str(),
wxLogWarning("Default value of parameter '%s' of "
"'%s::%s' should be '%s' and not "
"'%s'.",
ctxParam->m_Name.c_str(),
nameClass.c_str(),
nameMethod.c_str(),
- ctxParam->mInitVal.c_str(),
+ ctxParam->m_InitVal.c_str(),
param.GetDefValue().c_str());
}
}
param.GetDefValue().c_str());
}
}
- m_ignore.Add(new IgnoreListEntry(line, ""));
+ m_ignore.Add(new IgnoreListEntry(line, wxEmptyString));
+ Revision 1.42 2005/05/31 15:32:49 ABX
+ More warning and error fixes (work in progress with Tinderbox).
+
Revision 1.41 2005/05/30 13:06:15 ABX
More warning and error fixes (work in progress with Tinderbox).
Revision 1.41 2005/05/30 13:06:15 ABX
More warning and error fixes (work in progress with Tinderbox).
- pPar->mInitVal = string( blocks[nameBlock], blockSizes[nameBlock] );
+ pPar->m_InitVal = wxString( blocks[nameBlock], blockSizes[nameBlock] );
nameBlock = nameBlock - 2; // skip '=' token and default value block
typeBlock = nameBlock - 1;
nameBlock = nameBlock - 2; // skip '=' token and default value block
typeBlock = nameBlock - 1;
// if comma, than variable list continues
// otherwise the variable type reached - stop
// if comma, than variable list continues
// otherwise the variable type reached - stop
{
// yes, we've mistaken, it was not a identifier,
// but it's default value
{
// yes, we've mistaken, it was not a identifier,
// but it's default value
- pAttr->mInitVal =
- pAttr->m_Name;
+ pAttr->m_InitVal = pAttr->m_Name;
// skip default value and '=' symbol
skip_next_token_back( cur );
// skip default value and '=' symbol
skip_next_token_back( cur );
// Created: 27/12/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Created: 27/12/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
size_t spInterFileContext::GetFileNo( const string& fname )
{
size_t spInterFileContext::GetFileNo( const string& fname )
{
- size_t i;
- for ( i = 0; i != mFiles.size(); ++i )
- if ( fname == mFiles[i] )
+ for ( size_t i = 0; i != mFiles.size(); ++i )
+ {
+ if ( fname == mFiles[i] )
wxFAIL_MSG("File not found in array in function spInterFileContext::GetFileNo()");
wxFAIL_MSG("File not found in array in function spInterFileContext::GetFileNo()");
}
size_t spInterFileContext::GetFileNoOfContext( spContext& ctx )
{
}
size_t spInterFileContext::GetFileNoOfContext( spContext& ctx )
{
- spContext* pCtx = ctx.GetEnclosingContext( SP_CTX_FILE );
+ spContext* pCtx = ctx.GetEnclosingContext( SP_CTX_FILE );
- // DBG:: outer-file context should be present
- wxASSERT( pCtx && pCtx->GetType() == SP_CTX_FILE );
+ // DBG:: outer-file context should be present
+ wxASSERT( pCtx && pCtx->GetType() == SP_CTX_FILE );
- return GetFileNo( ((spFile*)pCtx)->mFileName );
+ return GetFileNo( ((spFile*)pCtx)->mFileName );
}
/*** public interface ***/
}
/*** public interface ***/
void spInterFileContext::AddFile( const string& fname, const string& content )
{
void spInterFileContext::AddFile( const string& fname, const string& content )
{
- mFiles.push_back( fname );
- mContents.push_back( content );
+ mFiles.push_back( fname );
+ mContents.push_back( content );
}
void spInterFileContext::RemoveContext( spContext& ctx )
{
}
void spInterFileContext::RemoveContext( spContext& ctx )
{
- wxASSERT( ctx.PositionIsKnown() ); // DBG:: should be checked by-user code
+ wxASSERT( ctx.PositionIsKnown() ); // DBG:: should be checked by-user code
- size_t fNo = GetFileNoOfContext( ctx );
+ size_t fNo = GetFileNoOfContext( ctx );
- mDeletionMarks.push_back( spBookmark( ctx.mSrcOffset, ctx.mContextLength, fNo ) );
+ mDeletionMarks.push_back( spBookmark( ctx.mSrcOffset, ctx.mContextLength, fNo ) );
}
void spInterFileContext::InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark )
{
}
void spInterFileContext::InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark )
{
- for( size_t i = 0; i != lst.size(); ++i )
-
- if ( lst[i].mFrom > mark.mFrom )
- {
- lst.insert( &lst[i], mark );
- return;
- }
+ for( size_t i = 0; i != lst.size(); ++i )
- lst.push_back( mark );
-}
+ if ( lst[i].mFrom > mark.mFrom )
+ {
+ lst.insert( &lst[i], mark );
+ return;
+ }
+
+ lst.push_back( mark );
+}
void spInterFileContext::DoAppendSourceFragment( string& source,
void spInterFileContext::DoAppendSourceFragment( string& source,
- string& result,
- size_t pos, size_t len )
+ string& result,
+ size_t pos, size_t len )
- mFiltered.erase( mFiltered.begin(), mFiltered.end() );
+ mFiltered.erase( mFiltered.begin(), mFiltered.end() );
+ size_t i;
+
+ for( i = 0; i != mDeletionMarks.size(); ++i )
+ {
+ spBookmark& mark = mDeletionMarks[i];
- for( i = 0; i != mDeletionMarks.size(); ++i )
- {
- spBookmark& mark = mDeletionMarks[i];
+ if ( mark.mFileNo == mCurFileNo &&
+ mark.mFrom >= pos && mark.mFrom < pos + len )
- if ( mark.mFileNo == mCurFileNo &&
- mark.mFrom >= pos && mark.mFrom < pos + len )
-
- InsertBookmarkSorted( mFiltered, mark );
- }
+ InsertBookmarkSorted( mFiltered, mark );
+ }
- size_t cur = pos;
-
- for( i = 0; i != mFiltered.size(); ++ i )
- {
- spBookmark& mark = mFiltered[i];
- result.append( source, cur, ( (size_t)mark.mFrom - cur ) );
+ for( i = 0; i != mFiltered.size(); ++ i )
+ {
+ spBookmark& mark = mFiltered[i];
- cur = size_t( mark.mFrom + mark.mLen );
+ result.append( source, cur, ( (size_t)mark.mFrom - cur ) );
- if ( cur >= pos + len ) // check if we've overstepped the current source-fragment
- {
-// wxASSERT(0); // DBG:: with current imp. this should not happen
- wxFAIL_MSG("Overstepped the current source fragment in function\nspInterFileContext::DoAppendSourceFragment()");
- cur = pos + len; break;
- }
- }
+ cur = size_t( mark.mFrom + mark.mLen );
- result.append( source, cur, ( pos + len ) - cur );
+ if ( cur >= pos + len ) // check if we've overstepped the current source-fragment
+ {
+// wxASSERT(0); // DBG:: with current imp. this should not happen
+ wxFAIL_MSG("Overstepped the current source fragment in function\nspInterFileContext::DoAppendSourceFragment()");
+ cur = pos + len; break;
+ }
+ }
+
+ result.append( source, cur, ( pos + len ) - cur );
}
void spInterFileContext::GenerateContextBody( spContext& ctx,
}
void spInterFileContext::GenerateContextBody( spContext& ctx,
- string& source,
- string& result,
- size_t& lastSavedPos,
- size_t& lastKnownPos )
+ string& source,
+ string& result,
+ size_t& lastSavedPos,
+ size_t& lastKnownPos )
- if ( ctx.PositionIsKnown() )
-
- lastKnownPos = ctx.mSrcOffset;
+ if ( ctx.PositionIsKnown() )
+ lastKnownPos = ctx.mSrcOffset;
- if ( ctx.IsVirtualContext() )
- {
- // add fragment accumulated before this context
+ if ( ctx.IsVirtualContext() )
+ {
+ // add fragment accumulated before this context
- DoAppendSourceFragment( source, result,
- size_t(lastSavedPos),
- size_t(lastKnownPos - lastSavedPos) );
+ DoAppendSourceFragment( source, result,
+ size_t(lastSavedPos),
+ size_t(lastKnownPos - lastSavedPos) );
- result += ctx.GetVirtualContextBody();
+ result += ctx.GetVirtualContextBody();
- lastSavedPos = lastKnownPos;
+ lastSavedPos = lastKnownPos;
- if ( ctx.PositionIsKnown() )
- {
- if ( ctx.VitualContextHasChildren() )
- {
- lastKnownPos = ctx.mSrcOffset + ctx.mHeaderLength;
+ if ( ctx.PositionIsKnown() )
+ {
+ if ( ctx.VitualContextHasChildren() )
+ {
+ lastKnownPos = ctx.mSrcOffset + ctx.mHeaderLength;
- lastSavedPos = lastKnownPos;
- }
- else
- {
- lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
+ lastSavedPos = lastKnownPos;
+ }
+ else
+ {
+ lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
- lastSavedPos = lastKnownPos;
+ lastSavedPos = lastKnownPos;
- return; // have not children
- }
- }
- }
+ return; // have not children
+ }
+ }
+ }
- MMemberListT& lst = ctx.GetMembers();
+ MMemberListT& lst = ctx.GetMembers();
- for( size_t i = 0; i != lst.size(); ++i )
-
- GenerateContextBody( *lst[i], source, result, lastSavedPos, lastKnownPos );
-
- if ( ctx.IsVirtualContext() )
- {
- if ( ctx.VitualContextHasChildren() &&
+ for( size_t i = 0; i != lst.size(); ++i )
+ {
+ GenerateContextBody( *lst[i], source, result, lastSavedPos, lastKnownPos );
+ }
- ctx.GetFooterOfVirtualContextBody() != "" )
- {
- // append the reminder space after children of the context
+ if ( ctx.IsVirtualContext() )
+ {
+ if ( ctx.VitualContextHasChildren() && !ctx.GetFooterOfVirtualContextBody().empty() )
+ {
+ // append the reminder space after children of the context
- DoAppendSourceFragment( result, source,
- size_t(lastSavedPos),
- size_t(lastKnownPos - lastSavedPos) );
+ DoAppendSourceFragment( result, source,
+ size_t(lastSavedPos),
+ size_t(lastKnownPos - lastSavedPos) );
- // add footer
- result += ctx.GetFooterOfVirtualContextBody();
+ // add footer
+ result += ctx.GetFooterOfVirtualContextBody();
- lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
+ lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
- lastSavedPos = lastKnownPos;
- }
- }
+ lastSavedPos = lastKnownPos;
+ }
+ }
- if ( ctx.PositionIsKnown() )
+ if ( ctx.PositionIsKnown() )
- lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
+ lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
}
void spInterFileContext::GenrateContents()
{
}
void spInterFileContext::GenrateContents()
{
- MMemberListT& lst = GetMembers();
+ MMemberListT& lst = GetMembers();
- for( size_t f = 0; f != lst.size(); ++f )
- {
- string& fname = ((spFile*)lst[f])->mFileName;
+ for( size_t f = 0; f != lst.size(); ++f )
+ {
+ string& fname = ((spFile*)lst[f])->mFileName;
- size_t fileNo = GetFileNo( fname );
+ size_t fileNo = GetFileNo( fname );
- string& source = mContents[ fileNo ];
+ string& source = mContents[ fileNo ];
- size_t lastKnownPos = 0, // the begining of the file is always "known"
- lastSavedPos = 0;
+ size_t lastKnownPos = 0, // the begining of the file is always "known"
+ lastSavedPos = 0;
- GenerateContextBody( *lst[f], source, result, lastSavedPos, lastKnownPos );
+ GenerateContextBody( *lst[f], source, result, lastSavedPos, lastKnownPos );
- // the end of file is always known
+ // the end of file is always known
- lastKnownPos = mContents[ fileNo ].length();
+ lastKnownPos = mContents[ fileNo ].length();
- DoAppendSourceFragment( source, result,
- size_t(lastSavedPos),
- size_t(lastKnownPos - lastSavedPos) );
+ DoAppendSourceFragment( source, result,
+ size_t(lastSavedPos),
+ size_t(lastKnownPos - lastSavedPos) );
- // replace original contnet with newly generated one
+ // replace original contnet with newly generated one
- mContents[ fileNo ] = result;
- }
+ mContents[ fileNo ] = result;
+ }
}
void spInterFileContext::ParseContents( SourceParserPlugin* pPlugin )
{
}
void spInterFileContext::ParseContents( SourceParserPlugin* pPlugin )
{
- mDeletionMarks.erase( mDeletionMarks.begin(), mDeletionMarks.end() );
+ mDeletionMarks.erase( mDeletionMarks.begin(), mDeletionMarks.end() );
- RemoveChildren(); // clean up top-level context
+ RemoveChildren(); // clean up top-level context
- mParser.SetPlugin( pPlugin );
+ mParser.SetPlugin( pPlugin );
- for( size_t i = 0; i != mFiles.size(); ++i )
- {
- char* s = (char*)(mContents[i].c_str());
+ for( size_t i = 0; i != mFiles.size(); ++i )
+ {
+ char* s = (char*)(mContents[i].c_str());
- spFile* pFCtx = mParser.Parse( s, s + mContents[i].length() );
+ spFile* pFCtx = mParser.Parse( s, s + mContents[i].length() );
- pFCtx->mFileName = mFiles[i];
+ pFCtx->mFileName = mFiles[i];
- AddMember( pFCtx );
- }
+ AddMember( pFCtx );
+ }
}
void spInterFileContext::WriteToFiles()
{
}
void spInterFileContext::WriteToFiles()
{
- for( size_t i = 0; i != mFiles.size(); ++i )
- {
- FILE* fp = fopen( mFiles[i].c_str(), "w+t" );
+ for( size_t i = 0; i != mFiles.size(); ++i )
+ {
+ FILE* fp = fopen( mFiles[i].c_str(), "w+t" );
- if ( fp != NULL )
- {
- fwrite( mContents[i].c_str(), sizeof(char), mContents[i].length(), fp );
+ if ( fp != NULL )
+ {
+ fwrite( mContents[i].c_str(), sizeof(char), mContents[i].length(), fp );
-string spInterFileContext::GetBody( spContext* pCtx )
+wxString spInterFileContext::GetBody( spContext* pCtx )
- wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
+ wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
- string& source = mContents[ GetFileNoOfContext( *pCtx ) ];
+ wxString& source = mContents[ GetFileNoOfContext( *pCtx ) ];
- return string( source.c_str() + pCtx->mSrcOffset, pCtx->mContextLength );
+ return wxString( source.c_str() + pCtx->mSrcOffset, pCtx->mContextLength );
-string spInterFileContext::GetHeader( spContext* pCtx )
+wxString spInterFileContext::GetHeader( spContext* pCtx )
- wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
+ wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
- wxASSERT( pCtx->mHeaderLength != -1 ); // DBG:: -/-
+ wxASSERT( pCtx->mHeaderLength != -1 ); // DBG:: -/-
- string& source = mContents[ GetFileNoOfContext( *pCtx ) ];
+ wxString& source = mContents[ GetFileNoOfContext( *pCtx ) ];
- return string( source.c_str() + pCtx->mSrcOffset, pCtx->mHeaderLength );
+ return wxString( source.c_str() + pCtx->mSrcOffset, pCtx->mHeaderLength );
// Created: 27/12/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
// Created: 27/12/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __IFCONTEXT_G__
/////////////////////////////////////////////////////////////////////////////
#ifndef __IFCONTEXT_G__
class spBookmark
{
public:
class spBookmark
{
public:
- size_t mFrom;
- size_t mLen;
- size_t mFileNo;
+ size_t mFrom;
+ size_t mLen;
+ size_t mFileNo;
- inline spBookmark( int from, int len, int fileNo )
- : mFrom( from ), mLen( len ), mFileNo( fileNo )
- {}
+ inline spBookmark( int from, int len, int fileNo )
+ : mFrom( from ), mLen( len ), mFileNo( fileNo )
+ {}
};
#if defined( wxUSE_TEMPLATE_STL )
};
#if defined( wxUSE_TEMPLATE_STL )
- typedef vector<spBookmark) BookmarkListT
+ typedef vector<spBookmark) BookmarkListT
- typedef WXSTL_VECTOR_SHALLOW_COPY(spBookmark) BookmarkListT;
+ typedef WXSTL_VECTOR_SHALLOW_COPY(spBookmark) BookmarkListT;
- BookmarkListT mDeletionMarks;
+ BookmarkListT mDeletionMarks;
- BookmarkListT mFiltered;
+ BookmarkListT mFiltered;
- CJSourceParser mParser;
+ CJSourceParser mParser;
- size_t GetFileNoOfContext( spContext& ctx );
- size_t GetFileNo( const string& fname );
+ size_t GetFileNoOfContext( spContext& ctx );
+ size_t GetFileNo( const string& fname );
- void InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark );
+ void InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark );
- void DoAppendSourceFragment( string& source,
- string& result,
- size_t pos, size_t len );
+ 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 );
+ void GenerateContextBody( spContext& ctx,
+ string& source,
+ string& result,
+ size_t& lastSavedPos,
+ size_t& lastKnownPos );
- StrListT mFiles;
- StrListT mContents;
+ StrListT mFiles;
+ StrListT mContents;
- spInterFileContext();
- ~spInterFileContext();
+ spInterFileContext();
+ ~spInterFileContext();
- void AddFile( const string& fname, const string& content );
+ void AddFile( const string& fname, const string& content );
- void RemoveContext( spContext& ctx );
+ void RemoveContext( spContext& ctx );
- void GenrateContents();
+ void GenrateContents();
- void ParseContents( SourceParserPlugin* pPlugin = NULL );
+ void ParseContents( SourceParserPlugin* pPlugin = NULL );
- // overriden method of the base class (finds out the source fragment)
+ // overriden method of the base class (finds out the source fragment)
- virtual string GetBody( spContext* pCtx = NULL );
+ virtual wxString GetBody( spContext* pCtx = NULL );
- virtual string GetHeader( spContext* pCtx = NULL );
+ virtual wxString GetHeader( spContext* pCtx = NULL );
mIsVirtualContext = true;
}
mIsVirtualContext = true;
}
-string spContext::GetBody( spContext* pCtx )
+wxString spContext::GetBody( spContext* pCtx )
{
if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
{
if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
return mVirtualContextBody;
if ( GetParent() )
return mVirtualContextBody;
if ( GetParent() )
return GetParent()->GetBody( ( pCtx != NULL ) ? pCtx : this );
else
return GetParent()->GetBody( ( pCtx != NULL ) ? pCtx : this );
else
- return ""; // source-fragment cannot be found
+ return wxEmptyString; // source-fragment cannot be found
-string spContext::GetHeader( spContext* pCtx )
+wxString spContext::GetHeader( spContext* pCtx )
return GetParent()->GetHeader( ( pCtx != NULL ) ? pCtx : this );
else
return GetParent()->GetHeader( ( pCtx != NULL ) ? pCtx : this );
else
- return ""; // source-fragment cannot be found
+ return wxEmptyString; // source-fragment cannot be found
}
bool spContext::IsFirstOccurence()
}
bool spContext::IsFirstOccurence()
mHasDefinition = false;
}
mHasDefinition = false;
}
-string spOperation::GetFullName(MarkupTagsT tags)
+wxString spOperation::GetFullName(MarkupTagsT tags)
- string txt = tags[TAG_BOLD].start + m_RetType;
- txt += " ";
+ wxString txt = tags[TAG_BOLD].start + m_RetType;
+ txt += _T(" ");
txt += tags[TAG_BOLD].end;
for( size_t i = 0; i != mMembers.size(); ++i )
txt += tags[TAG_BOLD].end;
for( size_t i = 0; i != mMembers.size(); ++i )
spParameter& param = *((spParameter*)mMembers[i]);
if ( i != 0 )
spParameter& param = *((spParameter*)mMembers[i]);
if ( i != 0 )
txt += tags[TAG_BOLD].start;
txt += tags[TAG_BOLD].start;
txt += tags[TAG_BOLD].end;
txt += tags[TAG_ITALIC].start;
txt += tags[TAG_BOLD].end;
txt += tags[TAG_ITALIC].start;
- if ( param.mInitVal != "" )
+ if ( !param.m_InitVal.empty() )
txt += tags[TAG_BOLD].start;
txt += tags[TAG_BOLD].start;
+ txt += param.m_InitVal;
txt += tags[TAG_BOLD].end;
}
txt += tags[TAG_BOLD].end;
}
/***** Implemenentation for class spPreprocessorLine *****/
/***** Implemenentation for class spPreprocessorLine *****/
-string spPreprocessorLine::CPP_GetIncludedFileNeme() const
+wxString spPreprocessorLine::CPP_GetIncludedFileNeme() const
{
wxASSERT( GetStatementType() == SP_PREP_DEF_INCLUDE_FILE );
size_t i = 0;
{
wxASSERT( GetStatementType() == SP_PREP_DEF_INCLUDE_FILE );
size_t i = 0;
- while( i < m_Line.length() && m_Line[i] != '"' && m_Line[i] != '<' )
+ while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('<') )
- while( i < m_Line.length() && m_Line[i] != '"' && m_Line[i] != '>' )
+ while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('>') )
++i;
if ( start < m_Line.length() )
{
++i;
if ( start < m_Line.length() )
{
fname.append( m_Line, start, ( i - start ) );
return fname;
}
else
fname.append( m_Line, start, ( i - start ) );
return fname;
}
else
- return ""; // syntax error probably
+ return wxEmptyString; // syntax error probably
class spComment
{
public:
class spComment
{
public:
- wxString m_Text;
- bool mIsMultiline; // multiline comments ar those with /**/'s
+ wxString m_Text;
+ bool mIsMultiline; // multiline comments ar those with /**/'s
// true, if these was an empty empty
// line above single line comment
// true, if these was an empty empty
// line above single line comment
- bool IsMultiline() const;
- bool StartsParagraph() const;
+ bool IsMultiline() const;
+ bool StartsParagraph() const;
// contstant version of GetText()
// contstant version of GetText()
- string GetText() const;
+ wxString GetText() const;
};
// abstract base class for common (to most languages) code
};
// abstract base class for common (to most languages) code
// can be overriden by top-level context classes
// to find-out ot the source-fragment of this
// context using it's position information
// can be overriden by top-level context classes
// to find-out ot the source-fragment of this
// context using it's position information
- virtual string GetBody( spContext* pCtx = NULL );
+ virtual wxString GetBody( spContext* pCtx = NULL );
- virtual string GetHeader( spContext* pCtx = NULL );
+ virtual wxString GetHeader( spContext* pCtx = NULL );
// true, if there is at least one entry
// in the comment list of this context
// true, if there is at least one entry
// in the comment list of this context
wxString m_Type;
// "stringified" initial value
wxString m_Type;
// "stringified" initial value
public:
virtual int GetContextType() const { return SP_CTX_PARAMETER; }
public:
virtual int GetContextType() const { return SP_CTX_PARAMETER; }
wxString m_Type;
// it's initial value
wxString m_Type;
// it's initial value
// constantness
bool mIsConstant;
// constantness
bool mIsConstant;
// the default implementation outputs name in
// C++/Java syntax
// the default implementation outputs name in
// C++/Java syntax
- virtual string GetFullName(MarkupTagsT tags);
+ virtual wxString GetFullName(MarkupTagsT tags);
virtual int GetContextType() const { return SP_CTX_OPERATION; }
virtual int GetContextType() const { return SP_CTX_OPERATION; }
virtual int GetStatementType() const { return mDefType; }
virtual int GetStatementType() const { return mDefType; }
- string CPP_GetIncludedFileNeme() const;
+ wxString CPP_GetIncludedFileNeme() const;
virtual void AcceptVisitor( spVisitor& visitor )
{ visitor.VisitPreprocessorLine( *this ); }
virtual void AcceptVisitor( spVisitor& visitor )
{ visitor.VisitPreprocessorLine( *this ); }