001/* This is a PortParameter for MirrorComposites. 002 003@Copyright (c) 2008-2014 The Regents of the University of California. 004All rights reserved. 005 006Permission is hereby granted, without written agreement and without 007license or royalty fees, to use, copy, modify, and distribute this 008software and its documentation for any purpose, provided that the 009above copyright notice and the following two paragraphs appear in all 010copies of this software. 011 012IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 013FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 014ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 015THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 016SUCH DAMAGE. 017 018THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 019INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 020MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 021PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 022CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 023ENHANCEMENTS, OR MODIFICATIONS. 024 025 PT_COPYRIGHT_VERSION_2 026 COPYRIGHTENDKEY 027 028 029 */ 030 031package ptolemy.actor.parameters; 032 033import ptolemy.kernel.ComponentEntity; 034import ptolemy.kernel.util.IllegalActionException; 035import ptolemy.kernel.util.NameDuplicationException; 036import ptolemy.kernel.util.NamedObj; 037 038/** 039This is a PortParameter for MirrorComposites. 040 041@see ptolemy.actor.parameters.PortParameter 042@see ParameterPort 043@author Patricia Derler 044@version $Id$ 045@since Ptolemy II 10.0 046@Pt.ProposedRating Red (derler) 047@Pt.AcceptedRating Red (derler) 048 */ 049 050public class MirrorPortParameter extends PortParameter { 051 052 /** Construct a parameter with the given name contained by the specified 053 * entity. The container argument must not be null, or a 054 * NullPointerException will be thrown. This parameter will create 055 * an associated port in the same container. 056 * @param container The container. 057 * @param name The name of the parameter. 058 * @exception IllegalActionException If the parameter is not of an 059 * acceptable class for the container. 060 * @exception NameDuplicationException If the name coincides with 061 * a parameter already in the container. 062 */ 063 public MirrorPortParameter(NamedObj container, String name) 064 throws IllegalActionException, NameDuplicationException { 065 super(container, name, false); 066 _port = new ParameterMirrorPort((ComponentEntity) container, name); 067 } 068 069 /** Construct a Parameter with the given container, name, and Token. 070 * The token defines the initial persistent and current values. 071 * The container argument must not be null, or a 072 * NullPointerException will be thrown. This parameter will use the 073 * workspace of the container for synchronization and version counts. 074 * If the name argument is null, then the name is set to the empty string. 075 * The object is not added to the list of objects in the workspace 076 * unless the container is null. 077 * Increment the version of the workspace. 078 * If the name argument is null, then the name is set to the empty 079 * string. 080 * @param container The container. 081 * @param name The name. 082 * @param token The Token contained by this Parameter. 083 * @exception IllegalActionException If the parameter is not of an 084 * acceptable class for the container. 085 * @exception NameDuplicationException If the name coincides with 086 * an parameter already in the container. 087 */ 088 public MirrorPortParameter(NamedObj container, String name, 089 ptolemy.data.Token token) 090 throws IllegalActionException, NameDuplicationException { 091 super(container, name, token); 092 } 093 094}