Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Codeset_Manager.h
blobadf4e4d07204421d16b66e137af3a339c92bd8c7
1 // -*- C++ -*-
3 //=============================================================================
4 /*
5 * @file Codeset_Manager.h
7 * Interface for the TAO CodeSet Manager.
9 * @author Mahesh Vedantam <mahesh@ociweb.com>
11 //=============================================================================
13 #ifndef TAO_CODESET_MANAGER_H
14 #define TAO_CODESET_MANAGER_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "tao/TAO_Export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/CONV_FRAMEC.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 class ACE_WChar_Codeset_Translator;
28 ACE_END_VERSIONED_NAMESPACE_DECL
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 class TAO_Profile;
33 class TAO_Transport;
34 class TAO_Operation_Details;
36 class TAO_ServerRequest;
37 class TAO_Tagged_Components;
38 class TAO_Codeset_Translator_Base;
39 class TAO_Codeset_Descriptor_Base;
42 // ****************************************************************
44 /**
45 * @class TAO_Codeset_Manager
47 * @brief The encapsulation of logic for codeset negotiation
49 * The Codeset Manager is owned by the ORB_Core, initialized through Resource
50 * Factory configuration options. The codeset manager participates in profile
51 * creation by servers and connection establishment by clients. The involvement
52 * is necessary to supply a codeset component to the profile including for both
53 * chars and wide chars the native code set and any conversion code sets for
54 * which translators are available. The codeset manager is also responsible for
55 * determining the transmission codesets based an the local and remote codeset
56 * information. The transmission codesets are communicated via a service
57 * context attached to the first request sent on the new connection.
59 class TAO_Export TAO_Codeset_Manager
61 public:
62 /// Destructor.
63 virtual ~TAO_Codeset_Manager () = default;
65 /// Called by an object of TAO_Acceptor to set NCS and CCS values for
66 /// Char/Wchar in to the Object Reference.
67 virtual void set_codeset (TAO_Tagged_Components&) const = 0;
69 /// Called from an object of "TAO_GIOP_Invocation" to set TCS on the
70 /// Transport
71 virtual void set_tcs (TAO_Profile &theProfile, TAO_Transport &) = 0;
73 /// Called from an Object of TAO_Messaging for every request at server side
74 /// to process service context and set TCS for Char/WChar
75 virtual void process_service_context (TAO_ServerRequest &) = 0;
77 /// Called by a client object to generate service context
78 /// at this time Transport has the TCS for Char and WChar
79 virtual void generate_service_context (TAO_Operation_Details&, TAO_Transport & ) = 0;
81 virtual TAO_Codeset_Translator_Base * get_char_trans (CONV_FRAME::CodeSetId tcs) = 0;
83 virtual TAO_Codeset_Translator_Base * get_wchar_trans (CONV_FRAME::CodeSetId tcs) = 0;
85 virtual void open (TAO_ORB_Core& core) = 0;
87 virtual TAO_Codeset_Descriptor_Base *char_codeset_descriptor () = 0;
88 virtual TAO_Codeset_Descriptor_Base *wchar_codeset_descriptor () = 0;
90 virtual void get_ncs (CONV_FRAME::CodeSetId &ncsc,
91 CONV_FRAME::CodeSetId &ncsw) = 0;
94 TAO_END_VERSIONED_NAMESPACE_DECL
96 #include /**/ "ace/post.h"
98 #endif /* TAO_CODESET_MANAGER_H */