001/* Record all input tokens for later querying. 002 003 Copyright (c) 2007 The Regents of the University of California. 004 All rights reserved. 005 Permission is hereby granted, without written agreement and without 006 license or royalty fees, to use, copy, modify, and distribute this 007 software and its documentation for any purpose, provided that the above 008 copyright notice and the following two paragraphs appear in all copies 009 of this software. 010 011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 015 SUCH DAMAGE. 016 017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 022 ENHANCEMENTS, OR MODIFICATIONS. 023 024 PT_COPYRIGHT_VERSION_2 025 COPYRIGHTENDKEY 026 027 */ 028package ptolemy.actor.lib.test; 029 030import ptolemy.actor.lib.Recorder; 031import ptolemy.data.type.BaseType; 032import ptolemy.kernel.CompositeEntity; 033import ptolemy.kernel.util.IllegalActionException; 034import ptolemy.kernel.util.NameDuplicationException; 035 036////////////////////////////////////////////////////////////////////////// 037//// RecorderGeneral 038 039/** 040 Record all input tokens for later querying. 041 042 <p>This actor differs from actor {@link ptolemy.actor.lib.Recorder} 043 in that this actor has its input type set to BaseType.GENERAL. 044 This actor is used to test the type constraints of the 045 Display actor, which is more difficult to test because it is a graphical 046 actor. 047 048 @author Christopher Brooks 049 @version $Id$ 050 @since Ptolemy II 6.1 051 @Pt.ProposedRating Red (cxh) 052 @Pt.AcceptedRating Red (cxh) 053 */ 054public class RecorderGeneral extends Recorder { 055 /** Construct an actor with an input multiport that can accept any 056 * Token. 057 * @param container The container. 058 * @param name The name of this actor. 059 * @exception IllegalActionException If the entity cannot be contained 060 * by the proposed container. 061 * @exception NameDuplicationException If the container already has an 062 * actor with this name. 063 */ 064 public RecorderGeneral(CompositeEntity container, String name) 065 throws NameDuplicationException, IllegalActionException { 066 super(container, name); 067 068 // Set the type of the input port. 069 input.setTypeEquals(BaseType.GENERAL); 070 } 071}