/*!\file * \brief \todo Описание файла. */ /* * FunctionTable.hpp * * Created on: 23 мая 2019 г. * Author: titov */ #ifndef SOURCE_APPLICATION_HARDWARE_FUNCTIONTABLE_HPP_ #define SOURCE_APPLICATION_HARDWARE_FUNCTIONTABLE_HPP_ #include "PeripheralId.hh" #include "PeripheralFactory.hpp" namespace configuration { namespace hardware { template struct FunctionTable { PeripheralFactory::FunctionId operator()( PeripheralId peripheral_id ); }; template PeripheralFactory::FunctionId FunctionTable::operator()( PeripheralId peripheral_id ) { if( peripheral_id < size) return table[peripheral_id]; else return unknow; } }} #endif /* SOURCE_APPLICATION_HARDWARE_FUNCTIONTABLE_HPP_ */