]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/HelpGen/src/srcparser.cpp
Add some more docs to the runtime installer.
[wxWidgets.git] / utils / HelpGen / src / srcparser.cpp
index d9d4468ce6382cfe8caae6c8bb87c22666e2228e..22959ba056fde70cd67730e4ab9f9e11ee5c24e3 100644 (file)
@@ -109,14 +109,14 @@ bool spComment::StartsParagraph() const
     return mStartsPar;
 }
 
-string& spComment::GetText()
+wxString& spComment::GetText()
 {
-    return mText;
+    return m_Text;
 }
 
-string spComment::GetText() const
+wxString spComment::GetText() const
 {
-    return mText;
+    return m_Text;
 }
 
 /***** Implementation for class spContext *****/
@@ -260,26 +260,23 @@ void spContext::SetVirtualContextBody( const string& body,
     mIsVirtualContext   = true;
 }
 
-string spContext::GetBody( spContext* pCtx )
+wxString spContext::GetBody( spContext* pCtx )
 {
     if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
-
         return mVirtualContextBody;
 
     if ( GetParent() )
-
         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 )
 {
     if ( GetParent() )
-
         return GetParent()->GetHeader( ( pCtx != NULL ) ? pCtx : this );
     else
-        return ""; // source-fragment cannot be found
+        return wxEmptyString; // source-fragment cannot be found
 }
 
 bool spContext::IsFirstOccurence()
@@ -421,12 +418,12 @@ spOperation::spOperation()
     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 += m_Name;
-    txt += "( ";
+    txt += _T("( ");
     txt += tags[TAG_BOLD].end;
 
     for( size_t i = 0; i != mMembers.size(); ++i )
@@ -437,7 +434,7 @@ string spOperation::GetFullName(MarkupTagsT tags)
         spParameter& param = *((spParameter*)mMembers[i]);
 
         if ( i != 0 )
-            txt += ", ";
+            txt += _T(", ");
 
         txt += tags[TAG_BOLD].start;
 
@@ -446,15 +443,15 @@ string spOperation::GetFullName(MarkupTagsT tags)
         txt += tags[TAG_BOLD].end;
         txt += tags[TAG_ITALIC].start;
 
-        txt += " ";
+        txt += _T(" ");
         txt += param.m_Name;
 
-        if ( param.mInitVal != "" )
+        if ( !param.m_InitVal.empty() )
         {
-            txt += " = ";
+            txt += _T(" = ");
             txt += tags[TAG_BOLD].start;
 
-            txt += param.mInitVal;
+            txt += param.m_InitVal;
 
             txt += tags[TAG_BOLD].end;
         }
@@ -473,13 +470,13 @@ string spOperation::GetFullName(MarkupTagsT tags)
 
 /***** 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;
 
-    while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '<' )
+    while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('<') )
 
         ++i;
 
@@ -487,19 +484,19 @@ string spPreprocessorLine::CPP_GetIncludedFileNeme() const
 
     size_t start = i;
 
-    while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '>' )
+    while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('>') )
 
         ++i;
 
-    if ( start < mLine.length() )
+    if ( start < m_Line.length() )
     {
-        string fname;
-        fname.append( mLine, start, ( i - start ) );
+        wxString fname;
+        fname.append( m_Line, start, ( i - start ) );
 
         return fname;
     }
     else
-        return ""; // syntax error probably
+        return wxEmptyString; // syntax error probably
 }
 
 
@@ -609,10 +606,14 @@ void spOperation::DumpThis(const wxString& indent) const
         protection = "global";
     }
 
+    wxString constStr,virtualStr;
+    if(mIsConstant) constStr = _T("const ");
+    if(mIsVirtual) virtualStr = _T("virtual ");
+
     wxLogDebug("%s%s%s%s function named '%s::%s' of type '%s'",
                indent.c_str(),
-               mIsConstant ? "const " : "",
-               mIsVirtual ? "virtual " : "",
+               constStr.c_str(),
+               virtualStr.c_str(),
                protection.c_str(),
                mScope.c_str(), m_Name.c_str(), m_RetType.c_str());
 }
@@ -646,8 +647,8 @@ void spPreprocessorLine::DumpThis(const wxString& indent) const
 void spClass::DumpThis(const wxString& indent) const
 {
     wxString base;
-    for ( StrListT::const_iterator i = mSuperClassNames.begin();
-          i != mSuperClassNames.end();
+    for ( StrListT::const_iterator i = m_SuperClassNames.begin();
+          i != m_SuperClassNames.end();
           i++ ) {
         if ( !base.empty() )
             base += ", ";
@@ -697,13 +698,13 @@ void spEnumeration::DumpThis(const wxString& indent) const
 void spTypeDef::DumpThis(const wxString& indent) const
 {
     wxLogDebug("%stypedef %s = %s",
-               indent.c_str(), m_Name.c_str(), mOriginalType.c_str());
+               indent.c_str(), m_Name.c_str(), m_OriginalType.c_str());
 }
 
 void spFile::DumpThis(const wxString& indent) const
 {
     wxLogDebug("%sfile '%s'",
-               indent.c_str(), mFileName.c_str());
+               indent.c_str(), m_FileName.c_str());
 }
 
 #endif // __WXDEBUG__