/* * ApplySetting.hpp * * Created on: 7 èþë. 2020 ã. * Author: LeonidTitov */ #ifndef UMLIBRARY_SYSTEMIC_APPLYSETTING_HPP_ #define UMLIBRARY_SYSTEMIC_APPLYSETTING_HPP_ #include "IFunctor.hh" namespace systemic { template class ApplySetting : public IFunctor { Object & object; typename Object::Setting & config; public: void operator()(); ApplySetting( Object & object, typename Object::Setting & config ) : object(object), config(config) {} }; } template inline void systemic::ApplySetting::operator ()() { if( config.isValid() ) object.configure( config ); } #endif /* UMLIBRARY_SYSTEMIC_APPLYSETTING_HPP_ */