3 //=============================================================================
5 * @file UTF16_BOM_Factory.h
7 * Loader for an instance of the UTF16_BOM_Translator.
9 * @author Phil Mesnier <mesnier_p@ociweb.com>
11 //=============================================================================
14 #ifndef UTF16_BOM_FACTORY_H
15 #define UTF16_BOM_FACTORY_H
17 #include /**/ "ace/pre.h"
18 #include "ace/Service_Config.h"
19 #include "tao/Codeset/Codeset_Translator_Factory.h"
21 #include "tao/Codeset/UTF16_BOM_Translator.h"
22 #include "tao/Codeset/codeset_export.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 class TAO_Codeset_Export TAO_UTF16_BOM_Factory
27 : public TAO_Codeset_Translator_Factory
30 TAO_UTF16_BOM_Factory () = default;
31 virtual ~TAO_UTF16_BOM_Factory ();
32 virtual int init (int argc
, ACE_TCHAR
*argv
[]);
34 /// ncs returns the translator's native codeset ID.
35 CONV_FRAME::CodeSetId
ncs () const;
36 /// tcs returns the translator's transmission codeset ID.
37 CONV_FRAME::CodeSetId
tcs () const;
39 /// Assign the translator to the input CDR. The inherited assign_i is used
40 /// to assign either a char or wchar translator, depending on the base type
41 /// of NCS_TO_TCS. A null input CDR is permitted, in which case assign is a
43 virtual void assign (TAO_InputCDR
*) const;
44 /// Assign the translator to the output CDR. The inherited assign_i is used
45 /// to assign either a char or wchar translator, depending on the base type
46 /// of NCS_TO_TCS. A null output CDR is permitted, in which case assign is a
48 virtual void assign (TAO_OutputCDR
*) const;
51 void create_translator () const;
52 int parse_one_arg (int argc
, ACE_TCHAR
*argv
[]);
55 TAO_UTF16_BOM_Translator
*translator_
{};
56 /// Force big endian wchar, warray, & wstring
57 bool forceBE_
{false};
60 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_Codeset
, TAO_UTF16_BOM_Factory
)
61 ACE_FACTORY_DECLARE (TAO_Codeset
, TAO_UTF16_BOM_Factory
)
62 TAO_END_VERSIONED_NAMESPACE_DECL
65 #include /**/ "ace/post.h"
66 #endif /* UTF16_BOM_FACTORY_H */