acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
DataInputStream.h
1// Copyright (C) 2009,2010,2011,2012 GlavSoft LLC.
2// All rights reserved.
3//
4//-------------------------------------------------------------------------
5// This file is part of the T i g h t V N C software. Please visit our Web site:
6//
7// http://www.t i g h t v n c.com/
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//
14// This program is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17// GNU General Public License for more details.
18//
19// You should have received a copy of the GNU General Public License along
20// with this program; if not, w_rite to the Free Software Foundation, Inc.,
21// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22//-------------------------------------------------------------------------
23//
24
25#pragma once
26
27
29#include "acme/input_output/InputStream.h"
30#include "acme/exception/io.h"
31//namespace subsystem
32//{
37 class CLASS_DECL_ACME DataInputStream : public InputStream
38 {
39 public:
40
41 //protected:
42 ::pointer < InputStream > m_pinputstream;
43
48 //DataInputStream(InputStream *inputStream);
50 DataInputStream(InputStream *inputStream);
51 virtual ~DataInputStream();
52
53
54 virtual void _initialize_data_input_stream(InputStream *inputStream);
55
56
61 virtual memsize read(void *buffer, memsize len);
62
63 virtual memsize available();
64
72 void readFully(void *buffer, memsize len);
73
74 ::u8 readUInt8();
75 ::u16 readUInt16();
76 ::u32 readUInt32();
77 ::u64 readUInt64();
78
79 ::i8 readInt8();
80 ::i16 readInt16();
81 ::i32 readInt32();
82 ::i64 readInt64();
83
84 ::string readUtf8();
85
86 };
87//} // namespace subsystem
DataInputStream()
Definition DataInputStream.cpp:38
void readFully(void *buffer, memsize len)
Definition DataInputStream.cpp:73
Definition InputStream.h:37
virtual memsize read(void *buffer, memsize len)=0