forked from kbinani/libvsq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextOutputStream.hpp
More file actions
54 lines (46 loc) · 1.19 KB
/
TextOutputStream.hpp
File metadata and controls
54 lines (46 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* TextOutputStream.hpp
* Copyright © 2012 kbinani
*
* This file is part of libvsq.
*
* libvsq is free software; you can redistribute it and/or
* modify it under the terms of the BSD License.
*
* libvsq is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef __TextOutputStream_hpp__
#define __TextOutputStream_hpp__
#include "vsqglobal.hpp"
#include <string>
VSQ_BEGIN_NAMESPACE
/**
* @brief テキスト出力のためのストリーム
*/
class TextOutputStream{
public:
/**
* @brief IO 例外
*/
class IOException : std::exception{
};
public:
/**
* @brief ストリームを閉じる
*/
virtual void close() = 0;
/**
* @brief 文字列をストリームに書きこむ
* @param text 書きこむ文字列
*/
virtual void write( const std::string& text ) = 0;
/**
* @brief 文字列をストリームに書きこむ。末尾に改行文字を追加する
* @param line 書きこむ文字列
*/
virtual void writeLine( const std::string &line ) = 0;
};
VSQ_END_NAMESPACE
#endif