Issue 9153: Remove the Common suffix from the interface names in the common mapping (mof2idl-ftf) Source: Fraunhofer FOKUS (Mr. Michael Soden, soden@ikv.de soden@fokus.fraunhofer.de) Nature: Uncategorized Issue Severity: Summary: Since clients will in most cases deal directly with the abstract interfaces from the common mapping, it is more natural to name these interfaces using format_1(<class name>). As a consequence, we need to rename the Base-IDL and Component identifiers by adding a suffix. Resolution: Revised Text: Change the statement "…concatenate(format_1(<class identifier>), "Common")…" in rule 8 to format_1(<class identifier>). Done and example (1) on page 17 changed to module MyPackage { abstract interface A : MOFObject { }; abstract interface B : MOFObject { }; abstract interface C : A, B { }; valuetype AState : truncatable MOFState supports A { }; valuetype BState : truncatable MOFState supports B { }; valuetype CState : truncatable MOFState supports C { }; } ; Apply this to the CMOF association rules. Change the statement "…format_1(<class identifier>)... in rules (32) to "…concatenate(format_1(<class identifier>), "Component")…" Done Change the statement "…format_1(<class identifier>)... in rule (49) to "…concatenate(format_1(<class identifier>), "Concrete")…" Done and example 12 on page 35 changed to module MyPackage { // Common Mapping: abstract interface A : MOFObject { }; abstract interface B : MOFObject { }; abstract interface C : A, B { }; valuetype AState : truncatable MOFState supports A { }; valuetype BState : truncatable MOFState supports B { }; valuetype CState : truncatable MOFState supports C { }; // Base-IDL Mapping: interface MyPackageFactory { /* … */ }; interface MyPackage { A create_a(); B create_b(); C create_c(); }; interface AConcrete : A { }; interface BConcrete : B { }; interface CConcrete : C, AConcrete, BConcrete { }; } ; Apply this to the package and CMOF association rules. Rule (37) on page 28 was changed from If an association is mapped to IDL, a component declaration with the name format_1 ( <association identifier> ) is being generated, which declares to support the abstract interface produced by Rule (24). To If an association is mapped to IDL, a component declaration with the name concatenate(format_1 ( <association identifier> ), "Component") is being generated, which declares to support the abstract interface produced by Rule (46). All examples related to this change should be modified. Example (2) on page 23 was changed to abstract interface A : MOFObject { // the implementation of op can expect // that b_param is of type B A op ( in A b_param ); }; abstract interface B : A { // no operation is defined, but op must // return instances of type B }; Example (3) on page 25 was changed to module MyPackage { // Common Mapping: abstract interface MyClass : MOFObject { }; valuetype MyClassState : truncatable MOFState supports MyClass { }; // CCM Mapping: component MyClassComponent supports MyClass{ attribute MyClassState my_class_state; }; home MyClassHome manages MyClassComponent { }; }; Example (4) on page 26 was changed to module MyPackage { abstract interface A : MOFObject { long get_a_attrib (); void set_a_attrib ( in long a_attrib ); }; valuetype AState : truncatable MOFState supports A { private long a_attrib; }; component AComponent supports A { attribute AState a_state; } ; home AHome manages AComponent { factory create_a (); factory create_and_init_a ( in long a_attrib ); factory copy_from ( in A the_a ); }; abstract interface B : MOFObject { A get_b_attrib (); void set_b_attrib ( in A b_attrib ); }; valuetype BState : truncatable MOFState supports B { private A b_attrib; }; component BComponent supports B { attribute BState b_state; }; home BHome manages BComponent { factory create_b (); factory create_and_init_b ( in A b_attrib ); factory copy_from ( in B the_b ); }; abstract interface C : A, B { C get_c_attrib (); void set_c_attrib ( in C c_attrib ); }; valuetype CState : truncatable MOFState supports C { private long a_attrib; private A b_attrib; private C c_attrib; }; component CComponent supports C { attribute CState c_state; }; home CHome manages CComponent { factory create_c (); factory create_and_init_c ( in long a_attrib, in A b_attrib, in C c_attrib ); factory copy_from ( in C the_c ); }; }; Example (5) on page 27 was changed to module MyPackage { typedef sequence < A > ASet; abstract interface ASetIterator : MOF::IteratorBase { A get_value () raises (MofError); void insert_value ( in A value ) raises (MofError); void modify_value( in A value ) raises (MofError); ASetIterator next_one()raises (MofError); ASetIterator previous_one()raises (MofError); ASetIterator begin() raises (MofError); ASetIterator end() raises (MofError); boolean is_empty() raises (MofError); }; valuetype ASetAsValue supports ASetIterator { private ASet value; }; interface ASetAsReference : ASetIterator { ASetAsValue as_value(); }; abstract interface B { ASetIterator get_b_attrib ( ); // modification is done by iterator operations }; }; Example (6) on page 28 was changed to module MyPackage { valuetype Bstate : truncatable MOFState supports B { public ASetIteratorAsValue b_attrib; }; }; Example (7) on page 28/29 was changed to module MyPackage { abstract interface A : MOFObject {}; abstract interface B : MOFObject {}; struct ABLink { A the_a; B the_b; }; typedef sequence < ABLink > ABLinkSet; abstract interface AB : MOFObject { ABLinkSetIterator all_ab_links() raises (MofError); void create_link_in_ab( in ABLink new_link ) raises (MofError); boolean link_exists( in ABLink link ) raises (MofError); void remove_link( in ABLink link ) raises (MofError, NotFound); B linked_objects_the_a( in AComponent the_a ) raises (MofError); A linked_objects_the_b( in BComponent the_b ) raises (MofError); }; valuetype ABState : truncatable MOFState supports AB { private ABLinkSet ab_links; }; component ABComponent supports AB { attribute ABState ab_state; }; }; Example (9) on page 30 was changed to module MyPackage { component A supports A { /* … */ }; component B supports B { /* … */ }; component C supports C { /* … */ }; home AHome manages AComponent { /* … */ }; home BHome manages BComponent {/* … */ }; home CHome manages CComponent {/* … */ }; abstract interface MyPackagePackage { AHome a(); BHome b(); CHome c(); }; component MyPackage supports MyPackagePackage { }; home MyPackageHome manages MyPackage { }; }; Example 10 on page 31 changed to module MyPackage { component AComponent supports A { attribute AState a_state; provides EMOF::CCMReflective::RefCCMObject reflective; }; home AHome supports EMOF::CCMReflective::RefCCMHome manages AComponent { //… }; abstract interface MyPackagePackage { AHome a(); BHome b(); CHome c(); }; component MyPackage supports MyPackagePackage { provides EMOF::CCMReflective::RefBaseObject reflective; }; home MyPackageHome supports EMOF::CCMReflective::RefCCMHome manages MyPackage { //… }; }; Example (11) on page 32 changed to module MyPackage { /* definitions for class C */ abstract interface C : A, B { C get_c_attrib (); void set_c_attrib ( in C c_attrib ); }; valuetype CState supports C { private long a_attrib; private A b_attrib; private C c_attrib; }; eventtype CChanges : CState {}; component CComponent supports C { attribute CState c_state; provides Reflective::RefObject reflective; publishes CChanges changes_c; }; home CHome manages CComponent { /* … */ }; }; Actions taken: November 15, 2005: received issue March 8, 2006: closed issue Discussion: End of Annotations:===== s is issue # 9153 Remove the Common suffix from the interface names in the common mapping Since clients will in most cases deal directly with the abstract interfaces from the common mapping, it is more natural to name these interfaces using format_1(). As a consequence, we need to rename the Base-IDL and Component identifiers by adding a suffix. Change the statement ".concatenate(format_1(), "Common")." in rule 8 to format_1(). Done and example (1) on page 17 changed to module MyPackage { abstract interface A : MOFObject { }; abstract interface B : MOFObject { }; abstract interface C : A, B { }; valuetype AState : truncatable MOFState supports A { }; valuetype BState : truncatable MOFState supports B { }; valuetype CState : truncatable MOFState supports C { }; } ; Apply this to the CMOF association rules. Change the statement ".format_1()... in rules (32) to ".concatenate(format_1(), "Component")." Done Change the statement ".format_1()... in rule (49) to ".concatenate(format_1(), "Concrete")." Done and example 12 on page 35 changed to module MyPackage { // Common Mapping: abstract interface A : MOFObject { }; abstract interface B : MOFObject { }; abstract interface C : A, B { }; valuetype AState : truncatable MOFState supports A { }; valuetype BState : truncatable MOFState supports B { }; valuetype CState : truncatable MOFState supports C { }; // Base-IDL Mapping: interface MyPackageFactory { /* . */ }; interface MyPackage { A create_a(); B create_b(); C create_c(); }; interface AConcrete : A { }; interface BConcrete : B { }; interface CConcrete : C, AConcrete, BConcrete { }; } ; Apply this to the package and CMOF association rules. Rule (37) on page 28 was changed from If an association is mapped to IDL, a component declaration with the name format_1 ( ) is being generated, which declares to support the abstract interface produced by Rule (24). To If an association is mapped to IDL, a component declaration with the name concatenate(format_1 ( ), "Component") is being generated, which declares to support the abstract interface produced by Rule (46). All examples related to this change should be modified. Example (2) on page 23 was changed to abstract interface A : MOFObject { // the implementation of op can expect // that b_param is of type B A op ( in A b_param ); }; abstract interface B : A { // no operation is defined, but op must // return instances of type B }; Example (3) on page 25 was changed to module MyPackage { // Common Mapping: abstract interface MyClass : MOFObject { }; valuetype MyClassState : truncatable MOFState supports MyClass { }; // CCM Mapping: component MyClassComponent supports MyClass{ attribute MyClassState my_class_state; }; home MyClassHome manages MyClassComponent { }; }; Example (4) on page 26 was changed to module MyPackage { abstract interface A : MOFObject { long get_a_attrib (); void set_a_attrib ( in long a_attrib ); }; valuetype AState : truncatable MOFState supports A { private long a_attrib; }; component AComponent supports A { attribute AState a_state; } ; home AHome manages AComponent { factory create_a (); factory create_and_init_a ( in long a_attrib ); factory copy_from ( in A the_a ); }; abstract interface B : MOFObject { A get_b_attrib (); void set_b_attrib ( in A b_attrib ); }; valuetype BState : truncatable MOFState supports B { private A b_attrib; }; component BComponent supports B { attribute BState b_state; }; home BHome manages BComponent { factory create_b (); factory create_and_init_b ( in A b_attrib ); factory copy_from ( in B the_b ); }; abstract interface C : A, B { C get_c_attrib (); void set_c_attrib ( in C c_attrib ); }; valuetype CState : truncatable MOFState supports C { private long a_attrib; private A b_attrib; private C c_attrib; }; component CComponent supports C { attribute CState c_state; }; home CHome manages CComponent { factory create_c (); factory create_and_init_c ( in long a_attrib, in A b_attrib, in C c_attrib ); factory copy_from ( in C the_c ); }; }; Example (5) on page 27 was changed to module MyPackage { typedef sequence < A > ASet; abstract interface ASetIterator : MOF::IteratorBase { A get_value () raises (MofError); void insert_value ( in A value ) raises (MofError); void modify_value( in A value ) raises (MofError); ASetIterator next_one()raises (MofError); ASetIterator previous_one()raises (MofError); ASetIterator begin() raises (MofError); ASetIterator end() raises (MofError); boolean is_empty() raises (MofError); }; valuetype ASetAsValue supports ASetIterator { private ASet value; }; interface ASetAsReference : ASetIterator { ASetAsValue as_value(); }; abstract interface B { ASetIterator get_b_attrib ( ); // modification is done by iterator operations }; }; Example (6) on page 28 was changed to module MyPackage { valuetype Bstate : truncatable MOFState supports B { public ASetIteratorAsValue b_attrib; }; }; Example (7) on page 28/29 was changed to module MyPackage { abstract interface A : MOFObject {}; abstract interface B : MOFObject {}; struct ABLink { A the_a; B the_b; }; typedef sequence < ABLink > ABLinkSet; abstract interface AB : MOFObject { ABLinkSetIterator all_ab_links() raises (MofError); void create_link_in_ab( in ABLink new_link ) raises (MofError); boolean link_exists( in ABLink link ) raises (MofError); void remove_link( in ABLink link ) raises (MofError, NotFound); B linked_objects_the_a( in AComponent the_a ) raises (MofError); A linked_objects_the_b( in BComponent the_b ) raises (MofError); }; valuetype ABState : truncatable MOFState supports AB { private ABLinkSet ab_links; }; component ABComponent supports AB { attribute ABState ab_state; }; }; Example (9) on page 30 was changed to module MyPackage { component A supports A { /* . */ }; component B supports B { /* . */ }; component C supports C { /* . */ }; home AHome manages AComponent { /* . */ }; home BHome manages BComponent {/* . */ }; home CHome manages CComponent {/* . */ }; abstract interface MyPackagePackage { AHome a(); BHome b(); CHome c(); }; component MyPackage supports MyPackagePackage { }; home MyPackageHome manages MyPackage { }; }; Example 10 on page 31 changed to module MyPackage { component AComponent supports A { attribute AState a_state; provides EMOF::CCMReflective::RefCCMObject reflective; }; home AHome supports EMOF::CCMReflective::RefCCMHome manages AComponent { //. }; abstract interface MyPackagePackage { AHome a(); BHome b(); CHome c(); }; component MyPackage supports MyPackagePackage { provides EMOF::CCMReflective::RefBaseObject reflective; }; home MyPackageHome supports EMOF::CCMReflective::RefCCMHome manages MyPackage { //. }; }; Example (11) on page 32 changed to module MyPackage { /* definitions for class C */ abstract interface C : A, B { C get_c_attrib (); void set_c_attrib ( in C c_attrib ); }; valuetype CState supports C { private long a_attrib; private A b_attrib; private C c_attrib; }; eventtype CChanges : CState {}; component CComponent supports C { attribute CState c_state; provides Reflective::RefObject reflective; publishes CChanges changes_c; }; home CHome manages CComponent { /* . */ }; };