Free Electron
AsViewport.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 #pragma once
8 
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**
15  * Accessor Set for a viewport.
16  */
17 class FE_DL_EXPORT AsViewport :
18  public AccessorSet,
19  public Initialize<AsViewport>
20 {
21 public:
22  void initialize()
23  {
24  add(draw, FE_USE("draw"));
25  add(threadId, FE_USE("threadId"));
26  }
27 
28  /**
29  * Draw Interface for actually drawing stuff.
30  *
31  * This is intentionally a weak pointer.
32  * Systems are notified when a viewport
33  * is removed and they MUST react accordingly to stop using the draw.
34  */
36 
37  /** Thread id that this viewport runs in. */
39 };
40 
41 } /* namespace ext */
42 } /* namespace fe */
Set of accessors.
Definition: AccessorSet.h:18
Accessor Set for a viewport.
Definition: AsViewport.h:17
Accessor< std::thread::id > threadId
Thread id that this viewport runs in.
Definition: AsViewport.h:38
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
The main data access class for the data system.
Definition: Accessor.h:128
Accessor< hp< DrawI > > draw
Draw Interface for actually drawing stuff.
Definition: AsViewport.h:35