summaryrefslogtreecommitdiff
path: root/ACE/apps/JAWS3/jaws3/FILE.h
blob: be2bea9e291c0f6c83830ad4d2f23103d37d7a5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// -*- c++ -*-
//
// $Id$


#ifndef JAWS_FILE_H
#define JAWS_FILE_H

#include "ace/FILE_IO.h"
#include "ace/Mem_Map.h"

#include "jaws3/Export.h"

class JAWS_Export JAWS_FILE : public ACE_FILE_IO
//
// Like ACE_FILE_IO, but support for ACE_Mem_Map;
{
public:

  JAWS_FILE (void);

  ~JAWS_FILE (void);

  ACE_Mem_Map *mem_map (int length = -1,
                        int prot = PROT_RDWR,
                        int share = ACE_MAP_PRIVATE,
                        void *addr = 0,
                        ACE_OFF_T offset = 0,
                        LPSECURITY_ATTRIBUTES sa = 0);
  ACE_Mem_Map *mem_map (int length = -1,
                        int prot = PROT_RDWR,
                        int share = ACE_MAP_PRIVATE,
                        void *addr = 0,
                        ACE_OFF_T offset = 0,
                        LPSECURITY_ATTRIBUTES sa = 0) const;

  ACE_Mem_Map *map (void) const;

  void can_map (int);

private:

  ACE_SYNCH_MUTEX lock_;
  ACE_Mem_Map *map_;

  int can_map_;

};

#endif /* JAWS_FILE_H */