16 #ifndef INCLUDE_NN_NLIB_TEXTWRITER_H_ 17 #define INCLUDE_NN_NLIB_TEXTWRITER_H_ 20 #include "nn/nlib/Swap.h" 51 bool WriteFormat(_Printf_format_string_
const wchar_t* fmt, ...)
NLIB_NOEXCEPT;
54 if (errno_ == 0) errno_ = e;
65 unsigned char utf8idx_;
66 unsigned char utf16idx_;
76 #endif // INCLUDE_NN_NLIB_TEXTWRITER_H_ errno_t GetErrorValue() const noexcept
This function can get the cause of the error when writing has failed.
OutputStream * GetStream() noexcept
Gets the stream for the text writer to write to.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
#define NLIB_SAFE_BOOL(class_name, exp)
Defines a safe operator bool function in the class. Uses the C++11 explicit bool if it is available f...
bool Write(BinaryWriter *w, T x)
You can write user-defined class objects by specializing this function template.
Class that wraps errno_t. This class improves visual representations in the Visual Studio debugger...
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
A file that contains the configuration information for each development environment.
~TextWriter() noexcept
Destructor. The stream is not closed.
The class for writing text to streams.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
void SetError(errno_t e) const noexcept
Sets an error value.
The base class for output streams. This class cannot be instantiated.