Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TAO_Codeset_Manager Class Reference

The encapsulation of logic for codeset negotiation. More...

#include <Codeset_Manager.h>

Collaboration diagram for TAO_Codeset_Manager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Codeset_Manager ()
 ~TAO_Codeset_Manager ()
void set_codeset (TAO_Tagged_Components &) const
void set_tcs (TAO_Profile &theProfile, TAO_Transport &)
void process_service_context (TAO_ServerRequest &)
void generate_service_context (TAO_Operation_Details &, TAO_Transport &)
void set_ncs_c (CONV_FRAME::CodeSetId ncs)
 Called by the resource factory to set the native char codeset id.
void set_ncs_w (CONV_FRAME::CodeSetId ncs, int maxbytes=0)
int add_char_translator (const char *name)
int add_wchar_translator (const char *name)
void configure_codeset_factories ()

Static Public Attributes

CONV_FRAME::CodeSetId default_char_codeset = TAO_DEFAULT_CHAR_CODESET_ID
 NCS for char is defaulted to ISO 8859-1:1987; Latin Alphabet No. 1.
CONV_FRAME::CodeSetId default_wchar_codeset = TAO_DEFAULT_WCHAR_CODESET_ID

Private Types

typedef ACE_Unbounded_Set<
TAO_Codeset_Item * > 
TAO_CodesetFactorySet
typedef ACE_Unbounded_Set_Iterator<
TAO_Codeset_Item * > 
TAO_CodesetFactorySetItor
 Iterators.

Private Member Functions

CONV_FRAME::CodeSetId computeTCS (CONV_FRAME::CodeSetComponent &, CONV_FRAME::CodeSetComponent &)
 Compute the TCS for Char/WChar asper the CORBA Specification.
int isElementOf (CONV_FRAME::CodeSetId, CONV_FRAME::CodeSetComponent &)
 Find CodesetId in the codeset component.
CONV_FRAME::CodeSetId intersectionOf (CONV_FRAME::CodeSetComponent &, CONV_FRAME::CodeSetComponent &)
 Find the intersection of CodesetIds between Client and Server CCS.
int isCompatible (CONV_FRAME::CodeSetId, CONV_FRAME::CodeSetId)
 Determine compatibility between two codesets via the codeset registry.
int init_codeset_factories_i (TAO_CodesetFactorySet &, CONV_FRAME::CodeSetComponent &)
 Initialise the specific type codeset factories.
TAO_Codeset_Translator_Factoryget_char_trans (CONV_FRAME::CodeSetId)
 Get the translator between our ncs_c and the supplied tcs_c.
TAO_Codeset_Translator_Factoryget_wchar_trans (CONV_FRAME::CodeSetId)
 Get the translator between our ncs_w and the supplied tcs_w.
TAO_Codeset_Translator_Factoryget_translator_i (TAO_CodesetFactorySet &, CONV_FRAME::CodeSetId)

Private Attributes

CONV_FRAME::CodeSetComponentInfo codeset_info_
TAO_CodesetFactorySet char_factories_
 The lists of available translators for both chars and wchars.
TAO_CodesetFactorySet wchar_factories_
TAO_Codeset_Translator_Factoryutf16_bom_translator_

Detailed Description

The encapsulation of logic for codeset negotiation.

The Codeset Manager is owned by the ORB_Core, initialized through Resource Factory configuration options. The codeset manager participates in profile creation by servers and connection establishment by clients. The involvement is necessary to supply a codeset component to the profile including for both chars and wide chars the native code set and any conversion code sets for which translators are available. The codeset manager is also responsible for determining the transmission codesets based an the local and remote codeset information. The transmission codesets are communicated via a service context attached to the first request sent on the new connection.


Member Typedef Documentation

typedef ACE_Unbounded_Set<TAO_Codeset_Item*> TAO_Codeset_Manager::TAO_CodesetFactorySet [private]
 

Typedefs for containers containing the list of codesets factories for character and wide character.

typedef ACE_Unbounded_Set_Iterator<TAO_Codeset_Item*> TAO_Codeset_Manager::TAO_CodesetFactorySetItor [private]
 

Iterators.


Constructor & Destructor Documentation

TAO_Codeset_Manager::TAO_Codeset_Manager  ) 
 

TAO_Codeset_Manager::~TAO_Codeset_Manager  ) 
 


Member Function Documentation

int TAO_Codeset_Manager::add_char_translator const char *  name  ) 
 

Called by the resource factory to add a potential codeset translator for char data. The actual factory will be added to the list later, if its ncs matches that of the codeset manager.

int TAO_Codeset_Manager::add_wchar_translator const char *  name  ) 
 

Called by the resource factory to add a potential codeset translator for wchar data. The actual factory will be added to the list later, if its ncs matches that of the codeset manager.

CONV_FRAME::CodeSetId TAO_Codeset_Manager::computeTCS CONV_FRAME::CodeSetComponent ,
CONV_FRAME::CodeSetComponent
[private]
 

Compute the TCS for Char/WChar asper the CORBA Specification.

void TAO_Codeset_Manager::configure_codeset_factories  ) 
 

Called by the resource factory to signify the end of initialization. This will traverse the list of named codeset translator factories and add any of those that have a native codeset id matching the manager's native codeset id.

void TAO_Codeset_Manager::generate_service_context TAO_Operation_Details ,
TAO_Transport
 

Called by a client object to generate service context at this time Transport has the TCS for Char and WChar

TAO_Codeset_Translator_Factory * TAO_Codeset_Manager::get_char_trans CONV_FRAME::CodeSetId   )  [private]
 

Get the translator between our ncs_c and the supplied tcs_c.

TAO_Codeset_Translator_Factory * TAO_Codeset_Manager::get_translator_i TAO_CodesetFactorySet ,
CONV_FRAME::CodeSetId 
[private]
 

TAO_Codeset_Translator_Factory * TAO_Codeset_Manager::get_wchar_trans CONV_FRAME::CodeSetId   )  [private]
 

Get the translator between our ncs_w and the supplied tcs_w.

int TAO_Codeset_Manager::init_codeset_factories_i TAO_CodesetFactorySet ,
CONV_FRAME::CodeSetComponent
[private]
 

Initialise the specific type codeset factories.

Traverse the list of codeset factories, populating the list of conversion codeset values with the translated codeset id from each factory that has a matching native codeset. Those factories that do not have a matching codeset are not retained in the list.

CONV_FRAME::CodeSetId TAO_Codeset_Manager::intersectionOf CONV_FRAME::CodeSetComponent ,
CONV_FRAME::CodeSetComponent
[private]
 

Find the intersection of CodesetIds between Client and Server CCS.

int TAO_Codeset_Manager::isCompatible CONV_FRAME::CodeSetId  ,
CONV_FRAME::CodeSetId 
[private]
 

Determine compatibility between two codesets via the codeset registry.

int TAO_Codeset_Manager::isElementOf CONV_FRAME::CodeSetId  ,
CONV_FRAME::CodeSetComponent
[private]
 

Find CodesetId in the codeset component.

void TAO_Codeset_Manager::process_service_context TAO_ServerRequest  ) 
 

Called from an Object of TAO_Messaging for every request at server side to process service context and set TCS for Char/WChar

void TAO_Codeset_Manager::set_codeset TAO_Tagged_Components  )  const
 

Called by an object of TAO_Acceptor to set NCS and CCS values for Char/Wchar in to the Object Reference.

void TAO_Codeset_Manager::set_ncs_c CONV_FRAME::CodeSetId  ncs  ) 
 

Called by the resource factory to set the native char codeset id.

void TAO_Codeset_Manager::set_ncs_w CONV_FRAME::CodeSetId  ncs,
int  maxbytes = 0
 

Called by the resource factory to set the native wchar codeset id. The maxbytes value is used to communicate the width of untranslated wide characters on the stream. This size may be smaller than the size of a wchar_t.

void TAO_Codeset_Manager::set_tcs TAO_Profile theProfile,
TAO_Transport
 

Called from an object of "TAO_GIOP_Invocation" to set TCS on the Transport


Member Data Documentation

TAO_CodesetFactorySet TAO_Codeset_Manager::char_factories_ [private]
 

The lists of available translators for both chars and wchars.

CONV_FRAME::CodeSetComponentInfo TAO_Codeset_Manager::codeset_info_ [private]
 

The CodeSetComponentInfo struct contains all of the information regarding the code sets this application recognizes. This is where the native code set for both char and wchar are stored.

CONV_FRAME::CodeSetId TAO_Codeset_Manager::default_char_codeset = TAO_DEFAULT_CHAR_CODESET_ID [static]
 

NCS for char is defaulted to ISO 8859-1:1987; Latin Alphabet No. 1.

CONV_FRAME::CodeSetId TAO_Codeset_Manager::default_wchar_codeset = TAO_DEFAULT_WCHAR_CODESET_ID [static]
 

NCS for wchar is defaulted to 0 (not used), but people wishing to provide a non-compliant default wchar codeset may do so.

TAO_Codeset_Translator_Factory* TAO_Codeset_Manager::utf16_bom_translator_ [private]
 

The UTF16 BOM (Byte Order Marker) translator is unique in that it is required when UTF16 is used as both the native and transmitted codeset. It exists to insert or extract the BOM preceeding Wchar data in the stream.

TAO_CodesetFactorySet TAO_Codeset_Manager::wchar_factories_ [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Jun 9 00:17:06 2005 for TAO by  doxygen 1.3.9.1