LibreOffice Module basctl (master) 1
breakpoint.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <cstddef>
23#include <vector>
24
25#include <sal/types.h>
26
27class SbModule;
28
29namespace basctl
30{
32{
34 sal_uInt16 nLine;
35 size_t nStopAfter;
36 size_t nHitCount;
37
38 explicit BreakPoint(sal_uInt16 nL)
39 : bEnabled(true)
40 , nLine(nL)
41 , nStopAfter(0)
42 , nHitCount(0)
43 {
44 }
45};
46
48{
49private:
51 std::vector<BreakPoint> maBreakPoints;
52
53public:
55
56 BreakPointList(BreakPointList const& rList);
57
59
60 void reset();
61
62 void transfer(BreakPointList& rList);
63
64 void InsertSorted(BreakPoint pBrk);
65 BreakPoint* FindBreakPoint(sal_uInt16 nLine);
66 void AdjustBreakPoints(sal_uInt16 nLine, bool bInserted);
67 void SetBreakPointsInBasic(SbModule* pModule);
68 void ResetHitCount();
69
70 size_t size() const;
71 BreakPoint& at(size_t i);
72 const BreakPoint& at(size_t i) const;
73 void remove(const BreakPoint* ptr);
74 void remove(size_t i);
75};
76
77} // namespace basctl
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void InsertSorted(BreakPoint pBrk)
Definition: breakpoint.cxx:52
size_t size() const
Definition: breakpoint.cxx:141
void transfer(BreakPointList &rList)
Definition: breakpoint.cxx:47
void SetBreakPointsInBasic(SbModule *pModule)
Definition: breakpoint.cxx:66
BreakPointList & operator=(BreakPointList const &)=delete
void remove(const BreakPoint *ptr)
Definition: breakpoint.cxx:127
std::vector< BreakPoint > maBreakPoints
Definition: breakpoint.hxx:51
void AdjustBreakPoints(sal_uInt16 nLine, bool bInserted)
Definition: breakpoint.cxx:87
BreakPoint * FindBreakPoint(sal_uInt16 nLine)
Definition: breakpoint.cxx:77
BreakPoint & at(size_t i)
Definition: breakpoint.cxx:146
BreakPoint(sal_uInt16 nL)
Definition: breakpoint.hxx:38
sal_uInt16 nLine
Definition: breakpoint.hxx:34