From def5c50960eea4c112647f88361a3ae7155901a8 Mon Sep 17 00:00:00 2001 From: egor-tensin Date: Tue, 4 Jul 2023 00:48:00 +0000 Subject: =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20egor-tensin/wina?= =?UTF-8?q?pi-common@0c196cbe8b4927c78c02b2c7312fc69a507db845=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classwinapi_1_1Handle.html | 434 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 434 insertions(+) create mode 100644 classwinapi_1_1Handle.html (limited to 'classwinapi_1_1Handle.html') diff --git a/classwinapi_1_1Handle.html b/classwinapi_1_1Handle.html new file mode 100644 index 0000000..1bea063 --- /dev/null +++ b/classwinapi_1_1Handle.html @@ -0,0 +1,434 @@ + + + + + + + +winapi_common: winapi::Handle Class Reference + + + + + + + + + +
+
+ + + + + + +
+
winapi_common +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
winapi::Handle Class Reference
+
+
+ +

HANDLE wrapper. + More...

+
+Inheritance diagram for winapi::Handle:
+
+
+ + +winapi::File + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Handle (HANDLE)
 
+HANDLE get () const
 
+HANDLE ptr () const
 
operator HANDLE () const
 
+bool is_valid () const
 
void close ()
 
bool is_std () const
 
Buffer read () const
 
bool read_chunk (Buffer &read_chunk) const
 
void write (const void *data, std::size_t nb) const
 
void write (const Buffer &buffer) const
 
template<typename CharT >
void write (const std::basic_string< CharT > &src) const
 
+void inherit (bool yes=true) const
 
+void dont_inherit () const
 
+ + + + + + + + + +

+Static Public Member Functions

+static bool is_valid (HANDLE)
 
static Handle std_in ()
 
static Handle std_out ()
 
static Handle std_err ()
 
+ + + +

+Static Public Attributes

+static constexpr std::size_t max_chunk_size = 16 * 1024
 
+

Detailed Description

+

HANDLE wrapper.

+

This class wraps HANDLE, allowing for painless reads and writes from a random handle.

+ +

Definition at line 25 of file handle.hpp.

+

Member Function Documentation

+ +

◆ close()

+ +
+
+ + + + + + + +
void winapi::Handle::close ()
+
+

Close this handle.

+ +

Definition at line 47 of file handle.cpp.

+ +
+
+ +

◆ is_std()

+ +
+
+ + + + + + + +
bool winapi::Handle::is_std () const
+
+

Check if this is a standard console handle.

+ +

Definition at line 51 of file handle.cpp.

+ +
+
+ +

◆ std_in()

+ +
+
+ + + + + +
+ + + + + + + +
Handle winapi::Handle::std_in ()
+
+static
+
+

Check if this is the stdin handle.

+ +

Definition at line 55 of file handle.cpp.

+ +
+
+ +

◆ std_out()

+ +
+
+ + + + + +
+ + + + + + + +
Handle winapi::Handle::std_out ()
+
+static
+
+

Check if this is the stdout handle.

+ +

Definition at line 59 of file handle.cpp.

+ +
+
+ +

◆ std_err()

+ +
+
+ + + + + +
+ + + + + + + +
Handle winapi::Handle::std_err ()
+
+static
+
+

Check if this is the stderr handle.

+ +

Definition at line 63 of file handle.cpp.

+ +
+
+ +

◆ read()

+ +
+
+ + + + + + + +
Buffer winapi::Handle::read () const
+
+

Read everything from this handle.

+ +

Definition at line 93 of file handle.cpp.

+ +
+
+ +

◆ read_chunk()

+ +
+
+ + + + + + + + +
bool winapi::Handle::read_chunk (Bufferread_chunk) const
+
+

Read a chunk from this handle.

Parameters
+ + +
read_chunkReceives the data read.
+
+
+
Returns
true if there's more data, false otherwise.
+ +

Definition at line 67 of file handle.cpp.

+ +
+
+ +

◆ write() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void winapi::Handle::write (const void * data,
std::size_t nb 
) const
+
+

Write data to this handle.

Parameters
+ + + +
dataPointer to binary data.
nbData size.
+
+
+ +

Definition at line 109 of file handle.cpp.

+ +
+
+ +

◆ write() [2/3]

+ +
+
+ + + + + + + + +
void winapi::Handle::write (const Bufferbuffer) const
+
+

Write data to this handle.

Parameters
+ + +
bufferBinary data to write.
+
+
+ +

Definition at line 125 of file handle.cpp.

+ +
+
+ +

◆ write() [3/3]

+ +
+
+
+template<typename CharT >
+ + + + + +
+ + + + + + + + +
void winapi::Handle::write (const std::basic_string< CharT > & src) const
+
+inline
+
+

Write data to this handle.

Parameters
+ + +
srcBinary data to write.
+
+
+ +

Definition at line 78 of file handle.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + -- cgit v1.2.3