Free Electron
OperatorThreaded.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __operate_OperatorThreaded_h__
8 #define __operate_OperatorThreaded_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Handler to move curves away from a collider
17 
18  @ingroup operate
19 *//***************************************************************************/
20 class FE_DL_EXPORT OperatorThreaded:
21  public OperatorSurfaceCommon,
22  public Initialize<OperatorThreaded>,
23  virtual public WorkI
24 {
25  public:
26 
27  OperatorThreaded(void) {}
28 virtual ~OperatorThreaded(void) {}
29 
30  void initialize(void);
31 
32  using OperatorSurfaceCommon::accessOutput;
33 
34  BWORD accessOutput(
35  sp<SurfaceAccessibleI>& a_rspAccessible,
36  Record& a_rSignal,
37  Message a_message=e_error);
38 
39  //* As WorkI
40 virtual WorkI::Threading threading(void)
41  {
42  FEASSERT(m_spThreadingState.isValid());
43  return WorkI::Threading(
44  m_spThreadingState->threading());
45  }
46 virtual void setThreading(WorkI::Threading a_threading)
47  {
48  FEASSERT(m_spThreadingState.isValid());
49  m_spThreadingState->set(
50  SurfaceAccessibleI::Threading(
51  a_threading));
52  }
53 virtual void run(I32 a_id,sp<SpannedRange> a_spSpannedRange) {}
54 virtual void run(I32 a_id,sp<SpannedRange> a_spSpannedRange,
55  String a_stage)
56  { run(a_id,a_spSpannedRange); }
57 
58  //* As HandlerI
59 virtual void handle(Record& a_rSignal);
60 
61  sp<SpannedRange> fullRange(void) { return m_spFullRange; }
62  void setFullRange(sp<SpannedRange> a_spRange);
63  void setNonAtomicRange(I32 a_start,I32 a_end);
64  void setAtomicRange(
66  a_spSurfaceAccessibleI,
67  OperatorSurfaceCommon::AtomicChange
68  a_atomicChange,
69  String a_group="");
70 
71  protected:
72  void adjustThreads(void);
73  void runStage(String a_stage);
74 
75  private:
76  sp<WorkForceI> m_spWorkForceI;
77  sp<SpannedRange> m_spFullRange;
78 };
79 
80 } /* namespace ext */
81 } /* namespace fe */
82 
83 #endif /* __operate_OperatorThreaded_h__ */
84 
Handler to move curves away from a collider.
Definition: OperatorThreaded.h:20
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Automatically reference-counted string container.
Definition: String.h:128
Partial Generic SurfaceI Implemention.
Definition: OperatorSurfaceCommon.h:20
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Execute a Range.
Definition: WorkI.h:20