LRAUV  revA
Assign.h
Go to the documentation of this file.
1 
9 #ifndef TOUCH_H_
10 #define TOUCH_H_
11 
12 #include "component/Behavior.h"
13 
14 class DataWriter;
15 class MissionItem;
16 class MissionNode;
17 class ValueClause;
18 
24 class Assign: public Behavior
25 {
26 public:
27  static Assign* Instance( MissionNode* node, const Str& itemName, MissionItem* missionItem, Logger& logger );
28  virtual ~Assign();
29  virtual void initialize();
30  virtual void run();
31  virtual bool runIfUnsatisfied();
32  virtual void uninitialize();
33 
34 protected:
35 
36  friend class Aggregate;
37 
39  Assign( const Str& name, const ElementURI& uri, ValueClause* valueClause = NULL, bool ignoreTouch = true );
40 
43 
46 
49 
51  bool firstRun_;
52 
53 private:
54  // Note that the copy constructor below is private and not given a body.
55  // Any attempt to call it will return a compiler error.
56  Assign( const Assign& old ); // disallow copy constructor
57 };
58 
59 #endif /* TOUCH_H_ */
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
Wraps a Behavior or Aggregate with mission-specific settings pertaining to that item.
Definition: MissionItem.h:31
Collections of Behaviors (including other Aggregates) that make up a larger Behavior within a mission...
Definition: Aggregate.h:27
bool firstRun_
Initially true, then false after the first run.
Definition: Assign.h:51
virtual void initialize()
Provide a space for initialization before being run.
Definition: Assign.cpp:113
Behavior is the abstract base class for components that implement mission behaviors and commands...
Definition: Behavior.h:32
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
A ValueClause is a set of boolean conditions that may be specified as conditions for executing (or st...
Definition: ValueClause.h:26
virtual ~Assign()
Definition: Assign.cpp:101
Contains the Behavior class definition.
Wraps a TiXmlNode.
Definition: MissionNode.h:20
Replacement for standard template class string.
Definition: Str.h:12
Behavior that is embedded in scripted code within a mission file.
Definition: Assign.h:24
Assign(const Str &name, const ElementURI &uri, ValueClause *valueClause=NULL, bool ignoreTouch=true)
Protected constructor.
Definition: Assign.cpp:155
DataWriter * writer_
The writer whose timestamp is set;.
Definition: Assign.h:42
virtual bool runIfUnsatisfied()
Combined run and test Called by mission element: behaviorDone_.
Definition: Assign.cpp:143
ValueClause * valueClause_
Reads the valueClause, if any.
Definition: Assign.h:45
Code unit that represents a unique name for a DataElement.
Definition: ElementURI.h:27
virtual void run()
The actual "payload" of the component.
Definition: Assign.cpp:118
bool ignoreTouch_
If true, don't check if values have changed since last run.
Definition: Assign.h:48
static Assign * Instance(MissionNode *node, const Str &itemName, MissionItem *missionItem, Logger &logger)
Definition: Assign.cpp:17
virtual void uninitialize()
Provide a space for uninitialization.
Definition: Assign.cpp:150