Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
InStream.h
1 /*
2  * InStream class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2004-07, IRIT UPS.
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef ELM_IO_INSTREAM_H
22 #define ELM_IO_INSTREAM_H
23 
24 #include <elm/string/CString.h>
25 
26 namespace elm { namespace io {
27 
28 // InStream class
29 class InStream {
30 public:
31  static const int FAILED = -1;
32  static const int ENDED = -2;
33  virtual ~InStream(void) { };
34  virtual int read(void *buffer, int size) = 0;
35  virtual int read(void);
36  virtual CString lastErrorMessage(void);
37 
38  static InStream& null;
39 };
40 
41 // Standard IO streams
42 //extern InStream& stdin;
43 
44 } } // io::elm
45 
46 #endif // ELM_IO_INSTREAM_H
elm::io::InStream::ENDED
static const int ENDED
Definition: InStream.h:32
elm::io::InStream::FAILED
static const int FAILED
Definition: InStream.h:31
elm::io::InStream::~InStream
virtual ~InStream(void)
Definition: InStream.h:33
elm::CString
Definition: CString.h:17
elm
Definition: adapter.h:26
elm::t::size
uint64 size
Definition: arch.h:35
elm::io::InStream::lastErrorMessage
virtual CString lastErrorMessage(void)
Definition: io_InStream.cpp:79
elm::io::InStream::read
virtual int read(void)
Definition: io_InStream.cpp:63
elm::io::InStream
Definition: InStream.h:29