Nemiver  0.3
nmv-i-input-stream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; indent-tabs-mode:nil; c-basic-offset:4; -*- */
2 
3 /*Copyright (c) 2005-2006 Dodji Seketeli
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of this
6  * software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute,
9  * sublicense, and/or sell copies of the Software, and to permit
10  * persons to whom the Software is furnished to do so,
11  * subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies
14  * or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS",
17  * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18  * INCLUDING BUT NOT LIMITED TO THE
19  * WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE
21  * AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23  * HOLDERS BE LIABLE FOR ANY CLAIM,
24  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
25  * CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
27  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28  *
29  */
30 #ifndef __NMV_I_INPUT_STREAM_H__
31 #define __NMV_I_INPUT_STREAM_H__
32 
33 #include "nmv-object.h"
34 
35 namespace nemiver {
36 namespace common {
37 
38 class IInputStream : public Object {
39  //forbid copy
40  IInputStream (const IInputStream &);
41  IInputStream& operator= (const IInputStream &);
42 
43 public:
44  enum Status {
45  OK=0,
49  };//end Status
50 
52  {}
53 
54  virtual ~IInputStream ()
55  {}
56 
57  virtual bool open (const char *a_path) = 0;
58 
59  virtual Status read (char *a_buf, int &a_len) =0;
60 
61  virtual void close () =0;
62 };//end class InputStream
63 }//end namespace common
64 }//end namespace nemiver
65 #endif //__NMV_INPUT_STREAM_H__
66 
nemiver::common::IInputStream::OK
@ OK
Definition: nmv-i-input-stream.h:45
nemiver::common::Object
Definition: nmv-object.h:43
nemiver::common::IInputStream::~IInputStream
virtual ~IInputStream()
Definition: nmv-i-input-stream.h:54
nemiver::common::IInputStream::Status
Status
Definition: nmv-i-input-stream.h:44
nemiver
Definition: nmv-address.h:31
nemiver::common::IInputStream::NOT_OPEN_ERROR
@ NOT_OPEN_ERROR
Definition: nmv-i-input-stream.h:47
nemiver::common::IInputStream::EOF_ERROR
@ EOF_ERROR
Definition: nmv-i-input-stream.h:46
nemiver::common::IInputStream::open
virtual bool open(const char *a_path)=0
nemiver::common::IInputStream::ERROR
@ ERROR
Definition: nmv-i-input-stream.h:48
nemiver::common::IInputStream::close
virtual void close()=0
nemiver::common::IInputStream
Definition: nmv-i-input-stream.h:38
nmv-object.h
nemiver::common::IInputStream::read
virtual Status read(char *a_buf, int &a_len)=0
nemiver::common::IInputStream::IInputStream
IInputStream()
Definition: nmv-i-input-stream.h:51
common
Definition: nmv-proc-list-dialog.h:32