Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Char_Codeset_Translator Class Reference

Codeset translation routines common to both Output and Input CDR streams. More...

#include <CDR_Stream.h>

List of all members.

Public Methods

virtual ~ACE_Char_Codeset_Translator ()
virtual ACE_CDR::Boolean read_char (ACE_InputCDR &, ACE_CDR::Char &)=0
 Read a single character from the stream, converting from the stream codeset to the native codeset. More...

virtual ACE_CDR::Boolean read_string (ACE_InputCDR &, ACE_CDR::Char *&)=0
 Read a string from the stream, including the length, converting the characters from the stream codeset to the native codeset. More...

virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &, ACE_CDR::Char *, ACE_CDR::ULong)=0
 Read an array of characters from the stream, converting the characters from the stream codeset to the native codeset. More...

virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &, ACE_CDR::Char)=0
 Write a single character to the stream, converting from the native codeset to the stream codeset. More...

virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &, ACE_CDR::ULong, const ACE_CDR::Char *)=0
 Write a string to the stream, including the length, converting from the native codeset to the stream codeset. More...

virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &, const ACE_CDR::Char *, ACE_CDR::ULong)=0
 Write an array of characters to the stream, converting from the native codeset to the stream codeset. More...

virtual ACE_CDR::ULong ncs ()=0
virtual ACE_CDR::ULong tcs ()=0

Protected Methods

ACE_CDR::Boolean read_1 (ACE_InputCDR &input, ACE_CDR::Octet *x)
 Children have access to low-level routines because they cannot use read_char or something similar (it would recurse). More...

ACE_CDR::Boolean write_1 (ACE_OutputCDR &output, const ACE_CDR::Octet *x)
ACE_CDR::Boolean read_array (ACE_InputCDR &input, void *x, size_t size, size_t align, ACE_CDR::ULong length)
 Efficiently read <length> elements of size <size> each from into <x>; the data must be aligned to <align>. More...

ACE_CDR::Boolean write_array (ACE_OutputCDR &output, const void *x, size_t size, size_t align, ACE_CDR::ULong length)
int adjust (ACE_OutputCDR &out, size_t size, size_t align, char *&buf)
void good_bit (ACE_OutputCDR &out, int bit)
 Used by derived classes to set errors in the CDR stream. More...

ACE_CDR::Octet major_version (ACE_InputCDR &input)
 Obtain the CDR Stream's major & minor version values. More...

ACE_CDR::Octet minor_version (ACE_InputCDR &input)
ACE_CDR::Octet major_version (ACE_OutputCDR &output)
ACE_CDR::Octet minor_version (ACE_OutputCDR &output)


Detailed Description

Codeset translation routines common to both Output and Input CDR streams.

This class is a base class for defining codeset translation routines to handle the character set translations required by both CDR Input streams and CDR Output streams.

Translators are reference counted. This allows for stateful as well as stateless translators. Stateless translators will be allocated once whereas CDR Streams own their own copy of a stateful translator.

Definition at line 952 of file CDR_Stream.h.


Constructor & Destructor Documentation

virtual ACE_Char_Codeset_Translator::~ACE_Char_Codeset_Translator   [inline, virtual]
 

Definition at line 955 of file CDR_Stream.h.

00955 {};


Member Function Documentation

ACE_INLINE int ACE_Char_Codeset_Translator::adjust ACE_OutputCDR   out,
size_t    size,
size_t    align,
char *&    buf
[protected]
 

Exposes the stream implementation of <adjust>, this is useful in many cases to minimize memory allocations during marshaling. On success <buf> will contain a contiguous area in the CDR stream that can hold <size> bytes aligned to <align>. Results

Definition at line 1508 of file CDR_Stream.i.

References ACE_OutputCDR::adjust.

01512 {
01513   return out.adjust(size, align, buf);
01514 }

ACE_INLINE void ACE_Char_Codeset_Translator::good_bit ACE_OutputCDR   out,
int    bit
[protected]
 

Used by derived classes to set errors in the CDR stream.

Definition at line 1517 of file CDR_Stream.i.

References ACE_OutputCDR::good_bit_.

01518 {
01519   out.good_bit_ = bit;
01520 }

ACE_INLINE ACE_CDR::Octet ACE_Char_Codeset_Translator::major_version ACE_OutputCDR   output [protected]
 

Definition at line 1535 of file CDR_Stream.i.

References ACE_OutputCDR::major_version_.

01536 {
01537   return output.major_version_;
01538 }

ACE_INLINE ACE_CDR::Octet ACE_Char_Codeset_Translator::major_version ACE_InputCDR   input [protected]
 

Obtain the CDR Stream's major & minor version values.

Definition at line 1523 of file CDR_Stream.i.

References ACE_InputCDR::major_version_.

