📄 amismodelformatitem.h
字号:
#ifndef Amis_AmisModelFormatItem_h_#define Amis_AmisModelFormatItem_h_#include <amis/ModelFormatLauncher.h>#include <amis/Property.h>AMIS_NAMESPACE_BEGINtemplate < class FormatForLambda, class FormatForAlpha >class AmisModelFormatItem : public ModelFormatLauncherItem {public: AmisModelFormatItem( const std::string& name, const std::string& desc = "" ) : ModelFormatLauncherItem( name, desc ) {} ModelFormatPtr launch( Property* property ) { if ( property->getFeatureWeightType() == LAMBDA ) { return ModelFormatPtr( new FormatForLambda() ); } else if ( property->getFeatureWeightType() == ALPHA ) { return ModelFormatPtr( new FormatForAlpha() ); } else { throw IllegalPropertyError( "Unknown feature type: " + property->getFeatureWeightType() ); } }};AMIS_NAMESPACE_END#endif // Amis_AmisModelFormatItem_h_// end of AmisModelFormatItem.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -