21 lines
432 B
C++
21 lines
432 B
C++
|
#include <iostream>
|
||
|
#include <sstream>
|
||
|
#include "command.hpp"
|
||
|
|
||
|
using namespace stela;
|
||
|
|
||
|
std::string Command::to_string() const
|
||
|
{
|
||
|
std::stringstream s;
|
||
|
s << "name = [" << this->m_name << "], ";
|
||
|
s << "arguments = [";
|
||
|
for(int i = 0; i < this->arguments.size(); i++) {
|
||
|
s << this->arguments[i];
|
||
|
if(i < this->arguments.size() - 1) {
|
||
|
s << ", ";
|
||
|
}
|
||
|
}
|
||
|
s << "]";
|
||
|
return s.str();
|
||
|
}
|