Example #1
0
template<> std::string toString<Curve>(const Curve& c){
	std::stringstream str;
	str << "[\n";
	for(int i = 0; i < c.size(); i++){
		if(i != 0){
			str << ",\n";
		}
		auto& e = c.at(i);
		str << "{\n\t" << "\"start\": " << "[" << e.start.x << ", " << e.start.y << "],\n";
		str << "\t" << "\"end\": " << "[" << e.end.x << ", " << e.end.y << "],\n";
		str << "\t" << "\"paramA\": " << e.paramA <<",\n";
		str << "\t" << "\"paramB\": " << e.paramB <<",\n";
		str << "\t" << "\"repetition\": " << e.repetition << ",\n";
		str << "\t" << "\"step\": " << e.step << "\n";
		str << "}";
	}
	str << "\n]";
	return str.str();
}