本文整理汇总了C++中corba::TypeCode_var::_retn方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeCode_var::_retn方法的具体用法?C++ TypeCode_var::_retn怎么用?C++ TypeCode_var::_retn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::TypeCode_var
的用法示例。
在下文中一共展示了TypeCode_var::_retn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Config_Error
CORBA::TypeCode_ptr
DynAlias_Handler::create_typecode (const DataType &type)
{
DANCE_TRACE("DynAlias_Handler::create_typecode");
if (!type.alias_p ())
{
DANCE_DEBUG (DANCE_LOG_TERMINAL_ERROR,
(LM_ERROR, ACE_TEXT ("ERROR: Alias type description required")));
throw Config_Error (ACE_TEXT (""),
ACE_TEXT ("Did not find expected alias type description, tk_kind"\
"may be wrong."));
}
CORBA::TypeCode_var tc =
DYNANY_HANDLER->orb ()->create_alias_tc
(ACE_TEXT_ALWAYS_CHAR (type.alias ().typeId ().c_str ()),
ACE_TEXT_ALWAYS_CHAR (type.alias ().name ().c_str ()),
DYNANY_HANDLER->create_typecode (type.alias ().elementType ()));
DYNANY_HANDLER->register_typecode (type.alias ().typeId (),
tc.in ());
return tc._retn ();
}
示例2: BAD_INV_ORDER
CORBA::TypeCode_ptr
AliasDef_impl::type
()
throw(CORBA::SystemException)
{
DEBUG_OUTLINE ( "AliasDef_impl::type() called" );
vector < Contained_impl* > helper_seq;
CORBA::TypeCode_var tc = build_recursive_type_code(helper_seq);
if ( helper_seq.size() != 0 )
throw CORBA::BAD_INV_ORDER(); // Is this correct?
return tc._retn();
}
示例3: if
CORBA::TypeCode_ptr
ValueDef_impl::build_recursive_type_code
( vector < Contained_impl* >& seq )
{
unsigned int i;
for ( i = 0 ; i < seq.size() ; i++ )
{
IR__::RepositoryId_var id2 = seq[i] -> id();
if ( strcmp ( id_, id2 ) == 0 )
return repository_ -> orb() -> create_recursive_tc ( id_ );
}
seq.resize ( seq.size() + 1, NULL );
seq[seq.size() - 1] = this;
CORBA::TypeCode_var concrete_base;
CORBA::ValueModifier type_modifier = CORBA::VM_NONE;
IR__::ValueMemberSeq members;
if ( this -> is_abstract() )
type_modifier = CORBA::VM_ABSTRACT;
else if ( this -> is_custom() )
type_modifier = CORBA::VM_CUSTOM;
else if ( this -> is_truncatable() )
type_modifier = CORBA::VM_TRUNCATABLE;
if ( base_value_impl_ )
if ( !base_value_impl_ -> is_abstract() )
concrete_base = base_value_impl_ -> build_recursive_type_code ( seq );
list < Contained_impl* >::const_iterator contained_iter;
for ( contained_iter = contained_.begin();
contained_iter != contained_.end();
contained_iter++)
{
Contained_impl* contained = *contained_iter;
if ( contained -> def_kind() == CORBA__::dk_ValueMember)
{
ValueMemberDef_impl* member =
dynamic_cast<ValueMemberDef_impl*>(contained);
if ( !member )
{
DEBUG_ERRLINE ( "Fatal error: Value member cannot by casted to ValueMember_impl" );
CORBA::TypeCode::_nil();
}
IR__::ValueMember value_member;
value_member.name = member -> name();
value_member.id = member -> id();
value_member.version = member -> version();
value_member.access = member -> access();
value_member.type = member -> build_recursive_type_code ( seq );
members.length ( members.length() + 1 );
members[members.length() - 1] = value_member;
}
}
// TODO: this is a hack because create_value_tc needs a sequence
// from the CORBA module and we know that the both types are
// exactly the same
CORBA::ValueMemberSeq* members_new = (CORBA::ValueMemberSeq*)&members;
CORBA::TypeCode_var tc =
repository_ -> orb() -> create_value_tc ( id_, name_, type_modifier,
concrete_base, *members_new );
seq.resize ( seq.size() - 1, NULL );
return tc._retn();
}