nlib
Base64OutputStream.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_BASE64OUTPUTSTREAM_H_
17 #define INCLUDE_NN_NLIB_BASE64OUTPUTSTREAM_H_
18 
19 #include "nn/nlib/OutputStream.h"
21 #include "nn/nlib/Base64.h"
22 
23 NLIB_NAMESPACE_BEGIN
25  public:
26  // NOTE: define NewLineMode (not typedef) again for doxygen.
28  enum NewLineMode { kNewLineModeNone = 0, kNewLineModeCrlf, kNewLineModeLf };
30  errno_t Init(CharOption char_option) NLIB_NOEXCEPT;
31  errno_t Init() NLIB_NOEXCEPT { return Init(Base64Encoder::kBase64Default); }
33  void SetNewLineMode(NewLineMode mode) NLIB_NOEXCEPT;
34 
35  private:
36  struct Base64OutputStreamPrivate;
37  Base64OutputStreamPrivate* prv_;
39 };
40 NLIB_NAMESPACE_END
41 
42 #endif // INCLUDE_NN_NLIB_BASE64OUTPUTSTREAM_H_
#define NLIB_OVERRIDE
利用可能であればoverrideが定義されます。そうでない場合は空文字列です。
Definition: Config.h:249
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
TypeName で指定されたクラスのコピーコンストラクタと代入演算子を禁止します。
Definition: Config.h:183
CharOption
Base64の62番目と63番目の文字のバリエーションを指定できます。
Definition: Base64.h:29
#define NLIB_VIS_PUBLIC
関数やクラス等のシンボルをライブラリの外部に公開します。
Definition: Platform_unix.h:87
内部でデータ変換を行うOutputStreamのように振る舞うクラスの基底です。
Base64のエンコードとデコードを行うクラスを定義しています。
#define NLIB_NOEXCEPT
環境に合わせてnoexcept 又は同等の定義がされます。
Definition: Config.h:109
#define NLIB_CEXPR
利用可能であればconstexprが定義されます。そうでない場合は空文字列です。
Definition: Config.h:111
errno_t Init() noexcept
Init(Base64Encoder::kBase64Default)を実行します。
#define NLIB_FINAL
利用可能であればfinalが定義されます。そうでない場合は空文字列です。
Definition: Config.h:250
NewLineMode
出力されるBase64テキストの改行オプションです。デフォルトはkNewLineModeNoneです。
データをBase64でエンコードして書きこむためのクラスです。
constexpr Base64OutputStream() noexcept
デフォルトコンストラクタです。
出力ストリームの基底クラスを定義しています。
int errno_t
intのtypedefで、戻り値としてPOSIXのエラー値を返すことを示します。
Definition: NMalloc.h:37