Free Electron
Rod.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_Rod_h__
8 #define __element_Rod_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Rod RecordView
16 
17  @ingroup element
18 *//***************************************************************************/
19 class FE_DL_EXPORT Rod: public RecordView
20 {
21  public:
22  Functor<F32> length;
23  Functor<Record> particle1;
24  Functor<Record> particle2;
25  Functor<WeakRecord> pattern;
26  Functor<I32> serial;
27 
28  Rod(void) { setName("Rod"); }
29 virtual void addFunctors(void)
30  {
31  add(length, FE_SPEC("pair:distance",
32  "Separation of two Records"));
33  add(particle1, FE_SPEC("pair:left",
34  "First Record of a pair"));
35  add(particle2, FE_SPEC("pair:right",
36  "Second Record of a pair"));
37  add(pattern, FE_USE("comp:pattern"));
38  add(serial, FE_USE(":SN"));
39  }
40 virtual void initializeRecord(void)
41  {
42  length()=1.0f;
43  }
44 };
45 
46 } /* namespace ext */
47 } /* namespace fe */
48 
49 #endif /* __element_Rod_h__ */
Rod RecordView.
Definition: Rod.h:19
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Rod.h:40
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Rod.h:29
Bindable collection of accessor Functors.
Definition: RecordView.h:106