// Created: 22/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
bool sortContent
)
{
- mSiblingSkipped = FALSE;
- mChildSkipped = FALSE;
+ mSiblingSkipped = false;
+ mChildSkipped = false;
mContextMask = SP_CTX_ANY; // FIXME:: should be an arg.
if ( sortContent && !atContext.IsSorted() )
for( size_t i = 0; i != members.size(); ++i )
{
if ( mSiblingSkipped )
-
+
return;
if ( !mChildSkipped )
void spVisitor::SkipSiblings()
{
- mSiblingSkipped = TRUE;
+ mSiblingSkipped = true;
}
void spVisitor::SkipChildren()
{
- mChildSkipped = TRUE;
+ mChildSkipped = true;
}
void spVisitor::SetFilter( int contextMask )
: mpParent ( NULL ),
mpFirstOccurence( NULL ),
- mAlreadySorted ( FALSE ),
+ mAlreadySorted ( false ),
mSrcLineNo (-1),
mSrcOffset (-1),
mVisibility( SP_VIS_PRIVATE ),
- mIsVirtualContext ( FALSE ),
- mVirtualContextHasChildren( FALSE ),
+ mIsVirtualContext ( false ),
+ mVirtualContextHasChildren( false ),
mpUserData( NULL )
{}
void spContext::RemoveChildren()
{
for( size_t i = 0; i != mMembers.size(); ++i )
-
+
delete mMembers[i];
mMembers.erase( mMembers.begin(), mMembers.end() );
RemoveChildren();
for( size_t i = 0; i != mComments.size(); ++i )
-
+
delete mComments[i];
}
return;
}
- // the given child should exist on the parent's list
+ // the given child should exist on the parent's list
wxASSERT( 0 );
}
{
spContext* cur = this->GetParent();
- while ( cur && !(cur->GetContextType() & mask) )
-
+ while ( cur && !(cur->GetContextType() & mask) )
+
cur = cur->GetParent();
return cur;
}
-void spContext::SetVirtualContextBody( const string& body,
+void spContext::SetVirtualContextBody( const string& body,
bool hasChildren,
const string& footer )
{
// atuomaticllay becomes virtual context
- mIsVirtualContext = TRUE;
+ mIsVirtualContext = true;
}
string spContext::GetBody( spContext* pCtx )
{
- if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
-
+ if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
+
return mVirtualContextBody;
if ( GetParent() )
spContext* spContext::GetFirstOccurence()
{
- // this object should not itself be
+ // this object should not itself be
// the first occurence of the context
wxASSERT( mpFirstOccurence != 0 );
{
spContext& member = *mMembers[i];
- if ( member.GetName() == identifier &&
+ if ( member.GetName() == identifier &&
( contextType & member.GetContextType() )
)
if ( searchSubMembers )
{
- spContext* result =
+ spContext* result =
member.FindContext( identifier, contextType, 1 );
if ( result ) return result;
mpParent->RemoveChild( this );
else
// context should have a parent
- wxASSERT(0);
+ wxFAIL_MSG("Context should have a parent");
}
spContext* spContext::GetOutterContext()
spOperation::spOperation()
- : mHasDefinition( FALSE )
+ : mHasDefinition( false )
{
mIsConstant =
mIsVirtual =
{
string txt = tags[TAG_BOLD].start + mRetType;
txt += " ";
- txt += mName;
+ txt += m_Name;
txt += "( ";
txt += tags[TAG_BOLD].end;
-
+
for( size_t i = 0; i != mMembers.size(); ++i )
{
// DBG::
if ( i != 0 )
txt += ", ";
-
+
txt += tags[TAG_BOLD].start;
-
+
txt += param.mType;
txt += tags[TAG_BOLD].end;
txt += tags[TAG_ITALIC].start;
txt += " ";
- txt += param.mName;
+ txt += param.m_Name;
if ( param.mInitVal != "" )
{
size_t i = 0;
- while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '<' )
-
+ while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '<' )
+
++i;
++i;
size_t start = i;
- while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '>' )
+ while( i < mLine.length() && mLine[i] != '"' && mLine[i] != '>' )
++i;
FILE* fp = fopen( fname, "rt" );
- if ( (int)fp == -1 || !fp ) return NULL;
+ if ( !fp ) return NULL;
int sz = fread( mpFileBuf, 1, mFileBufSz, fp );
}
}
-void spContext::DumpThis(const wxString& indent) const
+void spContext::DumpThis(const wxString& WXUNUSED(indent)) const
{
wxFAIL_MSG("abstract base class can't be found in parser tree!");
}
void spParameter::DumpThis(const wxString& indent) const
{
wxLogDebug("%sparam named '%s' of type '%s'",
- indent.c_str(), mName.c_str(), mType.c_str());
+ indent.c_str(), m_Name.c_str(), mType.c_str());
}
void spAttribute::DumpThis(const wxString& indent) const
{
wxLogDebug("%svariable named '%s' of type '%s'",
- indent.c_str(), mName.c_str(), mType.c_str());
+ indent.c_str(), m_Name.c_str(), mType.c_str());
}
void spOperation::DumpThis(const wxString& indent) const
{
wxString protection;
- if ( !!mScope ) {
+ if ( !mScope.empty() ) {
switch ( mVisibility ) {
case SP_VIS_PUBLIC:
protection = "public";
mIsConstant ? "const " : "",
mIsVirtual ? "virtual " : "",
protection.c_str(),
- mScope.c_str(), mName.c_str(), mRetType.c_str());
+ mScope.c_str(), m_Name.c_str(), mRetType.c_str());
}
void spPreprocessorLine::DumpThis(const wxString& indent) const
for ( StrListT::const_iterator i = mSuperClassNames.begin();
i != mSuperClassNames.end();
i++ ) {
- if ( !!base )
+ if ( !base.empty() )
base += ", ";
base += *i;
}
wxLogDebug("%s%s named '%s' (base classes: %s)",
indent.c_str(), kind.c_str(),
- mName.c_str(), base.c_str());
+ m_Name.c_str(), base.c_str());
}
void spEnumeration::DumpThis(const wxString& indent) const
{
wxLogDebug("%senum named '%s'",
- indent.c_str(), mName.c_str());
+ indent.c_str(), m_Name.c_str());
}
void spTypeDef::DumpThis(const wxString& indent) const
{
wxLogDebug("%stypedef %s = %s",
- indent.c_str(), mName.c_str(), mOriginalType.c_str());
+ indent.c_str(), m_Name.c_str(), mOriginalType.c_str());
}
void spFile::DumpThis(const wxString& indent) const