SimpleKernel  0.0.1
ostream.cpp
Go to the documentation of this file.
1 
17 #include "ostream.hpp"
18 
19 [[maybe_unused]] auto wait_for_input(EFI_INPUT_KEY *_key) -> EFI_STATUS {
20  EFI_STATUS status = EFI_SUCCESS;
21  do {
22  status = uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, ST->ConIn, _key);
23  } while (EFI_NOT_READY == status);
24 
25  return status;
26 }
27 
28 auto ostream::operator<<(ostream &(*_ostream)(ostream &)) -> ostream & {
29  return _ostream(*this);
30 }
31 
32 auto ostream::hex_x(ostream &_ostream) -> ostream & {
33  _ostream.mode = ostream::x;
34  return _ostream;
35 }
36 
37 auto ostream::hex_X(ostream &_ostream) -> ostream & {
38  _ostream.mode = ostream::X;
39  return _ostream;
40 }
41 
42 auto ostream::endl(ostream &_ostream) -> ostream & { return _ostream << L'\n'; }
auto operator<<(_t _val) -> ostream &
Definition: ostream.hpp:116
static auto endl(ostream &_ostream) -> ostream &
Definition: ostream.cpp:42
@ X
16 进制 X
Definition: ostream.hpp:105
@ x
16 进制 x
Definition: ostream.hpp:103
mode_t mode
输出流模式
Definition: ostream.hpp:110
static auto hex_x(ostream &_ostream) -> ostream &
Definition: ostream.cpp:32
static auto hex_X(ostream &_ostream) -> ostream &
Definition: ostream.cpp:37
auto wait_for_input(EFI_INPUT_KEY *_key) -> EFI_STATUS
Definition: ostream.cpp:19
ostream hpp