source: to-imperative/trunk/runtime/rf_channel.hh @ 1156

Last change on this file since 1156 was 1156, checked in by pooh, 17 years ago
  • Do not close already opened channels.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 731 bytes
Line 
1#ifndef __rf_channel_hh__
2#define __rf_channel_hh__
3
4#include "rf_types.hh"
5#include "rf_object.hh"
6#include <stdio.h>
7
8namespace rftype
9{
10
11using namespace rfrt ;
12
13class Channel :
14  public Object
15{
16
17private:
18
19  FILE* fp ;
20  bool was_opened ;
21
22  static ObjectRegister reg ;
23
24public:
25
26  inline Channel (FILE* _fp = null) ;
27  inline Channel (Channel const& _channel) ;
28  inline ~Channel () ;
29  inline Channel& operator = (Channel const& _channel) ;
30
31  inline unsigned get_type () const ;
32  inline uint32_t hash () const ;
33
34  inline bool operator == (Object const& _obj) const ;
35
36  inline bool open (char const* _fname, char const* _mode) ;
37  inline void close () ;
38  inline FILE* get_fp () const ;
39
40};
41
42}
43
44#endif // __rf_channel_hh__
Note: See TracBrowser for help on using the repository browser.