Kaydet (Commit) 444c242c authored tarafından Joseph Powers's avatar Joseph Powers

remove DECLARE_LIST( BreakPL, BreakPoint* )

Also simplify the prior patch & make sure the list is in the right order.
üst 52b66899
...@@ -334,7 +334,7 @@ BOOL ModulWindow::BasicExecute() ...@@ -334,7 +334,7 @@ BOOL ModulWindow::BasicExecute()
if ( XModule().Is() && xModule->IsCompiled() && !aStatus.bError ) if ( XModule().Is() && xModule->IsCompiled() && !aStatus.bError )
{ {
if ( GetBreakPoints().Count() ) if ( GetBreakPoints().size() )
aStatus.nBasicFlags = aStatus.nBasicFlags | SbDEBUG_BREAK; aStatus.nBasicFlags = aStatus.nBasicFlags | SbDEBUG_BREAK;
if ( !aStatus.bIsRunning ) if ( !aStatus.bIsRunning )
...@@ -584,7 +584,7 @@ BOOL ModulWindow::ToggleBreakPoint( ULONG nLine ) ...@@ -584,7 +584,7 @@ BOOL ModulWindow::ToggleBreakPoint( ULONG nLine )
if ( pBrk ) // entfernen if ( pBrk ) // entfernen
{ {
xModule->ClearBP( (USHORT)nLine ); xModule->ClearBP( (USHORT)nLine );
delete GetBreakPoints().Remove( pBrk ); delete GetBreakPoints().remove( pBrk );
} }
else // einen erzeugen else // einen erzeugen
{ {
...@@ -1350,7 +1350,7 @@ void __EXPORT ModulWindow::BasicStarted() ...@@ -1350,7 +1350,7 @@ void __EXPORT ModulWindow::BasicStarted()
{ {
aStatus.bIsRunning = TRUE; aStatus.bIsRunning = TRUE;
BreakPointList& rList = GetBreakPoints(); BreakPointList& rList = GetBreakPoints();
if ( rList.Count() ) if ( rList.size() )
{ {
rList.ResetHitCount(); rList.ResetHitCount();
rList.SetBreakPointsInBasic( xModule ); rList.SetBreakPointsInBasic( xModule );
......
...@@ -975,13 +975,12 @@ void __EXPORT BreakPointWindow::Paint( const Rectangle& ) ...@@ -975,13 +975,12 @@ void __EXPORT BreakPointWindow::Paint( const Rectangle& )
aBmpOff.X() = ( aOutSz.Width() - aBmpSz.Width() ) / 2; aBmpOff.X() = ( aOutSz.Width() - aBmpSz.Width() ) / 2;
aBmpOff.Y() = ( nLineHeight - aBmpSz.Height() ) / 2; aBmpOff.Y() = ( nLineHeight - aBmpSz.Height() ) / 2;
BreakPoint* pBrk = GetBreakPoints().First(); for ( size_t i = 0, n = GetBreakPoints().size(); i < n ; ++i )
while ( pBrk )
{ {
ULONG nLine = pBrk->nLine-1; BreakPoint* pBrk = GetBreakPoints().at( i );
ULONG nY = nLine*nLineHeight - nCurYOffset; size_t nLine = pBrk->nLine-1;
size_t nY = nLine*nLineHeight - nCurYOffset;
DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 ); DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 );
pBrk = GetBreakPoints().Next();
} }
ShowMarker( TRUE ); ShowMarker( TRUE );
} }
...@@ -1039,20 +1038,16 @@ void BreakPointWindow::ShowMarker( BOOL bShow ) ...@@ -1039,20 +1038,16 @@ void BreakPointWindow::ShowMarker( BOOL bShow )
BreakPoint* BreakPointWindow::FindBreakPoint( const Point& rMousePos ) BreakPoint* BreakPointWindow::FindBreakPoint( const Point& rMousePos )
{ {
long nLineHeight = GetTextHeight(); size_t nLineHeight = GetTextHeight();
long nYPos = rMousePos.Y() + nCurYOffset; size_t nYPos = rMousePos.Y() + nCurYOffset;
// Image aBrk( ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->GetImage( IMGID_BRKENABLED ) );
// Size aBmpSz( aBrk.GetSizePixel() );
// aBmpSz = PixelToLogic( aBmpSz );
BreakPoint* pBrk = GetBreakPoints().First(); for ( size_t i = 0, n = GetBreakPoints().size(); i < n ; ++i )
while ( pBrk )
{ {
ULONG nLine = pBrk->nLine-1; BreakPoint* pBrk = GetBreakPoints().at( i );
long nY = nLine*nLineHeight; size_t nLine = pBrk->nLine-1;
size_t nY = nLine*nLineHeight;
if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) ) if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) )
return pBrk; return pBrk;
pBrk = GetBreakPoints().Next();
} }
return 0; return 0;
} }
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using ::std::vector;
DBG_NAME( IDEBaseWindow ) DBG_NAME( IDEBaseWindow )
...@@ -265,11 +266,10 @@ SfxUndoManager* __EXPORT IDEBaseWindow::GetUndoManager() ...@@ -265,11 +266,10 @@ SfxUndoManager* __EXPORT IDEBaseWindow::GetUndoManager()
BreakPointList::BreakPointList() BreakPointList::BreakPointList()
{} {}
BreakPointList::BreakPointList(BreakPointList const & rList): BreakPointList::BreakPointList(BreakPointList const & rList)
BreakPL( sal::static_int_cast<USHORT>( rList.Count() ))
{ {
for (ULONG i = 0; i < rList.Count(); ++i) for (size_t i = 0; i < rList.size(); ++i)
Insert(new BreakPoint(*rList.GetObject(i)), i); maBreakPoints.push_back( new BreakPoint(*rList.at( i ) ) );
} }
BreakPointList::~BreakPointList() BreakPointList::~BreakPointList()
...@@ -279,76 +279,69 @@ BreakPointList::~BreakPointList() ...@@ -279,76 +279,69 @@ BreakPointList::~BreakPointList()
void BreakPointList::reset() void BreakPointList::reset()
{ {
while (Count() > 0) for ( size_t i = 0, n = maBreakPoints.size(); i < n; ++i )
delete Remove(Count() - 1); delete maBreakPoints[ i ];
maBreakPoints.clear();
} }
void BreakPointList::transfer(BreakPointList & rList) void BreakPointList::transfer(BreakPointList & rList)
{ {
reset(); reset();
for (ULONG i = 0; i < rList.Count(); ++i) for (size_t i = 0; i < rList.size(); ++i)
Insert(rList.GetObject(i), i); maBreakPoints.push_back( rList.at( i ) );
rList.Clear(); rList.reset();
} }
void BreakPointList::InsertSorted( BreakPoint* pNewBrk ) void BreakPointList::InsertSorted( BreakPoint* pNewBrk )
{ {
BreakPoint* pBrk = First(); for ( vector< BreakPoint* >::iterator i = maBreakPoints.begin(); i < maBreakPoints.end(); ++i )
while ( pBrk )
{ {
if ( pNewBrk->nLine <= pBrk->nLine ) if ( pNewBrk->nLine <= (*i)->nLine )
{ {
DBG_ASSERT( ( pBrk->nLine != pNewBrk->nLine ) || pNewBrk->bTemp, "BreakPoint existiert schon!" ); DBG_ASSERT( ( pBrk->nLine != pNewBrk->nLine ) || pNewBrk->bTemp, "BreakPoint existiert schon!" );
Insert( pNewBrk ); maBreakPoints.insert( i, pNewBrk );
return; return;
} }
pBrk = Next();
} }
// Keine Einfuegeposition gefunden => LIST_APPEND // Keine Einfuegeposition gefunden => LIST_APPEND
Insert( pNewBrk, LIST_APPEND ); maBreakPoints.push_back( pNewBrk );
} }
void BreakPointList::SetBreakPointsInBasic( SbModule* pModule ) void BreakPointList::SetBreakPointsInBasic( SbModule* pModule )
{ {
pModule->ClearAllBP(); pModule->ClearAllBP();
BreakPoint* pBrk = First(); for ( size_t i = 0, n = maBreakPoints.size(); i < n; ++i )
while ( pBrk )
{ {
BreakPoint* pBrk = maBreakPoints[ i ];
if ( pBrk->bEnabled ) if ( pBrk->bEnabled )
pModule->SetBP( (USHORT)pBrk->nLine ); pModule->SetBP( (USHORT)pBrk->nLine );
pBrk = Next();
} }
} }
BreakPoint* BreakPointList::FindBreakPoint( ULONG nLine ) BreakPoint* BreakPointList::FindBreakPoint( size_t nLine )
{ {
BreakPoint* pBrk = First(); for ( size_t i = 0, n = maBreakPoints.size(); i < n; ++i )
while ( pBrk )
{ {
BreakPoint* pBrk = maBreakPoints[ i ];
if ( pBrk->nLine == nLine ) if ( pBrk->nLine == nLine )
return pBrk; return pBrk;
pBrk = Next();
} }
return NULL;
return (BreakPoint*)0;
} }
void BreakPointList::AdjustBreakPoints( size_t nLine, bool bInserted )
void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted )
{ {
BreakPoint* pBrk = First(); for ( size_t i = 0; i < maBreakPoints.size(); )
while ( pBrk )
{ {
BOOL bDelBrk = FALSE; BreakPoint* pBrk = maBreakPoints[ i ];
bool bDelBrk = false;
if ( pBrk->nLine == nLine ) if ( pBrk->nLine == nLine )
{ {
if ( bInserted ) if ( bInserted )
pBrk->nLine++; pBrk->nLine++;
else else
bDelBrk = TRUE; bDelBrk = true;
} }
else if ( pBrk->nLine > nLine ) else if ( pBrk->nLine > nLine )
{ {
...@@ -360,27 +353,66 @@ void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted ) ...@@ -360,27 +353,66 @@ void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted )
if ( bDelBrk ) if ( bDelBrk )
{ {
ULONG n = GetCurPos(); delete remove( pBrk );
delete Remove( pBrk );
pBrk = Seek( n );
} }
else else
{ {
pBrk = Next(); ++i;
} }
} }
} }
void BreakPointList::ResetHitCount() void BreakPointList::ResetHitCount()
{ {
BreakPoint* pBrk = First(); for ( size_t i = 0, n = maBreakPoints.size(); i < n; ++i )
while ( pBrk )
{ {
BreakPoint* pBrk = maBreakPoints[ i ];
pBrk->nHitCount = 0; pBrk->nHitCount = 0;
pBrk = Next();
} }
} }
size_t BreakPointList::size() const
{
return maBreakPoints.size();
}
BreakPoint* BreakPointList::at( size_t i )
{
if ( i < maBreakPoints.size() )
return maBreakPoints[ i ];
else
return NULL;
}
const BreakPoint* BreakPointList::at( size_t i ) const
{
return maBreakPoints[ i ];
}
BreakPoint* BreakPointList::remove( BreakPoint* ptr )
{
for ( vector< BreakPoint* >::iterator i = maBreakPoints.begin(); i < maBreakPoints.end(); ++i )
{
if ( ptr == *i )
{
maBreakPoints.erase( i );
return ptr;
}
}
return NULL;
}
void BreakPointList::push_back( BreakPoint* item )
{
maBreakPoints.push_back( item );
}
void BreakPointList::clear()
{
maBreakPoints.clear();
}
void IDEBaseWindow::Deactivating() void IDEBaseWindow::Deactivating()
{ {
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
// FIXME Why does BreakPointDialog allow only USHORT for break-point line // FIXME Why does BreakPointDialog allow only USHORT for break-point line
// numbers, whereas BreakPoint supports ULONG? // numbers, whereas BreakPoint supports ULONG?
bool lcl_ParseText( String aText, USHORT& rLineNr ) bool lcl_ParseText( String aText, size_t& rLineNr )
{ {
// aText should look like "# n" where // aText should look like "# n" where
// n > 0 && n < std::numeric_limits< USHORT >::max(). // n > 0 && n < std::numeric_limits< USHORT >::max().
...@@ -61,9 +61,9 @@ bool lcl_ParseText( String aText, USHORT& rLineNr ) ...@@ -61,9 +61,9 @@ bool lcl_ParseText( String aText, USHORT& rLineNr )
aText.Erase(0, 1); aText.Erase(0, 1);
// XXX Assumes that USHORT is contained within sal_Int32: // XXX Assumes that USHORT is contained within sal_Int32:
sal_Int32 n = aText.ToInt32(); sal_Int32 n = aText.ToInt32();
if (n <= 0 || n > std::numeric_limits< USHORT >::max()) if ( n <= 0 )
return false; return false;
rLineNr = static_cast< USHORT >(n); rLineNr = static_cast< size_t >(n);
return true; return true;
} }
...@@ -84,14 +84,12 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList ...@@ -84,14 +84,12 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
FreeResource(); FreeResource();
aComboBox.SetUpdateMode( FALSE ); aComboBox.SetUpdateMode( FALSE );
BreakPoint* pBrk = m_aModifiedBreakPointList.First(); for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i )
BreakPoint* pFirstBrk = pBrk;
while ( pBrk )
{ {
BreakPoint* pBrk = m_aModifiedBreakPointList.at( i );
String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) ); String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
aEntryStr += String::CreateFromInt32( pBrk->nLine ); aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND ); aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
pBrk = m_aModifiedBreakPointList.Next();
} }
aComboBox.SetUpdateMode( TRUE ); aComboBox.SetUpdateMode( TRUE );
...@@ -112,7 +110,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList ...@@ -112,7 +110,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) ); aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) );
aComboBox.SetText( aComboBox.GetEntry( 0 ) ); aComboBox.SetText( aComboBox.GetEntry( 0 ) );
UpdateFields( pFirstBrk ); UpdateFields( m_aModifiedBreakPointList.at( 0 ) );
CheckButtons(); CheckButtons();
} }
...@@ -130,7 +128,7 @@ void BreakPointDialog::CheckButtons() ...@@ -130,7 +128,7 @@ void BreakPointDialog::CheckButtons()
// "New" button is enabled if the combo box edit contains a valid line // "New" button is enabled if the combo box edit contains a valid line
// number that is not already present in the combo box list; otherwise // number that is not already present in the combo box list; otherwise
// "OK" and "Delete" buttons are enabled: // "OK" and "Delete" buttons are enabled:
USHORT nLine; size_t nLine;
if (lcl_ParseText(aComboBox.GetText(), nLine) if (lcl_ParseText(aComboBox.GetText(), nLine)
&& m_aModifiedBreakPointList.FindBreakPoint(nLine) == 0) && m_aModifiedBreakPointList.FindBreakPoint(nLine) == 0)
{ {
...@@ -165,7 +163,7 @@ IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox *, pBox ) ...@@ -165,7 +163,7 @@ IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox *, pBox )
aDelButton.Enable(); aDelButton.Enable();
USHORT nEntry = pBox->GetEntryPos( pBox->GetText() ); USHORT nEntry = pBox->GetEntryPos( pBox->GetText() );
BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry ); BreakPoint* pBrk = m_aModifiedBreakPointList.at( nEntry );
DBG_ASSERT( pBrk, "Kein passender Breakpoint zur Liste ?" ); DBG_ASSERT( pBrk, "Kein passender Breakpoint zur Liste ?" );
UpdateFields( pBrk ); UpdateFields( pBrk );
...@@ -200,13 +198,13 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton ) ...@@ -200,13 +198,13 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
{ {
// Checkbox beruecksichtigen! // Checkbox beruecksichtigen!
String aText( aComboBox.GetText() ); String aText( aComboBox.GetText() );
USHORT nLine; size_t nLine;
BOOL bValid = lcl_ParseText( aText, nLine ); bool bValid = lcl_ParseText( aText, nLine );
if ( bValid ) if ( bValid )
{ {
BreakPoint* pBrk = new BreakPoint( nLine ); BreakPoint* pBrk = new BreakPoint( nLine );
pBrk->bEnabled = aCheckBox.IsChecked(); pBrk->bEnabled = aCheckBox.IsChecked();
pBrk->nStopAfter = (ULONG) aNumericField.GetValue(); pBrk->nStopAfter = (size_t) aNumericField.GetValue();
m_aModifiedBreakPointList.InsertSorted( pBrk ); m_aModifiedBreakPointList.InsertSorted( pBrk );
String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) ); String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
aEntryStr += String::CreateFromInt32( pBrk->nLine ); aEntryStr += String::CreateFromInt32( pBrk->nLine );
...@@ -229,11 +227,11 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton ) ...@@ -229,11 +227,11 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
} }
else if ( pButton == &aDelButton ) else if ( pButton == &aDelButton )
{ {
USHORT nEntry = aComboBox.GetEntryPos( aComboBox.GetText() ); size_t nEntry = aComboBox.GetEntryPos( aComboBox.GetText() );
BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry ); BreakPoint* pBrk = m_aModifiedBreakPointList.at( nEntry );
if ( pBrk ) if ( pBrk )
{ {
delete m_aModifiedBreakPointList.Remove( pBrk ); delete m_aModifiedBreakPointList.remove( pBrk );
aComboBox.RemoveEntry( nEntry ); aComboBox.RemoveEntry( nEntry );
if ( nEntry && !( nEntry < aComboBox.GetEntryCount() ) ) if ( nEntry && !( nEntry < aComboBox.GetEntryCount() ) )
nEntry--; nEntry--;
...@@ -272,8 +270,8 @@ void BreakPointDialog::UpdateFields( BreakPoint* pBrk ) ...@@ -272,8 +270,8 @@ void BreakPointDialog::UpdateFields( BreakPoint* pBrk )
BreakPoint* BreakPointDialog::GetSelectedBreakPoint() BreakPoint* BreakPointDialog::GetSelectedBreakPoint()
{ {
USHORT nEntry = aComboBox.GetEntryPos( aComboBox.GetText() ); size_t nEntry = aComboBox.GetEntryPos( aComboBox.GetText() );
BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry ); BreakPoint* pBrk = m_aModifiedBreakPointList.at( nEntry );
return pBrk; return pBrk;
} }
......
...@@ -56,8 +56,9 @@ ...@@ -56,8 +56,9 @@
#include <com/sun/star/script/XLibraryContainer2.hpp> #include <com/sun/star/script/XLibraryContainer2.hpp>
#include <com/sun/star/document/MacroExecMode.hpp> #include <com/sun/star/document/MacroExecMode.hpp>
#include <list> #include <map>
using ::std::list; using ::std::map;
using ::std::pair;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -553,7 +554,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) ...@@ -553,7 +554,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
// Die Macros sollen in der Reihenfolge angezeigt werden, // Die Macros sollen in der Reihenfolge angezeigt werden,
// wie sie im Modul stehen. // wie sie im Modul stehen.
list< SbMethod* > aMacros; map< sal_uInt16, SbMethod* > aMacros;
size_t nMacroCount = pModule->GetMethods()->Count(); size_t nMacroCount = pModule->GetMethods()->Count();
for ( size_t iMeth = 0; iMeth < nMacroCount; iMeth++ ) for ( size_t iMeth = 0; iMeth < nMacroCount; iMeth++ )
{ {
...@@ -562,26 +563,14 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) ...@@ -562,26 +563,14 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
continue; continue;
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
// Eventuell weiter vorne ? // Eventuell weiter vorne ?
USHORT nStart, nEnd; sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd ); pMethod->GetLineRange( nStart, nEnd );
list< SbMethod* >::iterator itr; aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) );
for ( itr = aMacros.begin(); itr != aMacros.end(); ++itr )
{
USHORT nS, nE;
SbMethod* pM = *itr;
DBG_ASSERT( pM, "Macro nicht in Liste ?!" );
pM->GetLineRange( nS, nE );
if ( nS > nStart ) {
break;
}
}
if ( itr != aMacros.end() ) ++itr;
aMacros.insert( itr, pMethod );
} }
aMacroBox.SetUpdateMode( FALSE ); aMacroBox.SetUpdateMode( FALSE );
for ( list< SbMethod* >::iterator itr = aMacros.begin(); itr != aMacros.end(); ++itr ) for ( map< sal_uInt16, SbMethod* >::iterator it = aMacros.begin(); it != aMacros.end(); ++it )
aMacroBox.InsertEntry( (*itr)->GetName() ); aMacroBox.InsertEntry( (*it).second->GetName() );
aMacroBox.SetUpdateMode( TRUE ); aMacroBox.SetUpdateMode( TRUE );
if ( aMacroBox.GetEntryCount() ) if ( aMacroBox.GetEntryCount() )
......
...@@ -54,6 +54,7 @@ class SfxItemSet; ...@@ -54,6 +54,7 @@ class SfxItemSet;
#include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/script/XLibraryContainer.hpp>
#include <hash_map> #include <hash_map>
#include <vector>
#define LINE_SEP_CR 0x0D #define LINE_SEP_CR 0x0D
#define LINE_SEP 0x0A #define LINE_SEP 0x0A
...@@ -84,14 +85,13 @@ struct BasicStatus ...@@ -84,14 +85,13 @@ struct BasicStatus
struct BreakPoint struct BreakPoint
{ {
BOOL bEnabled; bool bEnabled;
BOOL bTemp; bool bTemp;
ULONG nLine; size_t nLine;
ULONG nStopAfter; size_t nStopAfter;
ULONG nHitCount; size_t nHitCount;
BreakPoint( ULONG nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = TRUE; bTemp = FALSE; }
BreakPoint( size_t nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = true; bTemp = false; }
}; };
class BasicDockingWindow : public DockingWindow class BasicDockingWindow : public DockingWindow
...@@ -109,11 +109,11 @@ public: ...@@ -109,11 +109,11 @@ public:
BasicDockingWindow( Window* pParent ); BasicDockingWindow( Window* pParent );
}; };
DECLARE_LIST( BreakPL, BreakPoint* ) class BreakPointList
class BreakPointList : public BreakPL
{ {
private: private:
void operator =(BreakPointList); // not implemented void operator =(BreakPointList); // not implemented
::std::vector< BreakPoint* > maBreakPoints;
public: public:
BreakPointList(); BreakPointList();
...@@ -127,10 +127,17 @@ public: ...@@ -127,10 +127,17 @@ public:
void transfer(BreakPointList & rList); void transfer(BreakPointList & rList);
void InsertSorted( BreakPoint* pBrk ); void InsertSorted( BreakPoint* pBrk );
BreakPoint* FindBreakPoint( ULONG nLine ); BreakPoint* FindBreakPoint( size_t nLine );
void AdjustBreakPoints( ULONG nLine, BOOL bInserted ); void AdjustBreakPoints( size_t nLine, bool bInserted );
void SetBreakPointsInBasic( SbModule* pModule ); void SetBreakPointsInBasic( SbModule* pModule );
void ResetHitCount(); void ResetHitCount();
size_t size() const;
BreakPoint* at( size_t i );
const BreakPoint* at( size_t i ) const;
BreakPoint* remove( BreakPoint* ptr );
void push_back( BreakPoint* item );
void clear();
}; };
// helper class for sorting TabBar // helper class for sorting TabBar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment