Version: 9.15.0
YACS::ENGINE::isAdaptableObjref< IMPLIN, IMPLOUT > Struct Template Reference

Static Public Member Functions

static int apply (const TypeCode *t1, const TypeCode *t2)
 

Detailed Description

template<ImplType IMPLIN, ImplType IMPLOUT>
struct YACS::ENGINE::isAdaptableObjref< IMPLIN, IMPLOUT >

Definition at line 235 of file TypeConversions.cxx.

Member Function Documentation

◆ apply()

template<ImplType IMPLIN, ImplType IMPLOUT>
static int YACS::ENGINE::isAdaptableObjref< IMPLIN, IMPLOUT >::apply ( const TypeCode t1,
const TypeCode t2 
)
inlinestatic

Definition at line 237 of file TypeConversions.cxx.

238  {
239  if(t1->kind() == Objref)
240  {
241  //The inport type must be more general than outport type
242  if( t1->isA(t2->id()) )
243  return 1;
244  }
245  else if(t1->kind() == Sequence)
246  {
247  const TypeCodeSeq *t1c(dynamic_cast<const TypeCodeSeq *>(t1));
248  if(!t1c)
249  return 0;
250  const TypeCode *t1cc(t1c->contentType());
251  if(t1cc==t2)
252  return 1;
253  if(t1cc->kind() == Objref && std::string(t1cc->id())==std::string(t2->id()))
254  return 1;
255  }
256  return 0;
257  }
static std::string t1[]
static std::string t2[]

References YACS::ENGINE::TypeCodeSeq::contentType(), YACS::ENGINE::TypeCode::id(), YACS::ENGINE::TypeCode::kind(), YACS::ENGINE::Objref, YACS::ENGINE::Sequence, YACS::t1, and YACS::t2.


The documentation for this struct was generated from the following file: