Closed michaelrfraser closed 6 years ago
Dammit. Changed branch name to match local convention but that has closed the PR. Bringing it back.
Base PR completed with some minor changes:
Dtx
ambassador and factoryhla.rti1516e.extensions.RTIambassadorEx
interface (more general)Rti1516eAmbassadorEx
that extends RtiAmbassador
Rti1516eAmbassador
abstract and updated all factories to always return this typeMain change was in the way that the extension is exposed. I have resurrected the old JLC naming convention of RTIambassadorEx
and extended the default namespace (ohhhh!) so avoid having to case down to some special internal implementation. Will expose all custom extension methods here as an easy entry point. Made an impl side class with the extension methods and updated so that we only ever create instances of it. As such, we're only ever returning one implementation ever and it's entirely up to end-user to choose which view they want of it.
Also added a getFOM()
method to the RTIambassadorEx
so that users can access the ObjectModel
directly to avoid any chicken-and-egg situations when trying to extract data types for an unknown object model.
Only open question is whether we should also expose the FOM parser as a standalone thing as well. Can leave that for a separate task.
This PR adds datatype parsing and referencing support to portico.
IDatatype
interface. The methodIDatatype.getDatatypeClass()
returns the specific class of datatype. References toIDatatype
can be casted down to their specific representation which is one ofBasicType
,SimpleType
,EnumeratedType
,ArrayType
,FixedRecordType
andVariantRecordType
.Extended Rti1516eDtxAmbassador methods to query datatypes are:
Access to these methods is through an RtiAmbassador created by the "portico-dtx" RtiFactory. In code, creation and access would look as such:
I have also added a suite of unit tests to test the parsing and linking of datatypes, and have tested the parser against all test reference FOMs (RPR, Restaurant, Standard MIM etc).