Free Electron
Matter.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_Matter_h__
8 #define __intelligence_Matter_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Matter RecordView
16 
17  @ingroup intelligence
18 *//***************************************************************************/
19 class FE_DL_EXPORT Matter: public Particle
20 {
21  public:
22  typedef enum
23  {
24  e_null= 0x00,
25  e_discard= 0x01
26  } Flags;
27 
28  Functor<String> identifier;
29  Functor<WeakRecord> pattern;
30  Functor<I32> flags;
31  Functor<F32> metal;
32  Functor<F32> fuel;
33  Functor<F32> gem;
34 
35  Matter(void) { setName("Matter"); }
36 virtual void addFunctors(void)
37  {
39 
40  add(identifier, FE_SPEC("comp:identifier",
41  "Readable non-unique identifier"));
42  add(pattern, FE_SPEC("comp:pattern",
43  "What this Record wants to be like"));
44  add(flags, FE_SPEC("comp:flags",
45  "Bit-wise flags"));
46  add(metal, FE_SPEC("comp:metal",
47  "Mass of structural content"));
48  add(fuel, FE_SPEC("comp:fuel",
49  "Mass of combustible content"));
50  add(gem, FE_SPEC("comp:gem",
51  "Mass of computing content"));
52  }
53 virtual void initializeRecord(void)
54  {
56 
57  identifier()="Matter";
58  flags()=e_null;
59  metal()=0.0f;
60  fuel()=0.0f;
61  gem()=0.0f;
62  }
63 };
64 
65 } /* namespace ext */
66 } /* namespace fe */
67 
68 #endif /* __intelligence_Matter_h__ */
69 
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Matter.h:36
Matter RecordView.
Definition: Matter.h:19
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Particle.h:30
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Particle.h:45
Particle RecordView.
Definition: Particle.h:19
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Matter.h:53