Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound 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:

[legend]
List of all members.

## Public Methods

| 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

## Private Methods

CONV_FRAME::CodeSetId | computeTCS (CONV_FRAME::CodeSetComponent &, CONV_FRAME::CodeSetComponent &)
| returns the TCS for Char / Wchar
int | isElementOf (CONV_FRAME::CodeSetId, CONV_FRAME::CodeSetComponent &)
| Checks whether the NCS is a part of CCS.
CONV_FRAME::CodeSetId | intersectionOf (CONV_FRAME::CodeSetComponent &, CONV_FRAME::CodeSetComponent &)
| Find the Intersection of Client and Server CCS's.
int | isCompatible (CONV_FRAME::CodeSetId, CONV_FRAME::CodeSetId)
int | init_codeset_factories_i (TAO_CodesetFactorySet &, CONV_FRAME::CodeSetComponent &)
| Initialise the specific type codeset factories.
TAO_Codeset_Translator_Factory * | get_char_trans (CONV_FRAME::CodeSetId)
TAO_Codeset_Translator_Factory * | get_wchar_trans (CONV_FRAME::CodeSetId)
TAO_Codeset_Translator_Factory * | get_translator_i (TAO_CodesetFactorySet &, CONV_FRAME::CodeSetId)

## Private Attributes

CONV_FRAME::CodeSetComponentInfo | codeset_info_
TAO_CodesetFactorySet | char_factories_
TAO_CodesetFactorySet | wchar_factories_

## 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]`

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

## 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]`

| returns the TCS for Char / Wchar

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]`

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]`

int TAO_Codeset_Manager::init_codeset_factories_i | ( | TAO_CodesetFactorySet & | ,
|  | CONV_FRAME::CodeSetComponent & |
| ) | `[private]`

| Initialise the specific type codeset factories.

CONV_FRAME::CodeSetId TAO_Codeset_Manager::intersectionOf | ( | CONV_FRAME::CodeSetComponent & | ,
|  | CONV_FRAME::CodeSetComponent & |
| ) | `[private]`

| Find the Intersection of Client and Server CCS's.

int TAO_Codeset_Manager::isCompatible | ( | CONV_FRAME::CodeSetId | ,
|  | CONV_FRAME::CodeSetId |
| ) | `[private]`

int TAO_Codeset_Manager::isElementOf | ( | CONV_FRAME::CodeSetId | ,
|  | CONV_FRAME::CodeSetComponent & |
| ) | `[private]`

| Checks whether the NCS is a part of CCS.

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]`

CONV_FRAME::CodeSetComponentInfo TAO_Codeset_Manager::codeset_info_`[private]`

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_CodesetFactorySet TAO_Codeset_Manager::wchar_factories_`[private]`

The documentation for this class was generated from the following files:

- Codeset_Manager.h
- Codeset_Manager.cpp