AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
The class Parameter is used to implement DRAMA parameters containing primitive items.
This Template Specialization is provided to extra support to structured SDS parameters.
A task will create an object of this type to create a structured SDS parameter.
An example of the user of this class is shown below.
class MyTaskClass : public drama::Task { public: drama::Parameter<drama::sds::Id> my_par; // Declare structured parameter ... drama::sds::Id CreateParam() { // Create SDS structured parameter } // Task Constructor - creates parameter. MyTaskClass() : drama::Task("MYTASKNAME"), my_par(TaskPtr(), CreateParam()) { ... // Read parameter drama::sds::Id parVal = my_par.Get(). // Write parameter. my_par.Set(parVal); ... } };
#include "parameter.hh"
Public Types | |
typedef Parameter< drama::sds::Id > | class_type |
The type of this template instantiation. | |
Public Member Functions | |
Parameter (std::weak_ptr< Task > task, const std::string &name, const sds::IdPtr &initVal, bool copy=true) | |
Construct a parameter of a given name. | |
virtual | ~Parameter () |
Parameter Destructor. | |
sds::Id | Get () const |
Access the parameter. | |
void | Set (const sds::IdPtr &newVal, bool copy=true, bool create=false) |
Set the value of this parameter. | |
void | UpdateMonitors () const |
Trigger any monitors of this parameter. | |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Dec 12 2024 23:07:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8