/* Return the C++ specific type identifier for the specified type specification */ c_char * idl_corbaCxxTypeFromTypeSpec( idl_typeSpec typeSpec) { c_char *typeName; /* QAC EXPECT 3416; No side effects here */ if (idl_typeSpecType(typeSpec) == idl_tbasic) { /* if the specified type is a basic type */ if (idl_getCorbaMode() == IDL_MODE_STANDALONE) { typeName = standaloneTypeFromTypeSpec(idl_typeBasic(typeSpec)); } else { typeName = corbaTypeFromTypeSpec(idl_typeBasic(typeSpec)); } } else if ((idl_typeSpecType(typeSpec) == idl_tseq) || (idl_typeSpecType(typeSpec) == idl_tarray)) { /* sequence does not have an identification */ typeName = os_strdup (""); printf ("idl_corbaCxxTypeFromTypeSpec: Unexpected type handled\n"); assert(0); } else { /* if a user type is specified build it from its scope and its name. The type should be one of idl_ttypedef, idl_tenum, idl_tstruct, idl_tunion. */ typeName = idl_scopeStackCxx( idl_typeUserScope(idl_typeUser(typeSpec)), "::", idl_typeSpecName(typeSpec)); } return typeName; /* QAC EXPECT 5101; The switch statement is simple, therefor the total complexity is low */ }
/* Return the C++ specific type identifier for the specified type specification */ c_char * idl_ISOCxx2TypeFromTypeSpec( idl_typeSpec typeSpec) { c_char *typeName = NULL; c_char *subType; const char *template; size_t size; c_ulong arrSize; switch(idl_typeSpecType(typeSpec)) { case idl_tbasic: /* if the specified type is a basic type */ typeName = standaloneTypeFromTypeSpec(idl_typeBasic(typeSpec)); break; case idl_tseq: