|
Definition at line 39 of file TypeCode_CDR_Extraction.h. |
|
|
Definition at line 1107 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_objref_factory().
01111 { 01112 return tc_objref_factory (CORBA::tk_abstract_interface, cdr, tc, infos); 01113 } |
|
Definition at line 871 of file TypeCode_CDR_Extraction.cpp. References ACE_NEW_RETURN, start_cdr_encap_extraction(), tc_demarshal(), and TC_Info_List. Referenced by tc_value_box_factory().
00875 { 00876 // The remainder of a tk_alias or tk_value_box TypeCode is encoded 00877 // in a CDR encapsulation. 00878 00879 if (!start_cdr_encap_extraction (cdr)) 00880 return false; 00881 00882 // Extract the repository ID, name and content type. 00883 CORBA::String_var id, name; 00884 CORBA::TypeCode_var content_type; 00885 if (!(cdr >> TAO_InputCDR::to_string (id.out (), 0) 00886 && cdr >> TAO_InputCDR::to_string (name.out (), 0) 00887 && tc_demarshal (cdr, content_type.out (), infos))) 00888 { 00889 return false; 00890 } 00891 00892 typedef TAO::TypeCode::Alias< 00893 CORBA::String_var, 00894 CORBA::TypeCode_var, 00895 TAO::True_RefCount_Policy> typecode_type; 00896 00897 ACE_NEW_RETURN (tc, 00898 typecode_type (kind, 00899 id.in (), 00900 name.in (), 00901 content_type), 00902 false); 00903 return true; 00904 } |
|
Definition at line 287 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00291 { 00292 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_any); 00293 00294 return true; 00295 } |
|
Definition at line 862 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_sequence_factory().
00866 { 00867 return tc_sequence_factory (kind, cdr, tc, infos); 00868 } |
|
Definition at line 254 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00258 { 00259 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_boolean); 00260 00261 return true; 00262 } |
|
Definition at line 265 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00269 { 00270 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_char); 00271 00272 return true; 00273 } |
|
Definition at line 1125 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_objref_factory().
01129 { 01130 return tc_objref_factory (CORBA::tk_component, cdr, tc, infos); 01131 } |
|
Definition at line 243 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00247 { 00248 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_double); 00249 00250 return true; 00251 } |
|
Definition at line 750 of file TypeCode_CDR_Extraction.cpp. References ACE_NEW_RETURN, start_cdr_encap_extraction(), and TC_Info_List.
00754 { 00755 // The remainder of a tk_enum TypeCode is encoded in a CDR 00756 // encapsulation. 00757 00758 if (!start_cdr_encap_extraction (cdr)) 00759 return false; 00760 00761 // Extract the repository ID, name and number of fields. 00762 CORBA::String_var id, name; 00763 CORBA::ULong nenumerators; 00764 00765 if (!(cdr >> TAO_InputCDR::to_string (id.out (), 0) 00766 && cdr >> TAO_InputCDR::to_string (name.out (), 0) 00767 && cdr >> nenumerators)) 00768 return false; 00769 00770 ACE_Array_Base<CORBA::String_var> enumerators (nenumerators); 00771 00772 for (CORBA::ULong i = 0; i < nenumerators; ++i) 00773 { 00774 if (!(cdr >> TAO_InputCDR::to_string (enumerators[i].out (), 0))) 00775 return false; 00776 } 00777 00778 typedef TAO::TypeCode::Enum< 00779 CORBA::String_var, 00780 ACE_Array_Base<CORBA::String_var>, 00781 TAO::True_RefCount_Policy> typecode_type; 00782 00783 ACE_NEW_RETURN (tc, 00784 typecode_type (id.in (), 00785 name.in (), 00786 enumerators, // Will be copied. 00787 nenumerators), 00788 false); 00789 00790 return true; 00791 } |
|
Definition at line 1143 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_value_factory().
01147 { 01148 return tc_value_factory (kind, cdr, tc, infos); 01149 } |
|
Definition at line 907 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_struct_factory().
00911 { 00912 return tc_struct_factory (kind, cdr, tc, infos); 00913 } |
|
Definition at line 969 of file TypeCode_CDR_Extraction.cpp. References ACE_NEW_RETURN, and TC_Info_List.
00973 { 00974 // A tk_fixed TypeCode has a simple parameter list, i.e. it is not 00975 // encoded in a CDR encapsulation. 00976 00977 CORBA::UShort digits, scale; 00978 if (!(cdr >> digits && cdr >> scale)) 00979 return false; 00980 00981 typedef TAO::TypeCode::Fixed<TAO::True_RefCount_Policy> typecode_type; 00982 00983 ACE_NEW_RETURN (tc, 00984 typecode_type (digits, scale), 00985 false); 00986 00987 return true; 00988 } |
|
Definition at line 232 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00236 { 00237 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_float); 00238 00239 return true; 00240 } |
|
Definition at line 1134 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_objref_factory().
01138 { 01139 return tc_objref_factory (CORBA::tk_home, cdr, tc, infos); 01140 } |
|
Definition at line 1116 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_objref_factory().
01120 { 01121 return tc_objref_factory (CORBA::tk_local_interface, cdr, tc, infos); 01122 } |
|
Definition at line 199 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00203 { 00204 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_long); 00205 00206 return true; 00207 } |
|
Definition at line 938 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00942 { 00943 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_longdouble); 00944 00945 return true; 00946 } |
|
Definition at line 916 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00920 { 00921 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_longlong); 00922 00923 return true; 00924 } |
|
Definition at line 1098 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_objref_factory().
01102 { 01103 return tc_objref_factory (CORBA::tk_native, cdr, tc, infos); 01104 } |
|
Definition at line 166 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00170 { 00171 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_null); 00172 00173 return true; 00174 } |
|
Definition at line 320 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), CORBA::TypeCode::_nil(), ACE_NEW_RETURN, ACE_InputCDR::skip_string(), start_cdr_encap_extraction(), ACE_OS::strcmp(), and TC_Info_List. Referenced by tc_abstract_interface_factory(), tc_component_factory(), tc_home_factory(), tc_local_interface_factory(), and tc_native_factory().
00324 { 00325 // The remainder of a tk_objref TypeCode is encoded in a CDR 00326 // encapsulation. 00327 if (!start_cdr_encap_extraction (cdr)) 00328 return false; 00329 00330 // Extract the repository ID and name. 00331 CORBA::String_var id; 00332 if (!(cdr >> TAO_InputCDR::to_string (id.out (), 0))) 00333 return false; 00334 00335 static char const Object_id[] = "IDL:omg.org/CORBA/Object:1.0"; 00336 static char const CCMObject_id[] = "IDL:omg.org/CORBA/CCMObject:1.0"; 00337 static char const CCMHome_id[] = "IDL:omg.org/CORBA/CCMHome:1.0"; 00338 00339 char const * tc_constant_id = ""; 00340 00341 switch (kind) 00342 { 00343 case CORBA::tk_component: 00344 tc_constant_id = CCMObject_id; 00345 break; 00346 case CORBA::tk_home: 00347 tc_constant_id = CCMHome_id; 00348 break; 00349 case CORBA::tk_objref: 00350 tc_constant_id = Object_id; 00351 break; 00352 default: 00353 break; 00354 } 00355 00356 if (ACE_OS::strcmp (id.in (), // len >= 0!!! 00357 tc_constant_id) == 0) 00358 { 00359 if (!cdr.skip_string ()) // No need to demarshal the name. 00360 return false; 00361 00362 CORBA::TypeCode_ptr tc_constant = CORBA::TypeCode::_nil (); 00363 switch (kind) 00364 { 00365 case CORBA::tk_component: 00366 tc_constant = CORBA::_tc_Component; 00367 break; 00368 case CORBA::tk_home: 00369 tc_constant = CORBA::_tc_Home; 00370 break; 00371 case CORBA::tk_objref: 00372 tc_constant = CORBA::_tc_Object; 00373 break; 00374 default: 00375 break; 00376 } 00377 00378 // No need to create a TypeCode. Just use the TypeCode 00379 // constant. 00380 tc = 00381 CORBA::TypeCode::_duplicate (tc_constant); 00382 } 00383 else 00384 { 00385 CORBA::String_var name; 00386 00387 if (!(cdr >> TAO_InputCDR::to_string (name.out (), 0))) 00388 return false; 00389 00390 typedef TAO::TypeCode::Objref<CORBA::String_var, 00391 TAO::True_RefCount_Policy> typecode_type; 00392 00393 ACE_NEW_RETURN (tc, 00394 typecode_type (kind, 00395 id.in (), 00396 name.in ()), 00397 false); 00398 } 00399 00400 return true; 00401 } |
|
Definition at line 276 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00280 { 00281 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_octet); 00282 00283 return true; 00284 } |
|
Definition at line 309 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00313 { 00314 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_Principal); 00315 00316 return true; 00317 } |
|
Definition at line 829 of file TypeCode_CDR_Extraction.cpp. References ACE_ASSERT, ACE_NEW_RETURN, start_cdr_encap_extraction(), tc_demarshal(), and TC_Info_List. Referenced by tc_array_factory().
00833 { 00834 ACE_ASSERT (kind == CORBA::tk_sequence || kind == CORBA::tk_array); 00835 00836 // The remainder of a tk_sequence TypeCode is encoded in a CDR 00837 // encapsulation. 00838 00839 if (!start_cdr_encap_extraction (cdr)) 00840 return false; 00841 00842 // Extract the repository ID, name and content type. 00843 CORBA::TypeCode_var content_type; 00844 CORBA::ULong length; 00845 00846 if (!(tc_demarshal (cdr, content_type.out (), infos) 00847 && cdr >> length)) 00848 return false; 00849 00850 typedef TAO::TypeCode::Sequence< 00851 CORBA::TypeCode_var, 00852 TAO::True_RefCount_Policy> typecode_type; 00853 00854 ACE_NEW_RETURN (tc, 00855 typecode_type (kind, content_type, length), 00856 false); 00857 00858 return true; 00859 } |
|
Definition at line 188 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00192 { 00193 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_short); 00194 00195 return true; 00196 } |
|
Definition at line 794 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), ACE_NEW_RETURN, and TC_Info_List. Referenced by tc_wstring_factory().
00798 { 00799 // A tk_string/tk_wstring TypeCode has a simple parameter list, 00800 // i.e. it is not encoded in a CDR encapsulation. 00801 00802 CORBA::ULong bound; 00803 if (!(cdr >> bound)) 00804 return false; 00805 00806 if (bound == 0) 00807 { 00808 // Just use the TypeCode constant. 00809 if (kind == CORBA::tk_string) 00810 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_string); 00811 else if (kind == CORBA::tk_wstring) 00812 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_wstring); 00813 else 00814 return false; 00815 00816 return true; 00817 } 00818 00819 typedef TAO::TypeCode::String<TAO::True_RefCount_Policy> typecode_type; 00820 00821 ACE_NEW_RETURN (tc, 00822 typecode_type (kind, bound), 00823 false); 00824 00825 return true; 00826 } |
|
Definition at line 404 of file TypeCode_CDR_Extraction.cpp. References ACE_ASSERT, ACE_NEW_RETURN, find_recursive_tc(), ACE_Array_Base< T >::size(), start_cdr_encap_extraction(), tc_demarshal(), TC_Info_List, and TAO::TypeCodeFactory::TC_Info::type. Referenced by tc_except_factory().
00408 { 00409 ACE_ASSERT (kind == CORBA::tk_struct || kind == CORBA::tk_except); 00410 00411 // The remainder of a tk_struct/tk_except TypeCode is encoded in 00412 // a CDR encapsulation. 00413 if (!start_cdr_encap_extraction (cdr)) 00414 return false; 00415 00416 // Extract the repository ID, name and number of fields. 00417 CORBA::String_var id, name; 00418 CORBA::ULong nfields; 00419 00420 if (!(cdr >> TAO_InputCDR::to_string (id.out (), 0) 00421 && cdr >> TAO_InputCDR::to_string (name.out (), 0) 00422 && cdr >> nfields)) 00423 return false; 00424 00425 typedef ACE_Array_Base<TAO::TypeCode::Struct_Field<CORBA::String_var, 00426 CORBA::TypeCode_var> > 00427 member_array_type; 00428 00429 member_array_type fields (nfields); 00430 00431 for (CORBA::ULong i = 0; i < nfields; ++i) 00432 { 00433 if (!(cdr >> TAO_InputCDR::to_string (fields[i].name.out (), 0) 00434 && tc_demarshal (cdr, fields[i].type.out (), infos))) 00435 return false; 00436 } 00437 00438 typedef TAO::TypeCode::Struct< 00439 CORBA::String_var, 00440 CORBA::TypeCode_var, 00441 member_array_type, 00442 TAO::True_RefCount_Policy> typecode_type; 00443 00444 // Check if struct TypeCode is recursive. 00445 TAO::TypeCodeFactory::TC_Info_List recursive_tc; 00446 if (kind == CORBA::tk_struct && find_recursive_tc (id.in (), recursive_tc, infos)) 00447 { 00448 // Set remaining parameters. 00449 typedef TAO::TypeCode::Recursive_Type<typecode_type, 00450 CORBA::TypeCode_var, 00451 member_array_type> 00452 recursive_typecode_type; 00453 00454 size_t const len = recursive_tc.size (); 00455 00456 for (size_t i = 0; i < len; ++i) 00457 { 00458 TAO::TypeCodeFactory::TC_Info & info = recursive_tc[i]; 00459 00460 recursive_typecode_type * const rtc = 00461 dynamic_cast<recursive_typecode_type *> (info.type); 00462 00463 if (!rtc) 00464 return false; // Should never occur. 00465 00466 rtc->struct_parameters (name.in (), fields, nfields); 00467 } 00468 00469 tc = recursive_tc[0].type; 00470 } 00471 else 00472 { 00473 ACE_NEW_RETURN (tc, 00474 typecode_type (kind, 00475 id.in (), 00476 name.in (), 00477 fields, // Will be copied. 00478 nfields), 00479 false); 00480 } 00481 00482 return true; 00483 } |
|
Definition at line 298 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00302 { 00303 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_TypeCode); 00304 00305 return true; 00306 } |
|
Definition at line 221 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00225 { 00226 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_ulong); 00227 00228 return true; 00229 } |
|
Definition at line 927 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00931 { 00932 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_ulonglong); 00933 00934 return true; 00935 } |
|
Definition at line 486 of file TypeCode_CDR_Extraction.cpp. References ACE_NEW_RETURN, find_recursive_tc(), ACE_Array_Base< T >::size(), start_cdr_encap_extraction(), tc_demarshal(), TC_Info_List, CORBA::Any::to_boolean, CORBA::Any::to_char, TAO::TypeCodeFactory::TC_Info::type, union_case_array_type, and union_elem_type.
00490 { 00491 // The remainder of a tk_enum TypeCode is encoded in a CDR 00492 // encapsulation. 00493 00494 if (!start_cdr_encap_extraction (cdr)) 00495 return false; 00496 00497 // Extract the repository ID, name, discriminant type, default index 00498 // and case count. 00499 CORBA::String_var id, name; 00500 CORBA::TypeCode_var discriminant_type; 00501 CORBA::Long default_index = -1; 00502 CORBA::ULong ncases = 0; // Just 'n case :-) 00503 00504 if (!(cdr >> TAO_InputCDR::to_string (id.out (), 0) 00505 && cdr >> TAO_InputCDR::to_string (name.out (), 0) 00506 && cdr >> discriminant_type.out ())) // No need to use tc_demarshal() 00507 return false; 00508 00509 CORBA::TCKind const discriminant_kind = 00510 discriminant_type->kind (); 00511 00512 // Check for valid discriminant type. 00513 if (!(discriminant_kind == CORBA::tk_enum 00514 || discriminant_kind == CORBA::tk_ulong 00515 || discriminant_kind == CORBA::tk_long 00516 || discriminant_kind == CORBA::tk_ushort 00517 || discriminant_kind == CORBA::tk_short 00518 || discriminant_kind == CORBA::tk_char 00519 || discriminant_kind == CORBA::tk_boolean 00520 || discriminant_kind == CORBA::tk_longlong 00521 || discriminant_kind == CORBA::tk_ulonglong)) 00522 return false; 00523 00524 if (!(cdr >> default_index 00525 && default_index >= -1 00526 && cdr >> ncases)) 00527 return false; 00528 00529 typedef union_elem_type elem_type; 00530 typedef union_case_array_type case_array_type; 00531 00532 case_array_type cases (ncases); 00533 00534 for (CORBA::ULong i = 0; i < ncases; ++i) 00535 { 00536 elem_type & member = cases[i]; 00537 00538 TAO::TypeCode::Case<CORBA::String_var, CORBA::TypeCode_var> * the_case = 0; 00539 00540 // Ugly. *sigh* 00541 switch (discriminant_kind) 00542 { 00543 case CORBA::tk_enum: 00544 { 00545 CORBA::ULong label; 00546 if (!(cdr >> label)) 00547 return false; 00548 00549 typedef TypeCode::Case_Enum_T<CORBA::String_var, 00550 CORBA::TypeCode_var> case_type; 00551 00552 ACE_NEW_RETURN (the_case, 00553 case_type (discriminant_type.in(), label), 00554 false); 00555 } 00556 break; 00557 case CORBA::tk_ulong: 00558 { 00559 CORBA::ULong label; 00560 if (!(cdr >> label)) 00561 return false; 00562 00563 typedef TypeCode::Case_T<CORBA::ULong, 00564 CORBA::String_var, 00565 CORBA::TypeCode_var> case_type; 00566 00567 ACE_NEW_RETURN (the_case, 00568 case_type (label), 00569 false); 00570 } 00571 break; 00572 case CORBA::tk_long: 00573 { 00574 CORBA::Long label; 00575 if (!(cdr >> label)) 00576 return false; 00577 00578 typedef TypeCode::Case_T<CORBA::Long, 00579 CORBA::String_var, 00580 CORBA::TypeCode_var> case_type; 00581 00582 ACE_NEW_RETURN (the_case, 00583 case_type (label), 00584 false); 00585 } 00586 break; 00587 case CORBA::tk_ushort: 00588 { 00589 CORBA::UShort label; 00590 if (!(cdr >> label)) 00591 return false; 00592 00593 typedef TypeCode::Case_T<CORBA::UShort, 00594 CORBA::String_var, 00595 CORBA::TypeCode_var> case_type; 00596 00597 ACE_NEW_RETURN (the_case, 00598 case_type (label), 00599 false); 00600 } 00601 break; 00602 case CORBA::tk_short: 00603 { 00604 CORBA::Short label; 00605 if (!(cdr >> label)) 00606 return false; 00607 00608 typedef TypeCode::Case_T<CORBA::Short, 00609 CORBA::String_var, 00610 CORBA::TypeCode_var> case_type; 00611 00612 ACE_NEW_RETURN (the_case, 00613 case_type (label), 00614 false); 00615 } 00616 break; 00617 case CORBA::tk_char: 00618 { 00619 CORBA::Char label; 00620 if (!(cdr >> CORBA::Any::to_char (label))) 00621 return false; 00622 00623 typedef TypeCode::Case_T<CORBA::Char, 00624 CORBA::String_var, 00625 CORBA::TypeCode_var> case_type; 00626 00627 ACE_NEW_RETURN (the_case, 00628 case_type (label), 00629 false); 00630 } 00631 break; 00632 case CORBA::tk_boolean: 00633 { 00634 CORBA::Boolean label; 00635 if (!(cdr >> CORBA::Any::to_boolean (label))) 00636 return false; 00637 00638 typedef TypeCode::Case_T<CORBA::Boolean, 00639 CORBA::String_var, 00640 CORBA::TypeCode_var> case_type; 00641 00642 ACE_NEW_RETURN (the_case, 00643 case_type (label), 00644 false); 00645 } 00646 break; 00647 case CORBA::tk_longlong: 00648 { 00649 CORBA::LongLong label; 00650 if (!(cdr >> label)) 00651 return false; 00652 00653 typedef TypeCode::Case_T<CORBA::LongLong, 00654 CORBA::String_var, 00655 CORBA::TypeCode_var> case_type; 00656 00657 ACE_NEW_RETURN (the_case, 00658 case_type (label), 00659 false); 00660 } 00661 break; 00662 #if !defined (ACE_LACKS_LONGLONG_T) 00663 case CORBA::tk_ulonglong: 00664 { 00665 CORBA::ULongLong label; 00666 if (!(cdr >> label)) 00667 return false; 00668 00669 typedef TypeCode::Case_T<CORBA::ULongLong, 00670 CORBA::String_var, 00671 CORBA::TypeCode_var> case_type; 00672 00673 ACE_NEW_RETURN (the_case, 00674 case_type (label), 00675 false); 00676 } 00677 break; 00678 #endif /* !ACE_LACKS_LONGLONG_T */ 00679 default: 00680 return false; 00681 } 00682 00683 elem_type case_value (the_case); 00684 member.swap (case_value); // Exception-safe 00685 00686 CORBA::String_var the_name; 00687 CORBA::TypeCode_var the_type; 00688 00689 if (!(cdr >> TAO_InputCDR::to_string (the_name.out (), 0) 00690 && tc_demarshal (cdr, the_type.out (), infos))) 00691 return false; 00692 00693 member->name (the_name.in ()); 00694 member->type (the_type.in ()); 00695 } 00696 00697 typedef TAO::TypeCode::Union<CORBA::String_var, 00698 CORBA::TypeCode_var, 00699 case_array_type, 00700 TAO::True_RefCount_Policy> typecode_type; 00701 00702 // Check if we have recursive members. There could be multiple. 00703 TAO::TypeCodeFactory::TC_Info_List recursive_tc; 00704 if (find_recursive_tc (id.in (), recursive_tc, infos)) 00705 { 00706 // Set remaining parameters. 00707 00708 typedef TAO::TypeCode::Recursive_Type<typecode_type, 00709 CORBA::TypeCode_var, 00710 case_array_type> 00711 recursive_typecode_type; 00712 00713 size_t const len = recursive_tc.size (); 00714 00715 for (size_t i = 0; i < len; ++i) 00716 { 00717 TAO::TypeCodeFactory::TC_Info & info = recursive_tc[i]; 00718 00719 recursive_typecode_type * const rtc = 00720 dynamic_cast<recursive_typecode_type *> (info.type); 00721 00722 if (!rtc) 00723 return false; // Should never occur. 00724 00725 rtc->union_parameters (name.in (), 00726 discriminant_type, 00727 cases, // Will be copied. 00728 ncases, 00729 default_index); 00730 } 00731 00732 tc = recursive_tc[0].type; 00733 } 00734 else 00735 { 00736 ACE_NEW_RETURN (tc, 00737 typecode_type (id.in (), 00738 name.in (), 00739 discriminant_type, 00740 cases, // Will be copied. 00741 ncases, 00742 default_index), 00743 false); 00744 } 00745 00746 return true; 00747 } |
|
Definition at line 210 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00214 { 00215 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_ushort); 00216 00217 return true; 00218 } |
|
Definition at line 1089 of file TypeCode_CDR_Extraction.cpp. References tc_alias_factory(), and TC_Info_List.
01093 { 01094 return tc_alias_factory (kind, cdr, tc, infos); 01095 } |
|
Definition at line 991 of file TypeCode_CDR_Extraction.cpp. References ACE_NEW_RETURN, find_recursive_tc(), ACE_Array_Base< T >::size(), start_cdr_encap_extraction(), tc_demarshal(), TC_Info_List, and TAO::TypeCodeFactory::TC_Info::type. Referenced by tc_event_factory().
00995 { 00996 // The remainder of a tk_value/tk_event TypeCode is encoded in a 00997 // CDR encapsulation 00998 00999 if (!start_cdr_encap_extraction (cdr)) 01000 return false; 01001 01002 // Extract the repository ID, name and number of fields. 01003 CORBA::String_var id; 01004 if (!(cdr >> TAO_InputCDR::to_string (id.out (), 0))) 01005 return false; 01006 01007 CORBA::String_var name; 01008 CORBA::ValueModifier type_modifier; 01009 CORBA::TypeCode_var concrete_base; 01010 CORBA::ULong nfields; 01011 01012 if (!(cdr >> TAO_InputCDR::to_string (name.out (), 0) 01013 && cdr >> type_modifier 01014 && cdr >> concrete_base.out () 01015 && cdr >> nfields)) 01016 return false; 01017 01018 typedef ACE_Array_Base<TAO::TypeCode::Value_Field<CORBA::String_var, 01019 CORBA::TypeCode_var> > 01020 member_array_type; 01021 01022 member_array_type fields (nfields); 01023 01024 for (CORBA::ULong i = 0; i < nfields; ++i) 01025 { 01026 TAO::TypeCode::Value_Field<CORBA::String_var, 01027 CORBA::TypeCode_var> & field = fields[i]; 01028 01029 if (!(cdr >> TAO_InputCDR::to_string (field.name.out (), 0) 01030 && tc_demarshal (cdr, field.type.out (), infos) 01031 && cdr >> field.visibility)) 01032 return false; 01033 } 01034 01035 typedef TAO::TypeCode::Value< 01036 CORBA::String_var, 01037 CORBA::TypeCode_var, 01038 member_array_type, 01039 TAO::True_RefCount_Policy> typecode_type; 01040 01041 // Check if valuetype/eventtype TypeCode is recursive. 01042 TAO::TypeCodeFactory::TC_Info_List recursive_tc; 01043 if (find_recursive_tc (id.in (), recursive_tc, infos)) 01044 { 01045 // Set remaining parameters. 01046 01047 typedef TAO::TypeCode::Recursive_Type<typecode_type, 01048 CORBA::TypeCode_var, 01049 member_array_type> 01050 recursive_typecode_type; 01051 01052 size_t const len = recursive_tc.size (); 01053 01054 for (size_t i = 0; i < len; ++i) 01055 { 01056 TAO::TypeCodeFactory::TC_Info & info = recursive_tc[i]; 01057 01058 recursive_typecode_type * const rtc = 01059 dynamic_cast<recursive_typecode_type *> (info.type); 01060 01061 if (!rtc) 01062 return false; // Should never occur. 01063 01064 rtc->valuetype_parameters (name.in (), 01065 type_modifier, 01066 concrete_base, 01067 fields, // Will be copied. 01068 nfields); 01069 } 01070 tc = recursive_tc[0].type; 01071 } 01072 else 01073 { 01074 ACE_NEW_RETURN (tc, 01075 typecode_type (kind, 01076 id.in (), 01077 name.in (), 01078 type_modifier, 01079 concrete_base, 01080 fields, // Will be copied. 01081 nfields), 01082 false); 01083 } 01084 01085 return true; 01086 } |
|
Definition at line 177 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00181 { 00182 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_void); 00183 00184 return true; 00185 } |
|
Definition at line 949 of file TypeCode_CDR_Extraction.cpp. References CORBA::TypeCode::_duplicate(), and TC_Info_List.
00953 { 00954 tc = CORBA::TypeCode::_duplicate (CORBA::_tc_wchar); 00955 00956 return true; 00957 } |
|
Definition at line 960 of file TypeCode_CDR_Extraction.cpp. References TC_Info_List, and tc_string_factory().
00964 { 00965 return tc_string_factory (kind, cdr, tc, infos); 00966 } |