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