@@ -257,46 +257,71 @@ a derived class with a possibly long running :any:`run`. These common tasks
257257This class inherits from :any:`Reporter`.
258258)pbdoc" );
259259
260- py::enum_<Runner::state> state (m, " Runner.state" , R"pbdoc(
261- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
262- has been called since construction or the last call to :any:`init`.
263- )pbdoc" );
264- state
265- .value (" never_run" , Runner::state::never_run, R"pbdoc(
266- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
267- has been called since construction or the last call to :any:`init`.
268- )pbdoc" )
269- .value (" running_to_finish" , Runner::state::running_to_finish, R"pbdoc(
270- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
271- has been called since construction or the last call to :any:`init`.
272- )pbdoc" )
273- .value (" running_for" , Runner::state::running_for, R"pbdoc(
274- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
275- has been called since construction or the last call to :any:`init`.
276- )pbdoc" )
277- .value (" running_until" , Runner::state::running_until, R"pbdoc(
278- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
279- has been called since construction or the last call to :any:`init`.
280- )pbdoc" )
281- .value (" timed_out" , Runner::state::timed_out, R"pbdoc(
282- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
283- has been called since construction or the last call to :any:`init`.
284- )pbdoc" )
285- .value (" stopped_by_predicate" ,
286- Runner::state::stopped_by_predicate,
287- R"pbdoc(
288- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
289- has been called since construction or the last call to :any:`init`.
290- )pbdoc" )
291- .value (" not_running" , Runner::state::not_running, R"pbdoc(
292- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
293- has been called since construction or the last call to :any:`init`.
294- )pbdoc" )
295- .value (" dead" , Runner::state::dead, R"pbdoc(
296- Indicates that none of :any:`run`, :any:`run_for`, or :any:`run_until`
297- has been called since construction or the last call to :any:`init`.
260+ py::options options;
261+ options.disable_enum_members_docstring ();
262+ py::enum_<Runner::state> state (thing, " state" , R"pbdoc(
263+ The values in this enum are used to indicate the state of a runner.
264+
265+ The valid values are:
266+
267+ .. py:attribute:: state.never_run
268+ :value: <state.never_run: 0>
269+
270+ Indicates that none of :any:`Runner.run`, :any:`Runner.run_for`, or
271+ :any:`Runner.run_until` has been called since construction or the last call
272+ to :any:`Runner.init`.
273+
274+ .. py:attribute:: state.running_to_finish
275+ :value: <state.running_to_finish: 1>
276+
277+ Indicates that the Runner is currently running to the finish (via
278+ :any:`Runner.run`).
279+
280+ .. py:attribute:: state.running_for
281+ :value: <state.running_for: 2>
282+
283+ Indicates that the Runner is currently running for a specific amount of time
284+ (via :any:`Runner.run_for`).
285+
286+ .. py:attribute:: state.running_until
287+ :value: <state.running_until: 3>
288+
289+ Indicates that the Runner is currently running until some condition is met
290+ (via :any:`Runner.run_until`).
291+
292+ .. py:attribute:: state.timed_out
293+ :value: <state.timed_out: 4>
294+
295+ Indicates that the Runner was run via :any:`Runner.run_for` for a specific
296+ amount of time and that time has elapsed.
297+
298+ .. py:attribute:: state.stopped_by_predicate
299+ :value: <state.stopped_by_predicate: 6>
300+
301+ Indicates that the Runner was run via :any:`Runner.run_until` until the
302+ condition specified by the argument to :any:`Runner.run_until` was met.
303+
304+ .. py:attribute:: state.not_running
305+ :value: <state.not_running: 7>
306+
307+ Indicates that the Runner is not in any of the previous states and is not
308+ currently running. This can occur when, for example, :any:`Runner.run`
309+ throws an exception.
310+
311+ .. py:attribute:: state.dead
312+ :value: <state.dead: 8>
313+
314+ Indicates that the Runner was killed (by another thread).
298315)pbdoc" );
299- thing.attr (" state" ) = state;
316+ state.value (" never_run" , Runner::state::never_run)
317+ .value (" running_to_finish" , Runner::state::running_to_finish)
318+ .value (" running_for" , Runner::state::running_for)
319+ .value (" running_until" , Runner::state::running_until)
320+ .value (" timed_out" , Runner::state::timed_out)
321+ .value (" stopped_by_predicate" , Runner::state::stopped_by_predicate)
322+ .value (" not_running" , Runner::state::not_running)
323+ .value (" dead" , Runner::state::dead);
324+
300325 thing.def (
301326 " init" ,
302327 [](Runner& r) -> Runner& { return r.init (); },
@@ -336,7 +361,7 @@ any derived class of :any:`Runner`.
336361
337362.. seealso:: :any:`run_for`)pbdoc" );
338363 thing.def (" run_until" ,
339- (void (Runner::*)(std::function<bool ()>&)) &Runner::run_until,
364+ (void (Runner::*)(std::function<bool ()>&)) & Runner::run_until,
340365 py::arg (" func" ),
341366 R"pbdoc(
342367Run until a nullary predicate returns true or finished.
0 commit comments