Class RandomSource

    • Constructor Detail

      • RandomSource

        public RandomSource​(RandomSource actor)
        Construct a RandomSource helper.
        Parameters:
        actor - the associated actor
    • Method Detail

      • generateInitializeCode

        public java.lang.String generateInitializeCode()
                                                throws IllegalActionException
        Generate the initialize code. Declare the variable state.
        Overrides:
        generateInitializeCode in class RandomSource
        Returns:
        The initialize code.
        Throws:
        IllegalActionException - If thrown while generating the initialization code, while appending the code block or while converting the codeStream to a string.
      • getSharedCode

        public java.util.Set getSharedCode()
                                    throws IllegalActionException
        Get shared code. This method reads the sharedBlock from Expression.c, replaces macros with their values and returns the processed code string.
        Overrides:
        getSharedCode in class NamedProgramCodeGeneratorAdapter
        Returns:
        A set of strings that are code shared by multiple instances of the same actor.
        Throws:
        IllegalActionException - If the code stream encounters an error in processing the specified code block(s).