50 #ifdef CHECK_MEMORY_LEAKS
52 #endif // CHECK_MEMORY_LEAKS
66 const std::string& base) {
67 std::string internalName = name;
69 internalName =
"stdout";
78 if (internalName ==
"stdout") {
80 }
else if (internalName ==
"stderr") {
84 int port =
TplConvert::_2int(internalName.substr(internalName.find(
":") + 1).c_str());
87 throw IOError(
"Given port number '" + internalName.substr(internalName.find(
":") + 1) +
"' is not numeric.");
89 throw IOError(
"No port number given.");
92 const size_t len = internalName.length();
94 len > 4 && internalName.substr(len - 4) ==
".sbx");
97 dev->
getOStream() << std::setiosflags(std::ios::fixed);
105 const std::string& rootElement) {
110 if (rootElement !=
"") {
111 if (rootElement ==
"routes" || rootElement ==
"netstate") {
112 dev.
writeXMLHeader(rootElement,
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://sumo.sf.net/xsd/" + rootElement +
"_file.xsd\"");
124 if (myOutputDevices.find(devName) == myOutputDevices.end()) {
125 throw InvalidArgument(
"Device '" + devName +
"' has not been created.");
142 std::ostringstream oss;
146 if (v < pow(10., -precision)) {
147 oss.setf(std::ios::scientific, std::ios::floatfield);
149 oss.setf(std::ios::fixed , std::ios::floatfield);
150 oss.setf(std::ios::showpoint);
151 oss << std::setprecision(precision);
162 : myAmBinary(binary) {
186 if (i->second ==
this) {
203 const std::string& attrs,
const std::string& comment) {