001/*
002Below is the copyright agreement for the Ptolemy II system.
003
004Copyright (c) 1995-2014 The Regents of the University of California.
005All rights reserved.
006
007Permission is hereby granted, without written agreement and without
008license or royalty fees, to use, copy, modify, and distribute this
009software and its documentation for any purpose, provided that the above
010copyright notice and the following two paragraphs appear in all copies
011of this software.
012
013IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
014FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
015ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
016THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
017SUCH DAMAGE.
018
019THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
020INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
021MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
022PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
023CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
024ENHANCEMENTS, OR MODIFICATIONS.
025
026Ptolemy II includes the work of others, to see those copyrights, follow
027the copyright link on the splash page or see copyright.htm.
028 */
029// A state that is passed through in a firing of the FSM.
030package ptolemy.domains.modal.kernel;
031
032import ptolemy.kernel.CompositeEntity;
033import ptolemy.kernel.util.IllegalActionException;
034import ptolemy.kernel.util.NameDuplicationException;
035import ptolemy.kernel.util.Settable;
036import ptolemy.kernel.util.SingletonAttribute;
037
038///////////////////////////////////////////////////////////////////
039//// TransientState
040
041/**
042 A state that is passed through in a firing of the FSM.
043 FIXME: This is not yet implemented! Don't use it!!!!
044
045 @author Edward A. Lee, Christian Motika, Miro Spoenemann
046 @version $Id$
047 @since Ptolemy II 10.0
048 @Pt.ProposedRating Yellow (eal)
049 @Pt.AcceptedRating Red (eal)
050 @see State
051 @see FSMActor
052 @see FSMDirector
053 */
054public class TransientState extends State {
055
056    /** Construct a transient state.
057     * @param container The container.
058     * @param name The name.
059     * @exception IllegalActionException If the superclass throws it.
060     * @exception NameDuplicationException If the superclass throws it.
061     */
062    public TransientState(CompositeEntity container, String name)
063            throws IllegalActionException, NameDuplicationException {
064        super(container, name);
065
066        // FIXME: Make sure this attribute is never set to true.
067        // Just making it invisible in the GUI is not enough.
068        isFinalState.setVisibility(Settable.NONE);
069
070        _attachText("_iconDescription", "<svg>\n"
071                + "<polygon points=\"0,0 10,10 20,0 10,-10\" style=\"fill:#000000\"/>\n"
072                + "</svg>\n");
073        new SingletonAttribute(this, "_hideName");
074    }
075}