CPP 1.1 NO IDEA Avatar
  1. OMG Issue

CPP11 — 2 of4 issues with Abstract interfaces

  • Key: CPP11-115
  • Legacy Issue Number: 3079
  • Status: closed  
  • Source: Floorboard Software ( Jonathan Biggar)
  • Summary:

    2. I do not understand this bullet in section 1.18.2:

    "o Inserting an abstract interface reference into a CORBA::Any operates
    polymorphically; either the object reference or valuetype to which the
    abstract interface reference refers is what actually gets inserted into
    the Any. Because abstract interfaces cannot actually be inserted into an
    Any, there is no need for abstract interface extraction operators,
    either. The CORBA::Any::to_abstract_base type allows the contents of an
    Any to be extracted as an AbstractBase if the entity stored in the Any
    is an object reference type or a valuetype directly or indirectly
    derived from the AbstractBase base class. See Section 1.16.6, Widening
    to Abstract Interface, on page 1-62 for details."

    This seems to make no sense. It seems to state that the actual
    reference or valuetype is inserted into the Any, which means that the
    TCKind associated with the any will be tk_objref or tk_value, not
    tk_abstract_interface. This seems to have particularly bad implications
    with the DII & DSI. How does the DII know to encode an abstract
    interface correctly in CDR if the Any it receives doesn't have a
    tk_abstract_interface TypeCode? It also means that an application which
    only knows the abstract interface type must handle the case where the
    Any has a tk_objref or tk_value instead, use Any::to_abstract_interface
    and then a narrow call to get the abstract interface pointer it needs.

    This seems needlessly complex and unnecessary. This bullet should be
    replaced with one that just states that abstract interfaces have
    inserters and extractors generated for them just like normal interfaces.

  • Reported: CPP 1.0 — Sat, 4 Dec 1999 05:00 GMT
  • Disposition: Resolved — CPP 1.1
  • Disposition Summary:


  • Updated: Fri, 6 Mar 2015 20:58 GMT