本文整理汇总了C++中datasourcebase::shared_ptr::getType方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_ptr::getType方法的具体用法?C++ shared_ptr::getType怎么用?C++ shared_ptr::getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datasourcebase::shared_ptr
的用法示例。
在下文中一共展示了shared_ptr::getType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: string_dup
char * RTT_corba_CConfigurationInterface_i::getPropertyType (
const char * name)
{
DataSourceBase::shared_ptr ds = getPropertyDataSource( name );
if (ds)
return CORBA::string_dup( ds->getType().c_str() );
return CORBA::string_dup( "na" );
}
示例2: CreateMethod
corba::CMethod_ptr ExpressionServer::CreateMethod( DataSourceBase::shared_ptr expr, MethodC* orig, PortableServer::POA_ptr p ) {
// try to retrieve:
corba::CMethod_ptr result = MServers[ expr ];
if ( !CORBA::is_nil(result) )
return corba::CMethod::_duplicate(result);
// create new:
if ( CORBA::is_nil(p) )
p = ApplicationServer::rootPOA.in();
Logger::log() <<Logger::Debug<< "Created 'Any' CMethod server for type "<< expr->getType()<<Logger::endl;
Orocos_AnyMethod_i* newexpr = new Orocos_AnyMethod_i( *orig, expr, p );
MServers[expr] = newexpr->activate_this();
EServants[expr] = newexpr;
EServers[expr] = corba::CExpression::_narrow(MServers[expr]);
return corba::CMethod::_duplicate( MServers[expr] );
}
示例3: propertyFromString
CORBA::Boolean RTT_corba_CConfigurationInterface_i::propertyFromString (
const char* name, const char* value
)
{
DataSourceBase::shared_ptr ds = getPropertyDataSource( name );
if (!ds)
return false;
if ( ds->getTypeInfo()->fromString( value, ds ) ) {
RTT::log(RTT::Error) << "corba::CConfigurationInterface: Could not assign string to "<< ds->getType() <<"." <<RTT::endlog();
return false;
}
return true;
}
示例4: CreateAssignableExpression
corba::CExpression_ptr ExpressionServer::CreateAssignableExpression( DataSourceBase::shared_ptr expr, PortableServer::POA_ptr p ){
// try to retrieve:
corba::CAssignableExpression_ptr result = AServers[ expr ];
if ( !CORBA::is_nil(result) )
return corba::CExpression::_duplicate(result);
// create new:
if ( CORBA::is_nil(p) )
p = ApplicationServer::rootPOA.in();
Logger::log() <<Logger::Debug<< "Created 'Any' Assignable CExpression server for type "<< expr->getType()<<Logger::endl;
Orocos_AnyAssignableExpression_i* newexpr = new Orocos_AnyAssignableExpression_i( expr, p );
AServers[expr] = newexpr->activate_this();
EServants[expr] = newexpr;
EServers[expr] = corba::CExpression::_narrow(AServers[expr]);
corba::CExpression_var ret = corba::CExpression::_duplicate( EServers[expr] );
return ret._retn();
}