nlib
ConsoleOutputStream.h
[詳解]
1 
2 /*--------------------------------------------------------------------------------*
3  Project: CrossRoad
4  Copyright (C)Nintendo All rights reserved.
5 
6  These coded instructions, statements, and computer programs contain proprietary
7  information of Nintendo and/or its licensed developers and are protected by
8  national and international copyright laws. They may not be disclosed to third
9  parties or copied or duplicated in any form, in whole or in part, without the
10  prior written consent of Nintendo.
11 
12  The content herein is highly confidential and should be handled accordingly.
13  *--------------------------------------------------------------------------------*/
14 
15 #pragma once
16 #ifndef INCLUDE_NN_NLIB_CONSOLEOUTPUTSTREAM_H_
17 #define INCLUDE_NN_NLIB_CONSOLEOUTPUTSTREAM_H_
18 
19 #include "nn/nlib/OutputStream.h"
20 
21 NLIB_NAMESPACE_BEGIN
22 
24  static const size_t kBufSize = 512;
25  char cos_buf_[kBufSize + 1];
26 
27  public:
30  bool result = this->Close();
31  NLIB_UNUSED(result);
32  }
33 
34  private:
35  virtual bool PushBuffer_(const void* p, size_t nbytes,
36  bool do_flush) NLIB_NOEXCEPT NLIB_OVERRIDE;
37  virtual bool Close_() NLIB_NOEXCEPT NLIB_OVERRIDE { return this->Flush(); }
38 };
39 
40 NLIB_NAMESPACE_END
41 
42 #endif // INCLUDE_NN_NLIB_CONSOLEOUTPUTSTREAM_H_
nlib_printfを利用して文字列としてコンソールに出力するストリームを作成します。
bool Flush() noexcept
ストリームをフラッシュします。
Definition: OutputStream.h:101
#define NLIB_OVERRIDE
利用可能であればoverrideが定義されます。そうでない場合は空文字列です。
Definition: Config.h:228
bool Close() noexcept
ストリームをフラッシュした後、ストリームを閉じます。成功した場合にはtrueを返します。 ...
#define NLIB_VIS_PUBLIC
関数やクラス等のシンボルをライブラリの外部に公開します。
Definition: Platform_unix.h:89
#define NLIB_NOEXCEPT
環境に合わせてnoexcept 又は同等の定義がされます。
Definition: Config.h:99
#define NLIB_FINAL
利用可能であればfinalが定義されます。そうでない場合は空文字列です。
Definition: Config.h:229
出力ストリームの基底クラスを定義しています。
出力ストリームの基底クラスです。このクラスを実体化することはできません。
Definition: OutputStream.h:30