Class MapFileStorage

    • Field Detail

      • doneReceiving

        public TypedIOPort doneReceiving
        The inputTrigger port. The type of this port is undeclared, meaning that it will resolve to any data type.
      • doneEmitting

        public TypedIOPort doneEmitting
        The inputTrigger port. The type of this port is undeclared, meaning that it will resolve to any data type.
      • inputKey

        public TypedIOPort inputKey
        The inputTrigger port. The type of this port is undeclared, meaning that it will resolve to any data type.
      • inputValue

        public TypedIOPort inputValue
        The inputTrigger port. The type of this port is undeclared, meaning that it will resolve to any data type.
      • numberOfOutputs

        public Parameter numberOfOutputs
        The number of output actors to write to. This parameter contains an IntToken, initially with value 1. The value must be greater than zero.
      • outputKey

        public TypedIOPort outputKey
        The output port. The type of this port is unspecified. Derived classes may set it.
      • outputValue

        public TypedIOPort outputValue
        The output port. The type of this port is unspecified. Derived classes may set it.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        If the specified attribute is fileOrURLPrefix and there is an open file being read, then close that file and open the new one; if the attribute is numberOfLinesToSkip and its value is negative, then throw an exception. In the case of fileOrURLPrefix, do nothing if the file name is the same as the previous value of this attribute.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that has changed.
        Throws:
        IllegalActionException - If the specified attribute is fileOrURLPrefix and the file cannot be opened, or the previously opened file cannot be closed; or if the attribute is numberOfLinesToSkip and its value is negative.
      • initialize

        public void initialize()
                        throws IllegalActionException
        If this is called after prefire() has been called but before wrapup() has been called, then close any open file re-open it, skip the number of lines given by the numberOfLinesToSkip parameter, and read the first line to be produced in the next invocation of prefire(). This occurs if this actor is re-initialized during a run of the model.
        Specified by:
        initialize in interface Initializable
        Overrides:
        initialize in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - If the file or URL cannot be opened, or if the lines to be skipped and the first line to be sent out in the fire() method cannot be read.
      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Return true, unless stop() has been called, in which case, return false. Derived classes override this method to define operations to be performed at the end of every iteration of its execution, after one invocation of the prefire() method and any number of invocations of the fire() method. This method typically wraps up an iteration, which may involve updating local state. In derived classes, this method returns false to indicate that this actor should not be fired again.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class AtomicActor<TypedIOPort>
        Returns:
        True if execution can continue into the next iteration.
        Throws:
        IllegalActionException - Not thrown in this base class.