Interpreter_Utils.cpp

Go to the documentation of this file.
00001 // $Id: Interpreter_Utils.cpp 77001 2007-02-12 07:54:49Z johnnyw $
00002 
00003 #include "orbsvcs/Trader/Interpreter_Utils.h"
00004 
00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 // TAO_Sequence_Extracter_Base
00008 
00009 CORBA::TCKind
00010 TAO_Sequence_Extracter_Base::
00011 sequence_type (CORBA::TypeCode* type_code)
00012 {
00013   // @@ Seth, why do you use a comma to separate the two statements?
00014   CORBA::TCKind return_value = CORBA::tk_void,
00015   type_kind = type_code->kind ();
00016 
00017   if (type_kind == CORBA::tk_alias
00018       || type_kind == CORBA::tk_sequence)
00019     {
00020       CORBA::TypeCode_var base = CORBA::TypeCode::_duplicate (type_code);
00021 
00022       for (;;)
00023         {
00024           CORBA::TCKind base_kind = base->kind ();
00025 
00026           if (base_kind == CORBA::tk_alias)
00027             {
00028               base = base->content_type ();
00029             }
00030           else
00031             break;
00032         }
00033 
00034       CORBA::TCKind base_kind = base->kind ();
00035 
00036       if (base_kind == CORBA::tk_sequence)
00037         {
00038           base = base->content_type ();
00039 
00040           base_kind = base->kind ();
00041           return_value = base_kind;
00042         }
00043     }
00044 
00045   return return_value;
00046 }
00047 
00048 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:49:26 2010 for TAO_CosTrader by  doxygen 1.4.7