Cast support methods

If you specified a cast support method when you created a cast, BladeSmith generates the cast support method in the ProjectUDRs.java file.

The generated code

BladeSmith generates only templates for cast support methods.

The generated method declares the routine, its return type, and arguments.

Complete the code

To complete the code for cast support methods, you must:
  • Add your declarations, if necessary.
  • Remove the call to Log(), which raises an error stating that the routine is not implemented.
  • Convert one data type to the other.
  • Store the return value in the Gen_RetVal argument.

In a cast support method, you might convert from one binary representation to another, if the data types involved in the cast have differing binary representations. Alternatively, you might perform a calculation to convert one data type to another.