]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/analogcomponent.hxx
Merge commit 'refs/merge-requests/1579' of git://gitorious.org/fg/flightgear into...
[flightgear.git] / src / Autopilot / analogcomponent.hxx
index ccbd099b61d206169ae0932d8d064891a6d50ff1..852f7432a76d0b78fde1d723f24507219a4c3039 100644 (file)
@@ -83,14 +83,17 @@ protected:
     AnalogComponent();
 
     /**
-     * @brief This method configures this analog component from a property node. Gets
-     *        called multiple times from the base class configure method for every 
-              config node.
-     * @param nodeName the name of the configuration node provided in configNode
-     * @param configNode the configuration node itself
+     * @brief This method configures this analog component from a property node.
+     *        Gets called multiple times from the base class configure method
+     *        for every configuration node.
+     * @param cfg_name  Name of the configuration node provided in cfg_node
+     * @param cfg_node  Configuration node itself
+     * @param prop_root Property root for all relative paths
      * @return true if the node was handled, false otherwise.
      */
-    virtual bool configure( const std::string & nodeName, SGPropertyNode_ptr configNode );
+    virtual bool configure( SGPropertyNode& cfg_node,
+                            const std::string& cfg_name,
+                            SGPropertyNode& prop_root );
 
     /**
      * @brief clamp the given value if <min> and/or <max> inputs were given
@@ -115,7 +118,7 @@ protected:
      * values of <min> and/or <max>. 
      */
     inline double get_output_value() const {
-      return _output_list.size() == 0 ? 0.0 : clamp(_output_list[0]->getDoubleValue());
+      return _output_list.empty() ? 0.0 : clamp(_output_list[0]->getDoubleValue());
     }
 
     simgear::PropertyList _output_list;
@@ -133,11 +136,14 @@ protected:
              it != _output_list.end(); ++it)
           (*it)->setDoubleValue( value );
     }
+
+public:
+    const PeriodicalValue * getPeriodicalValue() const { return _periodical; }
 };
 
 inline void AnalogComponent::disabled( double dt )
 {
-  if( _feedback_if_disabled && _output_list.size() > 0 ) {    
+  if( _feedback_if_disabled && ! _output_list.empty() ) {    
     InputValue * input;
     if( (input = _valueInput.get_active() ) != NULL )
       input->set_value( _output_list[0]->getDoubleValue() );