if (value.IsObjectType<Array>())
PrintCsvArray(fp, value, 0);
else
- fp << Convert::ToString(value);
+ fp << value;
}
fp << "\n";
if (value.IsObjectType<Array>())
PrintCsvArray(fp, value, level + 1);
else
- fp << Convert::ToString(value);
+ fp << value;
}
}
{
return static_cast<ValueType>(m_Value.which());
}
+
+std::ostream& icinga::operator<<(std::ostream& stream, const Value& value)
+{
+ stream << static_cast<String>(value);
+ return stream;
+}
+
+std::istream& icinga::operator>>(std::istream& stream, Value& value)
+{
+ String tstr;
+ stream >> tstr;
+ value = tstr;
+ return stream;
+}
static Value Empty;
+I2_BASE_API std::ostream& operator<<(std::ostream& stream, const Value& value);
+I2_BASE_API std::istream& operator>>(std::istream& stream, Value& value);
+
}
#endif /* VALUE_H */
#include "base/scriptfunction.h"
#include "base/logger_fwd.h"
#include "base/utility.h"
-#include "base/convert.h"
#include "base/process.h"
#include <boost/smart_ptr/make_shared.hpp>
#include <boost/foreach.hpp>
if (pr.ExitStatus != 0) {
std::ostringstream msgbuf;
- msgbuf << "Notification command '" << Convert::ToString(command) << "' for service '"
+ msgbuf << "Notification command '" << command << "' for service '"
<< service->GetName() << "' failed; exit status: "
<< pr.ExitStatus << ", output: " << pr.Output;
Log(LogWarning, "icinga", msgbuf.str());