001/** A token that contains a FixPoint number. 002 003 Copyright (c) 2006-2014 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 DISCL5AIMS 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 028 */ 029package ptolemy.data; 030 031import ptolemy.data.type.BaseType; 032import ptolemy.data.type.Type; 033import ptolemy.math.FixPoint; 034 035/////////////////////////////////////////////////////////////////// 036//// UnsizedFixToken 037 038/** 039 A token that contains an instance of FixPoint. This token type 040 exists solely so that types can be declared as UNSIZED_FIX through 041 the parameter mechanism, since we don't represent types distinctly 042 from tokens. Generally speaking actors should process FixTokens, 043 which properly report their precision. 044 045 @author Steve Neuendorffer 046 @see ptolemy.data.FixToken 047 @version $Id$ 048 @since Ptolemy II 5.2 049 @Pt.ProposedRating Yellow (neuendor) 050 @Pt.AcceptedRating Yellow (neuendor) 051 */ 052public class UnsizedFixToken extends FixToken { 053 054 /** Construct a fixed-point token. 055 * This method calls the {@link ptolemy.math.FixPoint#FixPoint(int)} 056 * constructor, so the precision and quantization are what ever 057 * is defined for that constructor 058 */ 059 public UnsizedFixToken() { 060 super(); 061 } 062 063 /** Construct an UnsizedFixToken with the supplied FixPoint value. 064 * @param value A FixPoint value. 065 */ 066 public UnsizedFixToken(FixPoint value) { 067 super(value); 068 } 069 070 /////////////////////////////////////////////////////////////////// 071 //// public methods //// 072 073 /** Return the type of this token. 074 * @return BaseType.UNSIZED_FIX. 075 */ 076 @Override 077 public Type getType() { 078 return BaseType.UNSIZED_FIX; 079 } 080}