#include "wx/string.h"
#include "wxstlvec.h"
- // FOR NOW:: quick n' dirty:
-
- #define string wxString
+ #if wxUSE_STD_STRING
+ using std::string;
+ #else
+ // FOR NOW:: quick n' dirty:
+ #define string wxString
+ #endif
#endif
// spClass on sorting the class members
void VisitAll( spContext& atContext,
- bool sortContent = TRUE
+ bool sortContent = true
);
// methods invoked by visitor
// multiple times by variouse visitors (there can
// be more the one visitor visiting content at a time)
- virtual void VisitFile( spFile& fl ) {}
+ virtual void VisitFile( spFile& WXUNUSED(fl) ) {}
- virtual void VisitNameSpace( spNameSpace& ns ) {}
+ virtual void VisitNameSpace( spNameSpace& WXUNUSED(ns) ) {}
- virtual void VisitClass( spClass& cl ) {}
+ virtual void VisitClass( spClass& WXUNUSED(cl) ) {}
- virtual void VisitEnumeration( spEnumeration& en ) {}
+ virtual void VisitEnumeration( spEnumeration& WXUNUSED(en) ) {}
- virtual void VisitTypeDef( spTypeDef& td ) {}
+ virtual void VisitTypeDef( spTypeDef& WXUNUSED(td) ) {}
- virtual void VisitPreprocessorLine( spPreprocessorLine& pd ) {}
+ virtual void VisitPreprocessorLine( spPreprocessorLine& WXUNUSED(pd) ) {}
- virtual void VisitAttribute( spAttribute& attr ) {}
+ virtual void VisitAttribute( spAttribute& WXUNUSED(attr) ) {}
- virtual void VisitOperation( spOperation& op ) {}
+ virtual void VisitOperation( spOperation& WXUNUSED(op) ) {}
- virtual void VisitParameter( spParameter& param ) {}
+ virtual void VisitParameter( spParameter& WXUNUSED(param) ) {}
- virtual void VisitCustomContext( spContext& ctx ) {}
+ virtual void VisitCustomContext( spContext& WXUNUSED(ctx) ) {}
};
// stores one section of comments,
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
+ // 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();
+ string& GetText();
// contstant version of GetText()
- string GetText() const;
+ string GetText() const;
};
// abstract base class for common (to most languages) code
// see SRC_VISIBLITY_TYPES enumeration
int mVisibility;
- // TRUE, if context does not really exist in the source
+ // true, if context does not really exist in the source
// but was created by external tools (e.g. forward engineering)
bool mIsVirtualContext;
bool mVirtualContextHasChildren;
- // body of the context in case (mIsVirtual == TRUE)
+ // body of the context in case (mIsVirtual == true)
string mVirtualContextBody;
string mVittualContextFooter;
public:
// universal identifier of the context (e.g. class name)
- string mName;
+ wxString m_Name;
public:
// default constructor
bool VitualContextHasChildren();
void SetVirtualContextBody( const string& body,
- bool hasChildren = FALSE,
+ bool hasChildren = false,
const string& footer = wxEmptyString );
string GetVirtualContextBody();
virtual string GetHeader( spContext* pCtx = NULL );
- // TRUE, if there is at least one entry
+ // true, if there is at least one entry
// in the comment list of this context
bool HasComments();
MCommentListT& GetCommentList() { return mComments; }
virtual void SortMembers() {}
// returns identifier of this context
- inline string& GetName() { return mName; }
+ inline wxString& GetName() { return m_Name; }
// returns -1, if souce line # is unknow
inline int GetSourceLineNo() { return mSrcLineNo; }
// returns NULL, if the context with the given
// name and type is not contained by this context
// and it's children. Children's children are not
- // searched recursivelly if searchSubMembers is FALSE
+ // searched recursivelly if searchSubMembers is false
spContext* FindContext( const string& identifier,
int contextType = SP_CTX_ANY,
- bool searchSubMembers = TRUE
+ bool searchSubMembers = true
);
// removes this context from it's parent
// will result assertion failure)
void RemoveThisContext();
- // returns TRUE, if this object is aggregated in the file
+ // returns true, if this object is aggregated in the file
bool IsInFile();
- // TRUE, if outter context is a namespace
+ // true, if outter context is a namespace
bool IsInNameSpace();
- // TRUE, if outter context is a class
+ // true, if outter context is a class
bool IsInClass();
- // TRUE, if outter cotext is an operation (TRUE for "spParameter"s)
+ // true, if outter cotext is an operation (true for "spParameter"s)
bool IsInOperation();
- // TRUE if the context is public
+ // true if the context is public
bool IsPublic() const { return mVisibility == SP_VIS_PUBLIC; }
// NOTE:: method returns not the type of this object
{
public:
// type of argument (parameter)
- string mType;
+ wxString m_Type;
// "stringified" initial value
string mInitVal;
{
public:
// type of the attribute
- string mType;
+ wxString m_Type;
// it's initial value
string mInitVal;
{
public:
// type of return value
- string mRetType;
+ wxString m_RetType;
// argument list
//MParamListT mParams;
- // TRUE, if operation does not modify
+ // true, if operation does not modify
// the content of the object
bool mIsConstant;
// flag, specific to C++
bool mIsVirtual;
- // TRUE, if definition follows the declaration immediatelly
+ // true, if definition follows the declaration immediatelly
bool mHasDefinition;
// scope if any (e.g. MyClass::MyFunction(), scope stirng is "MyClass" )
// prepocessor statement including '#' and
// attached multiple lines with '\' character
- string mLine;
+ wxString m_Line;
int mDefType; // see SP_PREP_DEFINITION_TYPES enumeration
// valid if mClassSubType is SP_CLTYPE_TEMPLATE_CLASS
string mTemplateTypes;
- // TRUE, if it's and interface of abstract base class
+ // true, if it's and interface of abstract base class
bool mIsAbstract;
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; }
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; }