01524 {
01525   return input.major_version_;
01526 }

ACE_INLINE ACE_CDR::Octet ACE_Char_Codeset_Translator::minor_version ACE_OutputCDR   output [protected]
 

Definition at line 1541 of file CDR_Stream.i.

References ACE_OutputCDR::minor_version_.

01542 {
01543   return output.minor_version_;
01544 }

ACE_INLINE ACE_CDR::Octet ACE_Char_Codeset_Translator::minor_version ACE_InputCDR   input [protected]
 

Definition at line 1529 of file CDR_Stream.i.

References ACE_InputCDR::minor_version_.

01530 {
01531   return input.minor_version_;
01532 }

virtual ACE_CDR::ULong ACE_Char_Codeset_Translator::ncs   [pure virtual]
 

ACE_INLINE ACE_CDR::Boolean ACE_Char_Codeset_Translator::read_1 ACE_InputCDR   input,
ACE_CDR::Octet   x
[protected]
 

Children have access to low-level routines because they cannot use read_char or something similar (it would recurse).

Definition at line 1474 of file CDR_Stream.i.

References ACE_CDR::Octet, and ACE_InputCDR::read_1.

01476 {
01477   return input.read_1 (x);
01478 }

ACE_INLINE ACE_CDR::Boolean ACE_Char_Codeset_Translator::read_array ACE_InputCDR   input,
void *    x,
size_t    size,
size_t    align,
ACE_CDR::ULong    length
[protected]
 

Efficiently read <length> elements of size <size> each from into <x>; the data must be aligned to <align>.

Definition at line 1488 of file CDR_Stream.i.

References ACE_InputCDR::read_array, and ACE_CDR::ULong.

01493 {
01494   return in.read_array (x, size, align, length);
01495 }

virtual ACE_CDR::Boolean ACE_Char_Codeset_Translator::read_char ACE_InputCDR  ,
ACE_CDR::Char  
[pure virtual]
 

Read a single character from the stream, converting from the stream codeset to the native codeset.

Referenced by ACE_InputCDR::read_char.

virtual ACE_CDR::Boolean ACE_Char_Codeset_Translator::read_char_array ACE_InputCDR  ,
ACE_CDR::Char  ,
ACE_CDR::ULong   
[pure virtual]
 

Read an array of characters from the stream, converting the characters from the stream codeset to the native codeset.

Referenced by ACE_InputCDR::read_char_array.

virtual ACE_CDR::Boolean ACE_Char_Codeset_Translator::read_string ACE_InputCDR  ,
ACE_CDR::Char *&   
[pure virtual]
 

Read a string from the stream, including the length, converting the characters from the stream codeset to the native codeset.

Referenced by ACE_InputCDR::read_string.

virtual ACE_CDR::ULong ACE_Char_Codeset_Translator::tcs   [pure virtual]
 

ACE_INLINE ACE_CDR::Boolean ACE_Char_Codeset_Translator::write_1 ACE_OutputCDR   output,
const ACE_CDR::Octet   x
[protected]
 

Definition at line 1481 of file CDR_Stream.i.

References ACE_CDR::Octet, and ACE_OutputCDR::write_1.

01483 {
01484   return output.write_1 (x);
01485 }

ACE_INLINE ACE_CDR::Boolean ACE_Char_Codeset_Translator::write_array ACE_OutputCDR   output,
const void *    x,
size_t    size,
size_t    align,
ACE_CDR::ULong    length
[protected]
 

Efficiently write <length> elements of size <size> from <x> into <output>. Before inserting the elements enough padding is added to ensure that the elements will be aligned to <align> in the stream.

Definition at line 1498 of file CDR_Stream.i.

References ACE_CDR::ULong, and ACE_OutputCDR::write_array.

01503 {
01504   return out.write_array(x, size, align, length);
01505 }

virtual ACE_CDR::Boolean ACE_Char_Codeset_Translator::write_char ACE_OutputCDR  ,
ACE_CDR::Char   
[pure virtual]
 

Write a single character to the stream, converting from the native codeset to the stream codeset.

Referenced by ACE_OutputCDR::write_char.

virtual ACE_CDR::Boolean ACE_Char_Codeset_Translator::write_char_array ACE_OutputCDR  ,
const ACE_CDR::Char  ,
ACE_CDR::ULong   
[pure virtual]
 

Write an array of characters to the stream, converting from the native codeset to the stream codeset.

Referenced by ACE_OutputCDR::write_char_array.

virtual ACE_CDR::Boolean ACE_Char_Codeset_Translator::write_string ACE_OutputCDR  ,
ACE_CDR::ULong   ,
const ACE_CDR::Char  
[pure virtual]
 

Write a string to the stream, including the length, converting from the native codeset to the stream codeset.

Referenced by ACE_OutputCDR::write_string.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:46:34 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002