AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
Public Types | Public Member Functions | List of all members
drama::Parameter< drama::sds::Id > Class Reference

Detailed Description

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);
       ...
     }
   };

Author
Tony Farrell, AAO $Revision$ $Date$

#include "parameter.hh"

Public Types

typedef Parameter< drama::sds::Idclass_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.
 

The documentation for this class was generated from the following file: