Free Electron
NullViewer.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 __console_NullViewer_h__
8 #define __console_NullViewer_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Non-rendering viewer
17 
18  @ingroup console
19 *//***************************************************************************/
20 class FE_DL_EXPORT NullViewer:
21  public Initialize<NullViewer>,
22  virtual public QuickViewerI
23 {
24  public:
25  NullViewer(void):
26  m_drawName("*.DrawNull")
27  { set(m_center); }
28 virtual ~NullViewer(void) {}
29  void initialize(void);
30 
31  //* As QuickViewerI
32 virtual void bind(sp<DrawI> spDrawI) { m_spDrawI=spDrawI; }
33 virtual sp<DrawI> getDrawI(void) const { return m_spDrawI; }
34 virtual sp<WindowI> getWindowI(void) const
35  { return sp<WindowI>(NULL); }
37  { return sp<CameraControllerI>(NULL); }
38 virtual SpatialVector interestPoint(void) const { return m_center; }
39 virtual SpatialVector auxilliaryPoint(void) const { return m_center; }
40 virtual void insertBeatHandler(sp<HandlerI> spHandlerI) {}
41 virtual void insertEventHandler(sp<HandlerI> spHandlerI) {}
42 virtual void insertDrawHandler(sp<HandlerI> spHandlerI);
43 virtual void open(void) {}
44 virtual void reopen(void) {}
45 virtual void run(U32 frames);
46 virtual Real frameRate(void) const { return 0.0; }
47 
48  protected:
49  String m_drawName;
50 
51  private:
52 
53  sp<DrawI> m_spDrawI;
54  sp<SignalerI> m_spSignalerI;
55  sp<Scope> m_spScope;
56  sp<Layout> m_spBeatLayout;
57  sp<Layout> m_spUnderlayLayout;
58  sp<Layout> m_spRenderLayout;
59  sp<Layout> m_spOverlayLayout;
60  SpatialVector m_center;
61  AsViewer m_asViewer;
62 };
63 
64 } /* namespace ext */
65 } /* namespace fe */
66 
67 #endif /* __console_NullViewer_h__ */
virtual Real frameRate(void) const
Returns frames per seconds.
Definition: NullViewer.h:46
virtual sp< DrawI > getDrawI(void) const
Returns the current DrawI.
Definition: NullViewer.h:33
Non-rendering viewer.
Definition: NullViewer.h:20
virtual void insertEventHandler(sp< HandlerI > spHandlerI)
Add an extra handler for raw event signals.
Definition: NullViewer.h:41
kernel
Definition: namespace.dox:3
virtual void open(void)
Map the viewer to the screen.
Definition: NullViewer.h:43
virtual SpatialVector auxilliaryPoint(void) const
Returns the secondary point.
Definition: NullViewer.h:39
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
virtual sp< WindowI > getWindowI(void) const
Returns the internally-created WindowI.
Definition: NullViewer.h:34
Self-configuring Viewer.
Definition: QuickViewerI.h:20
Automatically reference-counted string container.
Definition: String.h:128
virtual SpatialVector interestPoint(void) const
Returns the center of attention.
Definition: NullViewer.h:38
virtual sp< CameraControllerI > getCameraControllerI(void) const
Returns the current CameraControllerI.
Definition: NullViewer.h:36
SignalerViewerI attributes.
Definition: SignalerViewerI.h:37
virtual void bind(sp< DrawI > spDrawI)
Adopts a DrawI.
Definition: NullViewer.h:32
virtual void insertBeatHandler(sp< HandlerI > spHandlerI)
Add an extra handler for the core heartbeat.
Definition: NullViewer.h:40