Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS2 / JAWS / Filecache.h
blob40840a00a2db6e47a95b1cd193610f3801b154b3
1 /* -*- c++ -*- */
2 #ifndef JAWS_FILECACHE_H
3 #define JAWS_FILECACHE_H
5 #include "ace/FILE_IO.h"
7 #include "JAWS/Cache_Manager.h"
8 #include "JAWS/FILE.h"
9 #include "JAWS/Export.h"
11 class JAWS_Export JAWS_Referenced_Filecache_Factory
12 : public JAWS_Referenced_Cache_Object_Factory
14 public:
15 virtual void destroy (JAWS_Cache_Object *);
18 class JAWS_Export JAWS_Counted_Filecache_Factory
19 : public JAWS_Counted_Cache_Object_Factory
21 public:
22 virtual void destroy (JAWS_Cache_Object *);
25 typedef JAWS_Cache_Manager<JAWS_Strdup_String,
26 JAWS_Referenced_Filecache_Factory,
27 JAWS_String_Hash_Functor,
28 JAWS_String_Equal_Functor>
29 JAWS_Referenced_Filecache_Manager;
31 typedef JAWS_Cache_Manager<JAWS_Strdup_String,
32 JAWS_Counted_Filecache_Factory,
33 JAWS_String_Hash_Functor,
34 JAWS_String_Equal_Functor>
35 JAWS_Counted_Filecache_Manager;
37 typedef JAWS_Counted_Filecache_Manager JAWS_Filecache_Manager;
39 typedef JAWS_Cache_Proxy<const char *,
40 JAWS_FILE, JAWS_Filecache_Manager>
41 JAWS_Filecache_Proxy;
43 class JAWS_Export JAWS_Cached_FILE : private JAWS_Filecache_Proxy
45 public:
46 JAWS_Cached_FILE (const char *const &filename,
47 JAWS_Filecache_Proxy::Cache_Manager *cm = 0);
48 JAWS_Cached_FILE (const char *const &filename,
49 JAWS_FILE *&file,
50 size_t size,
51 JAWS_Filecache_Proxy::Cache_Manager *cm = 0);
53 ~JAWS_Cached_FILE ();
55 ACE_FILE_IO * file ();
56 ACE_Mem_Map * mmap ();
58 private:
59 ACE_FILE_IO file_;
63 #endif /* JAWS_FILECACHE_H */