Public Member Functions

TAO_Marshal_Primitive Class Reference

TAO_Marshal_Primitive. More...

#include <Marshal.h>

Inheritance diagram for TAO_Marshal_Primitive:
Inheritance graph
[legend]
Collaboration diagram for TAO_Marshal_Primitive:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_Marshal_Primitive (void)
virtual TAO::traverse_status skip (CORBA::TypeCode_ptr tc, TAO_InputCDR *context)
 skip operation
virtual TAO::traverse_status append (CORBA::TypeCode_ptr tc, TAO_InputCDR *src, TAO_OutputCDR *dest)
 append operation

Detailed Description

TAO_Marshal_Primitive.

marshaling primitives

Definition at line 114 of file Marshal.h.


Constructor & Destructor Documentation

TAO_Marshal_Primitive::TAO_Marshal_Primitive ( void   ) 

Definition at line 13 of file Marshal.inl.

{
}


Member Function Documentation

TAO::traverse_status TAO_Marshal_Primitive::append ( CORBA::TypeCode_ptr  tc,
TAO_InputCDR src,
TAO_OutputCDR dest 
) [virtual]

append operation

Implements TAO_Marshal_Object.

Definition at line 45 of file append.cpp.

{
  CORBA::Boolean continue_append = true;
  TAO::traverse_status retval =
    TAO::TRAVERSE_CONTINUE; // status of encode operation

  CORBA::TCKind const k = tc->kind ();

  switch (k)
    {
    case CORBA::tk_null:
    case CORBA::tk_void:
      break;
    case CORBA::tk_short:
    case CORBA::tk_ushort:
      continue_append = dest->append_short (*src);
      break;
    case CORBA::tk_long:
    case CORBA::tk_ulong:
    case CORBA::tk_float:
    case CORBA::tk_enum:
      continue_append = dest->append_long (*src);
      break;
    case CORBA::tk_double:
    case CORBA::tk_longlong:
    case CORBA::tk_ulonglong:
      continue_append = dest->append_double (*src);
      break;
    case CORBA::tk_boolean:
      continue_append = dest->append_boolean (*src);
      break;
    case CORBA::tk_char:
    case CORBA::tk_octet:
      continue_append = dest->append_octet (*src);
      break;
    case CORBA::tk_longdouble:
      continue_append = dest->append_longdouble (*src);
      break;
    case CORBA::tk_wchar:
      continue_append = dest->append_wchar (*src);
      break;
    default:
      retval = TAO::TRAVERSE_STOP;
      // we are not a primitive type
    }

  if (retval == TAO::TRAVERSE_CONTINUE
      && continue_append == 1)
    return TAO::TRAVERSE_CONTINUE;

  if (TAO_debug_level > 0)
    ACE_DEBUG ((
        LM_DEBUG,
        ACE_TEXT ("TAO_Marshal_Primitive::append detected error\n")
      ));

  throw ::CORBA::MARSHAL (0, CORBA::COMPLETED_MAYBE);
}

TAO::traverse_status TAO_Marshal_Primitive::skip ( CORBA::TypeCode_ptr  tc,
TAO_InputCDR context 
) [virtual]

skip operation

Implements TAO_Marshal_Object.

Definition at line 39 of file skip.cpp.

{
  CORBA::Boolean continue_skipping = true;

  // Status of skip operation.
  TAO::traverse_status retval = TAO::TRAVERSE_CONTINUE;

  CORBA::TCKind const k = tc->kind ();

  switch (k)
    {
    case CORBA::tk_null:
    case CORBA::tk_void:
      break;
    case CORBA::tk_short:
    case CORBA::tk_ushort:
      continue_skipping = stream->skip_short ();
      break;
    case CORBA::tk_long:
    case CORBA::tk_ulong:
    case CORBA::tk_float:
    case CORBA::tk_enum:
      continue_skipping = stream->skip_long ();
      break;
    case CORBA::tk_double:
    case CORBA::tk_longlong:
    case CORBA::tk_ulonglong:
      continue_skipping = stream->skip_longlong ();
      break;
    case CORBA::tk_boolean:
      continue_skipping = stream->skip_boolean ();
      break;
    case CORBA::tk_char:
    case CORBA::tk_octet:
      continue_skipping = stream->skip_char ();
      break;
    case CORBA::tk_longdouble:
      continue_skipping = stream->skip_longdouble ();
      break;
    case CORBA::tk_wchar:
      continue_skipping = stream->skip_wchar ();
      break;
    default:
      retval = TAO::TRAVERSE_STOP;
      // we are not a primitive type
    }
  if (retval == TAO::TRAVERSE_CONTINUE && continue_skipping)
    return TAO::TRAVERSE_CONTINUE;
  else
    {
      if (TAO_debug_level > 0)
        ACE_DEBUG ((
            LM_DEBUG,
            ACE_TEXT ("TAO_Marshal_Primitive::skip detected error\n")
          ));
      throw ::CORBA::MARSHAL (0, CORBA::COMPLETED_MAYBE);
    }
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines