3 // ===================================================================
5 * @file ZlibCompressor_Factory.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
9 // ===================================================================
11 #ifndef TAO_ZLIBCOMPRESSOR_FACTORY_H
12 #define TAO_ZLIBCOMPRESSOR_FACTORY_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Compression/zlib/ZlibCompressor_export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Compression/Compression.h"
23 #include "tao/Compression/Compressor_Factory.h"
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 class TAO_ZLIBCOMPRESSOR_Export Zlib_CompressorFactory
:
31 public ::TAO::CompressorFactory
33 typedef std::map
< ::Compression::CompressionLevel
,
34 const ::Compression::Compressor_var
> ZlibCompressorMap
;
37 Zlib_CompressorFactory ();
39 virtual ::Compression::Compressor_ptr
get_compressor (
40 ::Compression::CompressionLevel compression_level
);
43 Zlib_CompressorFactory (const Zlib_CompressorFactory
&) = delete;
44 Zlib_CompressorFactory
&operator= (const Zlib_CompressorFactory
&) = delete;
46 // Ensure we can lock with imutability (i.e. const)
47 mutable TAO_SYNCH_MUTEX mutex_
;
48 ZlibCompressorMap compressors_
;
52 TAO_END_VERSIONED_NAMESPACE_DECL
54 #include /**/ "ace/post.h"
56 #endif /* TAO_ZLIBCOMPRESSOR_FACTORY_H */