Commit 3d29139f authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

get_obase(): return const string.

parent e9f50213
Pipeline #11460 passed with stages
in 15 minutes and 59 seconds
......@@ -467,12 +467,12 @@ Process::get_argv(int p_idx)
return m_oargv[p_idx];
}
std::string
const std::string
Process::get_obase()
{
return m_obase;
}
int Process::get_id(){
return m_ID;
return m_ID;
}
......@@ -141,8 +141,8 @@ public:
const char *get_out_stream_name();
size_t get_oper_argc();
std::string get_argv(int idx);
std::string get_obase();
void set_obase(std::string &obase){m_obase = obase;} //TODO into cc
const std::string get_obase();
void set_obase(const std::string &obase){m_obase = obase;} //TODO into cc
bool input_is_variable();
int get_id();
......@@ -151,11 +151,6 @@ public:
private:
Process();
void def_prompt();
/**
* Splits the operator arguments stores them.
* Operator arguments are stored as char arrays and appended with a zero termination.
*/
void set_operator_argv(std::string operatorArguments);
};
int get_process_num();
......
......@@ -96,10 +96,10 @@ const std::shared_ptr<Process>
ProcessManager::create_process_from_command(const std::string &command)
{
Debug(PROCESS_MANAGER, "Creating new process for command: %s with ID: %d ", command, m_numProcesses);
int processID = m_numProcesses++;
const auto processID = m_numProcesses++;
const std::string operatorName = extract_operator_name(command);
const std::vector<std::string> arguments = get_operator_argv(command);
const auto operatorName = extract_operator_name(command);
const auto arguments = get_operator_argv(command);
auto success = m_processes.insert(std::make_pair(processID, std::make_shared<Process>(processID, operatorName, arguments)));
if (!success.second) cdo_abort("Process %d could not be created", processID);
......@@ -256,12 +256,12 @@ get_stack_as_string(std::stack<std::shared_ptr<Process>> p_stack)
std::vector<std::string>
ProcessManager::get_operator_argv(std::string operatorArguments)
{
std::vector<std::string> argument_vector;
std::vector<std::string> argument_vector;
Debug(PROCESS && strchr(operatorArguments.c_str(), ',') != nullptr, "Setting operator arguments: %s", operatorArguments);
char delimiter = ',';
constexpr char delimiter = ',';
size_t pos = operatorArguments.find(delimiter);
auto pos = operatorArguments.find(delimiter);
if (pos != std::string::npos)
{
// remove operator name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment