3 //=============================================================================
5 * @file CodecFactory_impl.h
7 * @author Ossama Othman <ossama@uci.edu>
9 //=============================================================================
11 #ifndef TAO_CODEC_FACTORY_IMPL_H
12 #define TAO_CODEC_FACTORY_IMPL_H
14 #include /**/ "ace/pre.h"
16 #include "tao/CodecFactory/IOP_Codec_includeC.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/LocalObject.h"
24 // This is to remove "inherits via dominance" warnings from MSVC.
25 // MSVC is being a little too paranoid.
28 #pragma warning(disable:4250)
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 class TAO_Codeset_Translator_Base
;
36 * @class TAO_CodecFactory
38 * @brief Implementation of the IOP::CodecFactory interface.
40 * This class can be used to create Codec (coder/decoder) of a given
41 * type, such as a CDR encapsulation Codec.
43 class TAO_CodecFactory
44 : public virtual IOP::CodecFactory
,
45 public virtual ::CORBA::LocalObject
49 TAO_CodecFactory (TAO_ORB_Core
* orb_core
);
51 /// Create a Coder/Decoder for the given type of encoding.
52 virtual IOP::Codec_ptr
create_codec (const IOP::Encoding
& enc
);
54 /// Create a Coder/Decoder for the given type of encoding and codesets.
55 virtual IOP::Codec_ptr
create_codec_with_codesets (const IOP::Encoding_1_2
& enc
);
58 TAO_CodecFactory (const TAO_CodecFactory
&) = delete;
59 void operator= (const TAO_CodecFactory
&) = delete;
61 IOP::Codec_ptr
create_codec_i (CORBA::Octet major
,
63 IOP::EncodingFormat encoding_format
,
64 TAO_Codeset_Translator_Base
* char_trans
,
65 TAO_Codeset_Translator_Base
* wchar_trans
);
67 /// Pointer to the ORB Core.
69 * Some Codec implementations may need access to the ORB Core with
70 * which they are associated.
72 TAO_ORB_Core
* const orb_core_
;
75 TAO_END_VERSIONED_NAMESPACE_DECL
81 #include /**/ "ace/post.h"
83 #endif /* TAO_CODEC_FACTORY_IMPL_H */