3 #ifndef INCLUDE_NN_NLIB_FILEOUTPUTSTREAM_H_
4 #define INCLUDE_NN_NLIB_FILEOUTPUTSTREAM_H_
18 buffer_size(buffer_size_) {}
26 m_IsInternalBuffer(false) {}
30 return this->Init(settings);
39 virtual bool PushBuffer_(
const void* p,
size_t nBytes,
41 virtual bool Close_() NLIB_NOEXCEPT NLIB_OVERRIDE;
42 virtual
bool WriteGather_(const nlib_fd_iovec* iov,
int iovcnt) NLIB_NOEXCEPT NLIB_OVERRIDE;
48 bool m_IsInternalBuffer;
54 #endif // INCLUDE_NN_NLIB_FILEOUTPUTSTREAM_H_
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
constexpr FileOutputStreamSettings() noexcept
Instantiates the object with default parameters (default constructor). Sets the default values...
The structure that stores information about the file stream settings.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
The class for file output streams.
void * buf
A pointer to a buffer.
#define NLIB_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
nlib_fd GetFd() const noexcept
Returns the file descriptor.
size_t buffer_size
The size of the buffer.
#define NLIB_CEXPR
Defines constexpr if it is available for use. If not, holds an empty string.
FileOutputStream() noexcept
Instantiates the object with default parameters (default constructor). The buffer must be set and ini...
constexpr FileOutputStreamSettings(void *buf_, size_t buffer_size_) noexcept
Sets the individual data members.
Defines the base class for output streams.
The base class for output streams. This class cannot be instantiated.