Skip to content

Commit 5f77974

Browse files
committed
Added the ability to retrieve the current instrumentation function.
1 parent 4f094a8 commit 5f77974

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

FSM/FiniteStateMachine.hh

+12-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ namespace Core
708708
State * ReplaceState(
709709
StateID state_id,
710710
State *state,
711-
const std::string & state_name
711+
const std::string & state_name = ""
712712
)
713713
{
714714
assert( state != nullptr );
@@ -1209,6 +1209,17 @@ namespace Core
12091209
instrumentation = func;
12101210
}
12111211

1212+
/**
1213+
* Returns the current instrumentation function. Enables access to a
1214+
* base class' instrumentation to augment it.
1215+
*
1216+
* @return The existing instrumentation (which could be null).
1217+
*/
1218+
InstrumentationFunction Instrument()
1219+
{
1220+
return instrumentation;
1221+
}
1222+
12121223

12131224
private :
12141225
StateID previous_state; /// The state prior to the current one.

0 commit comments

Comments
 (0)