Free Electron
SignalerViewerI.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 __viewer_SignalerViewerI_h__
8 #define __viewer_SignalerViewerI_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 //* TODO move token method implementations to a ViewerBase
16 
17 /**************************************************************************//**
18  @brief Simple viewer interface
19 
20  @ingroup viewer
21 *//***************************************************************************/
22 class FE_DL_EXPORT SignalerViewerI:
23  virtual public ViewerI,
24  public CastableAs<SignalerViewerI>
25 {
26  public:
27 virtual void insertBeatHandler(sp<HandlerI> spHandlerI) {}
28 virtual void insertEventHandler(sp<HandlerI> spHandlerI) {}
29 virtual void insertDrawHandler(sp<HandlerI> spHandlerI) {}
30 
31  /// Send signals for one frame
32 virtual void render(Real a_time,Real a_timestep) =0;
33 };
34 
35 /** SignalerViewerI attributes
36  */
37 class FE_DL_EXPORT AsViewer:
38  public AsTemporal,
39  public Initialize<AsViewer>
40 {
41  public:
42  void initialize(void)
43  {
44  add(viewer_layer, FE_USE("viewer:layer"));
45  add(viewer_spatial, FE_USE("viewer:spatial"));
46  add(render_draw, FE_USE("ren:DrawI"));
47  }
48  /// rendering layer
50  /// 1 if rendering in 3D (vs overlay/underlay)
52  Accessor< sp<Component> > render_draw;
53 };
54 
55 } /* namespace ext */
56 } /* namespace fe */
57 
58 #endif /* __viewer_SignalerViewerI_h__ */
Simple viewer interface.
Definition: SignalerViewerI.h:22
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Simple viewer interface.
Definition: ViewerI.h:22
Time-based Operator.
Definition: datatoolAS.h:73
Accessor< I32 > viewer_spatial
1 if rendering in 3D (vs overlay/underlay)
Definition: SignalerViewerI.h:51
Accessor< I32 > viewer_layer
rendering layer
Definition: SignalerViewerI.h:49
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
SignalerViewerI attributes.
Definition: SignalerViewerI.h:37
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192