namespace WrtDeviceApis {
namespace Filesystem {
-
using namespace Api;
Stream::Stream(const NodePtr& parent,
Assert(m_parent && "Stream needs to have parent.");
std::ios_base::openmode mode_ = std::ios_base::binary;
- if (mode & AM_READ) { mode_ |= std::ios_base::in; }
- if (mode & AM_WRITE) { mode_ |= std::ios_base::out; } else if (mode &
- AM_APPEND) {
+ if (mode & AM_READ) {
+ mode_ |= std::ios_base::in;
+ }
+ if (mode & AM_WRITE) {
+ mode_ |= std::ios_base::out;
+ } else if (mode &
+ AM_APPEND)
+ {
mode_ |= (std::ios_base::app | std::ios_base::out);
}
if (!(m_stream << arg)) {
LogError("Error while writing to the stream.");
ThrowMsg(Commons::PlatformException,
- "Error while writing to the stream.");
+ "Error while writing to the stream.");
}
m_stream.flush();
ThrowMsg(Commons::PlatformException, "Stream is not writeable.");
}
}
-
} // Filesystem
} // WrtDeviceApis