mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-09 21:35:28 -05:00
Added csv parameter listing to get_global_parameter
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -748,6 +748,10 @@ std::string get_global_param_string(std::string ParamName)
|
||||
else if (!ParamName.compare("FluidsList") || !ParamName.compare("fluids_list") || !ParamName.compare("fluidslist")){
|
||||
return get_fluid_list();
|
||||
}
|
||||
else if (!ParamName.compare("parameter_list") )
|
||||
{
|
||||
return get_csv_parameter_list();
|
||||
}
|
||||
else{
|
||||
return format("Input value [%s] is invalid",ParamName.c_str()).c_str();
|
||||
}
|
||||
|
||||
@@ -120,6 +120,16 @@ std::string get_parameter_information(int key, std::string info)
|
||||
}
|
||||
}
|
||||
|
||||
/// Return a list of parameters
|
||||
std::string get_csv_parameter_list()
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
for(std::map<std::string,int>::iterator it = parameter_info.index_map.begin(); it != parameter_info.index_map.end(); ++it )
|
||||
{
|
||||
strings.append(it->first);
|
||||
}
|
||||
return strjoin(strings, ",");
|
||||
}
|
||||
int get_parameter_index(const std::string ¶m_name)
|
||||
{
|
||||
std::map<std::string, int>::iterator it;
|
||||
|
||||
Reference in New Issue
Block a user