Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / CodecFactory / CodecFactory_impl.h
blob03e7a88fcbebf7484fe16e0dc6a198090d561256
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file CodecFactory_impl.h
7 * @author Ossama Othman <ossama@uci.edu>
8 */
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)
19 # 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.
26 #if defined(_MSC_VER)
27 #pragma warning(push)
28 #pragma warning(disable:4250)
29 #endif /* _MSC_VER */
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 class TAO_Codeset_Translator_Base;
35 /**
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
47 public:
48 /// Constructor
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);
57 private:
58 TAO_CodecFactory (const TAO_CodecFactory &) = delete;
59 void operator= (const TAO_CodecFactory &) = delete;
61 IOP::Codec_ptr create_codec_i (CORBA::Octet major,
62 CORBA::Octet minor,
63 IOP::EncodingFormat encoding_format,
64 TAO_Codeset_Translator_Base * char_trans,
65 TAO_Codeset_Translator_Base * wchar_trans);
66 private:
67 /// Pointer to the ORB Core.
68 /**
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
77 #if defined(_MSC_VER)
78 #pragma warning(pop)
79 #endif /* _MSC_VER */
81 #include /**/ "ace/post.h"
83 #endif /* TAO_CODEC_FACTORY_IMPL_H */