00001 #ifndef _RQT_MRTA_ARCHITECTURE_CONFIG_PARAM_FACTORY_H_ 00002 #define _RQT_MRTA_ARCHITECTURE_CONFIG_PARAM_FACTORY_H_ 00003 00004 #include <ros/console.h> 00005 #include "rqt_mrta/config/param.h" 00006 #include "rqt_mrta/config/params.h" 00007 #include "rqt_mrta/config/params_array.h" 00008 00009 namespace rqt_mrta 00010 { 00011 namespace config 00012 { 00013 class ParamFactory 00014 { 00015 public: 00016 static ParamInterface* newInstance(const QString& group_name, Params* parent = NULL) 00017 { 00018 ParamInterface* param = NULL; 00019 if (group_name.startsWith("param_")) 00020 { 00021 param = new Param(parent); 00022 } 00023 else if (group_name.startsWith("params_")) 00024 { 00025 param = new Params(parent); 00026 } 00027 else if (group_name.startsWith("array_")) 00028 { 00029 param = new ParamsArray(parent); 00030 } 00031 return param; 00032 } 00033 }; 00034 } 00035 } 00036 00037 #endif // _RQT_MRTA_ARCHITECTURE_CONFIG_PARAM_FACTORY_H_