Free Electron
Behavior.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_Behavior_h__
8 #define __intelligence_Behavior_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Behavior RecordView
16 
17  @ingroup intelligence
18 *//***************************************************************************/
19 class FE_DL_EXPORT Behavior: public Periodic
20 {
21  public:
22  Functor< hp<Component> > behaviorHandle;
23  Functor<String> behaviorName;
24  Functor<I32> serial;
25 
26  Behavior(void) { setName("Behavior"); }
27 virtual void addFunctors(void)
28  {
30 
31  add(behaviorHandle, FE_SPEC("ai:hpBehavior",
32  "hp<Component> to Behavior"));
33  add(behaviorName, FE_SPEC("ai:behaviorName",
34  "Behavior name (may indicate a class or script)"));
35  add(serial, FE_USE(":SN"));
36  }
37 virtual void initializeRecord(void)
38  {
40 
41  behaviorHandle.attribute()->setSerialize(FALSE);
42  }
43 };
44 
45 } /* namespace ext */
46 } /* namespace fe */
47 
48 #endif /* __intelligence_Behavior_h__ */
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Behavior.h:27
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
Behavior RecordView.
Definition: Behavior.h:19
Periodic RecordView.
Definition: Periodic.h:19
sp< Attribute > attribute(void) const
Return the attribute this accessor is for.
Definition: Accessor.cc:151
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Behavior.h:37
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Periodic.h:36
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Periodic.h:27