copy(Data fromData, true)
version of the previous methodData data1 = service1.getData("myData"); Data data2 = service2.getData("myOtherData"); data2.copy(data1, false);
Data data1 = service1.getData("myData"); Data data2 = service2.getData("myOtherData"); data2.copy(data1, true); // or data2.copy(data1); // this is equivalent
<simpleType name="bool" baseType="boolean" /> <simpleType name="int" baseType="int" /> <enumType name="intEnum" > <enumValue name="ONE" /> <enumValue name="TWO" /> <enumValue name="THREE" /> </enumType> <structType name="struct1"> <field name="enum" type="intEnum" /> <field name="int" type="int" /> </structType> <structType name="struct2"> <extends name="struct1" /> <field name="int2" type="int" /> <field name="bool" type="bool" /> </structType>And the following services definition:
<services> <publish name="service1"> <data name="data1" type="struct1" /> </publish> <publish name="service2"> <data name="data2" type="struct2" /> </publish> </services>Suppose that we have the following value for
data2
: {THREE, 5, 10, true}
data1.copy(data2)
, we will have the following value for data1
:{THREE, 5}
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence