Free Electron
Arena.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 __element_Arena_h__
8 #define __element_Arena_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Arena RecordView
16 
17  @ingroup element
18 *//***************************************************************************/
19 class FE_DL_EXPORT Arena: public RecordView
20 {
21  public:
22  Functor<I32> serial;
23  Functor<Real> time;
24  Functor<Real> deltaT;
25  Functor< sp<RecordGroup> > particles;
26  Functor< sp<Component> > strataI;
27  Functor< sp<Component> > drawI;
28  Functor< sp<Component> > stratumDrawI;
29  Functor< sp<Component> > recordRecorder;
30 
31  Arena(void) { setName("Arena"); }
32 virtual void addFunctors(void)
33  {
34  add(serial, FE_USE(":SN"));
35  add(time, FE_SPEC("sim:time","Absolute time"));
36  add(deltaT, FE_SPEC("sim:timestep","Delta time"));
37 
38  add(particles, FE_USE("op:input"));
39 
40  add(strataI, FE_SPEC("sim:StrataI",
41  "StrataI layered world"));
42  add(drawI, FE_SPEC("ren:DrawI",
43  "DrawI drawing mechanism"));
44  add(stratumDrawI, FE_SPEC("ren:Stratum",
45  "StratumDrawI drawing method"));
46  add(recordRecorder, FE_SPEC("op:recorder",
47  "sp<RecordRecorder>"));
48 
49  }
50 virtual void initializeRecord(void)
51  {
52  particles.createAndSetRecordGroup();
53 
54  time()=0.0f;
55  deltaT()=(1.0f/60.0f);
56  }
57 };
58 
59 } /* namespace ext */
60 } /* namespace fe */
61 
62 #endif /* __element_Arena_h__ */
void createAndSetRecordGroup(void)
Create a RecordGroup for the attribute.
Definition: RecordView.h:258
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
Bindable collection of accessor Functors.
Definition: RecordView.h:106
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Arena.h:50
Arena RecordView.
Definition: Arena.h:19
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Arena.h:32