Free Electron
Foundry.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 __intelligence_Foundry_h__
8 #define __intelligence_Foundry_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Foundry RecordView
16 
17  @ingroup intelligence
18 *//***************************************************************************/
19 class FE_DL_EXPORT Foundry: public Scanner
20 {
21  public:
22  Functor<String> design;
23  Functor<String> nextDesign;
24  Functor< sp<RecordGroup> > prototype;
25 
26  Foundry(void) { setName("Foundry"); }
27 virtual void addFunctors(void)
28  {
30 
31  add(design, FE_SPEC("ai:design",
32  "Name of a RG file to construct"));
33  add(nextDesign, FE_SPEC("ai:nextDesign",
34  "Next RG file to construct"));
35  add(prototype, FE_SPEC("ai:prototype",
36  "RecordGroup to be duplicated"));
37  }
38 virtual void initializeRecord(void)
39  {
41 
42  identifier()="Foundry";
43 
44  Observation observationRV;
45  observationRV.bind(scope());
46  purview()=observationRV.createRecord();
47  observationRV.observer()=record();
48 
49  Sphere sphereRV;
50  sphereRV.bind(scope());
51  observationRV.shape()=sphereRV.createRecord();
52 
53  sphereRV.radius()=2.0f;
54  }
55 };
56 
57 } /* namespace ext */
58 } /* namespace fe */
59 
60 #endif /* __intelligence_Foundry_h__ */
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: lab/intelligence/Scanner.h:36
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Foundry.h:38
void bind(sp< Scope > &rspScope)
Associate with a Scope.
Definition: RecordView.h:319
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
Scanner RecordView.
Definition: lab/intelligence/Scanner.h:19
Observation RecordView.
Definition: Observation.h:22
Record createRecord(void)
Create a Record using all the attributes.
Definition: RecordView.h:469
Foundry RecordView.
Definition: Foundry.h:19
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Foundry.h:27
Sphere RecordView.
Definition: Sphere.h:28
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: lab/intelligence/Scanner.h:65