\hypertarget{class_qore_1_1_breakpoint}{}\doxysection{Qore\+::Breakpoint Class Reference}
\label{class_qore_1_1_breakpoint}\index{Qore::Breakpoint@{Qore::Breakpoint}}


\mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} class supports breakpoint setting for particular Qore \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} when debugging.  




{\ttfamily \#include $<$QC\+\_\+\+Breakpoint.\+dox.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a7550bb9d25be0943578dc1e1d52a3691}\label{class_qore_1_1_breakpoint_a7550bb9d25be0943578dc1e1d52a3691}} 
nothing {\bfseries add\+Thread\+Id} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} tid)
\begin{DoxyCompactList}\small\item\em Add thread ID to the list. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a42c682509d738e31b36766f659088a74}\label{class_qore_1_1_breakpoint_a42c682509d738e31b36766f659088a74}} 
nothing {\bfseries assign\+Program} (\mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} pgm)
\begin{DoxyCompactList}\small\item\em Assign \mbox{\hyperlink{class_qore_1_1_program}{Program}} to breakpoint. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a6ac6bf1c8640823bc29c338559b9566a}\label{class_qore_1_1_breakpoint_a6ac6bf1c8640823bc29c338559b9566a}} 
nothing {\bfseries assign\+Statement} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} statement\+Id)
\begin{DoxyCompactList}\small\item\em Assign breakpoint to a statement. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_ad8757e1a828db69bf8a34a0799e2d298}\label{class_qore_1_1_breakpoint_ad8757e1a828db69bf8a34a0799e2d298}} 
nothing {\bfseries clear\+Thread\+Ids} ()
\begin{DoxyCompactList}\small\item\em Clear list of the thread IDs. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a14453f462754413a02ddbd9a7a116027}\label{class_qore_1_1_breakpoint_a14453f462754413a02ddbd9a7a116027}} 
{\bfseries constructor} ()
\begin{DoxyCompactList}\small\item\em Creates the breakpoint object with notification functions without any functionality. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a97c3de2dbd05c03c0a3972acca81fa22}\label{class_qore_1_1_breakpoint_a97c3de2dbd05c03c0a3972acca81fa22}} 
{\bfseries copy} ()
\begin{DoxyCompactList}\small\item\em Creates copy of breakpoint object. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a03671dcd6b3217524c572094f5162ea9}\label{class_qore_1_1_breakpoint_a03671dcd6b3217524c572094f5162ea9}} 
{\bfseries destructor} ()
\begin{DoxyCompactList}\small\item\em Unlinks from \mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} object and dereferences it. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_breakpoint_a49e8e1566b0f8e289a5b2f49d86032dc}{get\+Breakpoint\+Id}} ()
\begin{DoxyCompactList}\small\item\em Get breakpoint id. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_aef9de18d0340e5b7a07a638b7f7ee232}\label{class_qore_1_1_breakpoint_aef9de18d0340e5b7a07a638b7f7ee232}} 
bool {\bfseries get\+Enabled} ()
\begin{DoxyCompactList}\small\item\em Get enabled state of breakpoint. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_ab323e5638338a6a11940bc5f83c94c8a}\label{class_qore_1_1_breakpoint_ab323e5638338a6a11940bc5f83c94c8a}} 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} {\bfseries get\+Policy} ()
\begin{DoxyCompactList}\small\item\em Get policy how thread list is evaluated. See \mbox{\hyperlink{group__breakpoint__policy__options}{Breakpoint Policy Constants}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} \mbox{\hyperlink{class_qore_1_1_breakpoint_a68760cc4fde41e64496725927e873bcf}{get\+Program}} ()
\begin{DoxyCompactList}\small\item\em Get \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} assigned to the breakpoint. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a59c6d452742ea65bcf5d4f8abad9f4c5}\label{class_qore_1_1_breakpoint_a59c6d452742ea65bcf5d4f8abad9f4c5}} 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} $>$ {\bfseries get\+Statement\+Ids} ()
\begin{DoxyCompactList}\small\item\em Get list of statements. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a25b4b3c252a9f367e45acf2131566ea9}\label{class_qore_1_1_breakpoint_a25b4b3c252a9f367e45acf2131566ea9}} 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} $>$ {\bfseries get\+Thread\+Ids} ()
\begin{DoxyCompactList}\small\item\em Get list of the thread IDs. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a3d30dc49c88708bdcc8e1ff50083bbfb}\label{class_qore_1_1_breakpoint_a3d30dc49c88708bdcc8e1ff50083bbfb}} 
bool {\bfseries is\+Thread\+Id} (softint tid)
\begin{DoxyCompactList}\small\item\em Check if thread is ID in list. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_ac814d0aaf04fe73c0ea9102097bdace6}\label{class_qore_1_1_breakpoint_ac814d0aaf04fe73c0ea9102097bdace6}} 
nothing {\bfseries remove\+Thread\+Id} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} tid)
\begin{DoxyCompactList}\small\item\em Remove thread ID from the list. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a8f71648d83c47d35af708c4ab99e2631}\label{class_qore_1_1_breakpoint_a8f71648d83c47d35af708c4ab99e2631}} 
nothing {\bfseries set\+Enabled} (bool enabled)
\begin{DoxyCompactList}\small\item\em Set enabled state to breakpoint. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_breakpoint_a8443c64a7cfa66558fd6d2cc7d0c262c}{set\+Policy}} (softint policy)
\begin{DoxyCompactList}\small\item\em Defines policy how thread list is evaluated. See \mbox{\hyperlink{group__breakpoint__policy__options}{Breakpoint Policy Constants}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a1e9d0e4f39857d15fafa9fc5a3dde192}\label{class_qore_1_1_breakpoint_a1e9d0e4f39857d15fafa9fc5a3dde192}} 
nothing {\bfseries set\+Thread\+Ids} (softlist$<$ softint $>$ tid\+List)
\begin{DoxyCompactList}\small\item\em Set list of the thread IDs. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a0b6640c2cf250db4f9aa55ae27799769}\label{class_qore_1_1_breakpoint_a0b6640c2cf250db4f9aa55ae27799769}} 
nothing {\bfseries unassign\+Program} ()
\begin{DoxyCompactList}\small\item\em Unassign \mbox{\hyperlink{class_qore_1_1_program}{Program}} from breakpoint and deletes all statement references. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a3dd2b2a4d219c56360e1c7fb8589f399}\label{class_qore_1_1_breakpoint_a3dd2b2a4d219c56360e1c7fb8589f399}} 
nothing {\bfseries unassign\+Statement} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} statement\+Id)
\begin{DoxyCompactList}\small\item\em Unassign breakpoint from statement. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} \mbox{\hyperlink{class_qore_1_1_breakpoint_a6d4bb5bd96b835b0d22f84bb9cdba30c}{resolve\+Breakpoint\+Id}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} breakpoint\+Id)
\begin{DoxyCompactList}\small\item\em Get instance of breakpoint id. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} class supports breakpoint setting for particular Qore \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} when debugging. 

\mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} is assigned to one or more statement. When program flows through it then \mbox{\hyperlink{class_qore_1_1_debug_program}{Debug\+Program}} callback is executed. \mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} activity may be limited to one or more threads.

\begin{DoxyParagraph}{Restrictions\+:}
MUST HAVE\+: \mbox{\hyperlink{group__parse__options_gad0d38cd46f08bf4210d4010204269cc9}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+DEBUGGER}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{ProgramControl p = ProgramControl::getProgram();}
\DoxyCodeLine{.....}
\DoxyCodeLine{Breakpoint b = new Breakpoint();}
\DoxyCodeLine{b.setPolicy(BreakpointPolicyNone);}
\DoxyCodeLine{\textcolor{comment}{\#b.addThreadId(tidToBreak);}}
\DoxyCodeLine{b.setEnabled(\textcolor{keyword}{True});}
\DoxyCodeLine{b.assignStatement(p.findStatementId(fileToBreak, lineToBreak));}
\DoxyCodeLine{b.assignProgram(p);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a49e8e1566b0f8e289a5b2f49d86032dc}\label{class_qore_1_1_breakpoint_a49e8e1566b0f8e289a5b2f49d86032dc}} 
\index{Qore::Breakpoint@{Qore::Breakpoint}!getBreakpointId@{getBreakpointId}}
\index{getBreakpointId@{getBreakpointId}!Qore::Breakpoint@{Qore::Breakpoint}}
\doxysubsubsection{\texorpdfstring{getBreakpointId()}{getBreakpointId()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Breakpoint\+::get\+Breakpoint\+Id (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Get breakpoint id. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a68760cc4fde41e64496725927e873bcf}\label{class_qore_1_1_breakpoint_a68760cc4fde41e64496725927e873bcf}} 
\index{Qore::Breakpoint@{Qore::Breakpoint}!getProgram@{getProgram}}
\index{getProgram@{getProgram}!Qore::Breakpoint@{Qore::Breakpoint}}
\doxysubsubsection{\texorpdfstring{getProgram()}{getProgram()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} Qore\+::\+Breakpoint\+::get\+Program (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Get \mbox{\hyperlink{class_qore_1_1_program_control}{Program\+Control}} assigned to the breakpoint. 

\begin{DoxyParagraph}{Restrictions\+:}
MUST HAVE\+: \mbox{\hyperlink{group__parse__options_gad0d38cd46f08bf4210d4010204269cc9}{Qore\+::\+PO\+\_\+\+ALLOW\+\_\+\+DEBUGGER}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em BREAKPOINT-\/\+ERROR} & if a program is not assigned to \mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} instance \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a6d4bb5bd96b835b0d22f84bb9cdba30c}\label{class_qore_1_1_breakpoint_a6d4bb5bd96b835b0d22f84bb9cdba30c}} 
\index{Qore::Breakpoint@{Qore::Breakpoint}!resolveBreakpointId@{resolveBreakpointId}}
\index{resolveBreakpointId@{resolveBreakpointId}!Qore::Breakpoint@{Qore::Breakpoint}}
\doxysubsubsection{\texorpdfstring{resolveBreakpointId()}{resolveBreakpointId()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} Qore\+::\+Breakpoint\+::resolve\+Breakpoint\+Id (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{breakpoint\+Id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Get instance of breakpoint id. 


\begin{DoxyExceptions}{Exceptions}
{\em BREAKPOINT-\/\+ERROR} & if the breakpoint\+Id cannot identify \mbox{\hyperlink{class_qore_1_1_breakpoint}{Breakpoint}} instance \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_breakpoint_a8443c64a7cfa66558fd6d2cc7d0c262c}\label{class_qore_1_1_breakpoint_a8443c64a7cfa66558fd6d2cc7d0c262c}} 
\index{Qore::Breakpoint@{Qore::Breakpoint}!setPolicy@{setPolicy}}
\index{setPolicy@{setPolicy}!Qore::Breakpoint@{Qore::Breakpoint}}
\doxysubsubsection{\texorpdfstring{setPolicy()}{setPolicy()}}
{\footnotesize\ttfamily nothing Qore\+::\+Breakpoint\+::set\+Policy (\begin{DoxyParamCaption}\item[{softint}]{policy }\end{DoxyParamCaption})}



Defines policy how thread list is evaluated. See \mbox{\hyperlink{group__breakpoint__policy__options}{Breakpoint Policy Constants}}. 


\begin{DoxyExceptions}{Exceptions}
{\em BREAKPOINT-\/\+ERROR} & if policy is wrong value \\
\hline
\end{DoxyExceptions}
