X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAutopilot%2Fanalogcomponent.hxx;h=852f7432a76d0b78fde1d723f24507219a4c3039;hb=ec2baa1a418b2ba4e45f745ee76d88801feb7e72;hp=ccbd099b61d206169ae0932d8d064891a6d50ff1;hpb=0bce31ae9a80c571b9126427c093b8dc3d3f6820;p=flightgear.git diff --git a/src/Autopilot/analogcomponent.hxx b/src/Autopilot/analogcomponent.hxx index ccbd099b6..852f7432a 100644 --- a/src/Autopilot/analogcomponent.hxx +++ b/src/Autopilot/analogcomponent.hxx @@ -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() );