50 #ifdef CHECK_MEMORY_LEAKS
52 #endif // CHECK_MEMORY_LEAKS
73 if (name ==
"stdout") {
75 }
else if (name ==
"stderr") {
82 throw IOError(
"Given port number '" + name.substr(name.find(
":") + 1) +
"' is not numeric.");
84 throw IOError(
"No port number given.");
87 const size_t len = name.length();
91 dev->
getOStream() << std::setiosflags(std::ios::fixed);
99 const std::string& rootElement) {
104 if (rootElement !=
"") {
105 if (rootElement ==
"routes" || rootElement ==
"netstate") {
106 dev.
writeXMLHeader(rootElement,
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/" + rootElement +
"_file.xsd\"");
118 if (myOutputDevices.find(devName) == myOutputDevices.end()) {
119 throw InvalidArgument(
"Device '" + devName +
"' has not been created.");
136 std::ostringstream oss;
140 if (v < pow(10., -precision)) {
141 oss.setf(std::ios::scientific, std::ios::floatfield);
143 oss.setf(std::ios::fixed , std::ios::floatfield);
144 oss.setf(std::ios::showpoint);
145 oss << std::setprecision(precision);
156 : myAmBinary(binary) {
180 if (i->second ==
this) {
197 const std::string& attrs,
const std::string& comment) {