X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/821d644dd03e900c236af1e819d4601e5bd57ad9..91b073576e8fd216c71acacf5c1495e1a56dd39f:/utils/HelpGen/src/srcparser.h diff --git a/utils/HelpGen/src/srcparser.h b/utils/HelpGen/src/srcparser.h index 54ced62df4..fda07320e0 100644 --- a/utils/HelpGen/src/srcparser.h +++ b/utils/HelpGen/src/srcparser.h @@ -30,13 +30,6 @@ #include "wx/string.h" #include "wxstlvec.h" - #if wxUSE_STD_STRING - using std::string; - #else - // FOR NOW:: quick n' dirty: - #define string wxString - #endif - #endif #include "markup.h" // markup tags used in spOperator::GetFullName() @@ -132,8 +125,8 @@ class spComment; typedef vector MCommentListT; // list of parameters typedef vector MParamListT; - // string list - typedef vector StrListT; + // wxString list + typedef vector StrListT; #else @@ -143,7 +136,7 @@ class spComment; typedef WXSTL_VECTOR_SHALLOW_COPY(spContextPtrT) MMemberListT; typedef WXSTL_VECTOR_SHALLOW_COPY(spCommentPtrT) MCommentListT; typedef WXSTL_VECTOR_SHALLOW_COPY(spParameterPtrT) MParamListT; - typedef WXSTL_VECTOR_SHALLOW_COPY(string) StrListT; + typedef WXSTL_VECTOR_SHALLOW_COPY(wxString) StrListT; #endif // base class for all visitors of source code contents @@ -233,23 +226,23 @@ public: class spComment { public: - string mText; - 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 - bool mStartsPar; + bool mStartsPar; public: - bool IsMultiline() const; - bool StartsParagraph() const; + bool IsMultiline() const; + bool StartsParagraph() const; - string& GetText(); + wxString& GetText(); // contstant version of GetText() - string GetText() const; + wxString GetText() const; }; // abstract base class for common (to most languages) code @@ -266,7 +259,7 @@ protected: MMemberListT mMembers; // NULL, if this is top-most context - spContext* mpParent; + spContext* m_pParent; // points to context object, where the this context // was originally declared, meaning that this object @@ -318,8 +311,8 @@ public: bool mVirtualContextHasChildren; // body of the context in case (mIsVirtual == true) - string mVirtualContextBody; - string mVittualContextFooter; + wxString mVirtualContextBody; + wxString mVittualContextFooter; // e.g. can be used by documentation generator to store // reference to section object @@ -359,19 +352,19 @@ public: bool VitualContextHasChildren(); - void SetVirtualContextBody( const string& body, + void SetVirtualContextBody( const wxString& body, bool hasChildren = false, - const string& footer = wxEmptyString ); + const wxString& footer = wxEmptyString ); - string GetVirtualContextBody(); - string GetFooterOfVirtualContextBody(); + wxString GetVirtualContextBody(); + wxString GetFooterOfVirtualContextBody(); // 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 @@ -398,7 +391,7 @@ public: spContext* GetOutterContext(); // perhaps more intuitive alias for `GetOutterContext()' - inline spContext* GetParent() { return mpParent; } + inline spContext* GetParent() { return m_pParent; } bool HasOutterContext(); @@ -415,7 +408,7 @@ public: // and it's children. Children's children are not // searched recursivelly if searchSubMembers is false - spContext* FindContext( const string& identifier, + spContext* FindContext( const wxString& identifier, int contextType = SP_CTX_ANY, bool searchSubMembers = true ); @@ -503,7 +496,7 @@ public: wxString m_Type; // "stringified" initial value - string mInitVal; + wxString m_InitVal; public: virtual int GetContextType() const { return SP_CTX_PARAMETER; } @@ -524,7 +517,7 @@ public: wxString m_Type; // it's initial value - string mInitVal; + wxString m_InitVal; // constantness bool mIsConstant; @@ -560,7 +553,7 @@ public: // scope if any (e.g. MyClass::MyFunction(), scope stirng is "MyClass" ) // usually found along with implementation of the method, which is now skipped - string mScope; + wxString mScope; public: spOperation(); @@ -580,7 +573,7 @@ public: // 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; } @@ -599,7 +592,7 @@ public: // prepocessor statement including '#' and // attached multiple lines with '\' character - string mLine; + wxString m_Line; int mDefType; // see SP_PREP_DEFINITION_TYPES enumeration @@ -609,7 +602,7 @@ public: virtual int GetStatementType() const { return mDefType; } - string CPP_GetIncludedFileNeme() const; + wxString CPP_GetIncludedFileNeme() const; virtual void AcceptVisitor( spVisitor& visitor ) { visitor.VisitPreprocessorLine( *this ); } @@ -623,7 +616,7 @@ class spClass : public spContext { public: // list of superclasses/interfaces - StrListT mSuperClassNames; + StrListT m_SuperClassNames; // see SP_CLASS_TYPES enumeration int mClassSubType; @@ -632,7 +625,7 @@ public: int mInheritanceType; // valid if mClassSubType is SP_CLTYPE_TEMPLATE_CLASS - string mTemplateTypes; + wxString mTemplateTypes; // true, if it's and interface of abstract base class bool mIsAbstract; @@ -665,7 +658,7 @@ public: class spEnumeration : public spContext { public: - string mEnumContent; // full-text content of enumeration + wxString m_EnumContent; // full-text content of enumeration public: virtual int GetContextType() const { return SP_CTX_ENUMERATION; } @@ -681,7 +674,7 @@ class spTypeDef : public spContext public: // the original type which is redefined // by this type definition - string mOriginalType; + wxString m_OriginalType; public: virtual int GetContextType() const { return SP_CTX_TYPEDEF; } @@ -701,7 +694,7 @@ class spFile : public spContext public: // since file name cannot be determined from // source code, filling in this field is optional - string mFileName; + wxString m_FileName; public: virtual int GetContextType() const { return SP_CTX_FILE; }