There will be two companion pull requests that refer to this one in ucef-core and ucef-cpp.
Major Fixes:
Added code generation for C++ federates to mirror Java federates, which includes an additional -impl module that generates commented code for the sending/receiving of interactions/objects.
Added ability to register named objects; an optional string can be provided to the registerObject call, which will throw an exception if the provided string is not a unique identifier.
The integer variations of getAttribute and setAttributeAux, as well as the parameter equivalents, now defer their implementation to the methods with the same name that take a string attribute name.
Added new virtual methods for getAttributeName and getAttributeHandle, as well as the parameter equivalents, that work correctly with inheritance when called on a pointer to the base class.
Changed the format of attribute identifiers, as well as their parameter equivalents, from Full.Class.Path,AttributeName to Full.Class.Path.AttributeName inside of the datamemberNameHandleMap; since the final string was always an attribute name, there was no need to use a separate delimiter to differentiate from the object class path.
Derived interaction/object classes now re-define all the parameters/attributes from their parent classes; this means that InteractionRoot::ParameterA is different from InteractionRoot.Derived::ParameterA. This is consistent with how portico treats parameters/attributes in the fed/FOM file.
createSuppliedDatamembers will now use the attribute handles of the most derived class using the new getAttributeName/getAttributeHandle methods; it was previously using the handle of the least derived class (InteractionRoot from the previous bullet, rather than InteractionRoot.Derived).
All code related to interaction classes and object classes was regenerated from the new templates.
Minor Fixes:
Fixed issue with code generation of the maven nar plugin for pom files.
Changed indentation level for generated XML from 2 spaces to 4 spaces.
Changed white space for a significant number of the code generated files.
Changed C++ code generation to reside in ProjectName-cpp-federates rather than cpp-federates, to be consistent with how Java code is generated.
Changed the RTIVisitor, that generates the base-events and rti-events projects in the Java and C++ main repositories, to also generate the base objects such as FederateObject.
Changed the PubSubVisitor to store the full class path and parameters/attributes for each visited interaction and object.
Changed Java code generator to use the changes to the PubSubVisitor rather than the unnecessarily complex hack it was previously using.
Changed generated Java code to use the correct import statements rather than wildcard characters.
Changed how the logger was used with Java exceptions to be consistent with the standard use of Log4j2.
Changed the Java toString methods to be consistent with the standard implementation of that method.
Added several additional debug-level output statements to the Java code.
Removed an unnecessary throw statement from sendInteraction.
There will be two companion pull requests that refer to this one in ucef-core and ucef-cpp.
Major Fixes:
-impl
module that generates commented code for the sending/receiving of interactions/objects.Full.Class.Path,AttributeName
toFull.Class.Path.AttributeName
inside of the datamemberNameHandleMap; since the final string was always an attribute name, there was no need to use a separate delimiter to differentiate from the object class path.InteractionRoot::ParameterA
is different fromInteractionRoot.Derived::ParameterA
. This is consistent with how portico treats parameters/attributes in the fed/FOM file.Minor Fixes:
ProjectName-cpp-federates
rather thancpp-federates
, to be consistent with how Java code is generated.