Package ptolemy.data.type

Examples of ptolemy.data.type.ArrayType$TypeableArrayTypeTerm


        IntToken[] inttokens = new IntToken[1];
        IntToken inttoken = new IntToken(0);
        inttokens[0] = inttoken;
        arraytoken = new ArrayToken(inttokens);

        ArrayType arraytype = new ArrayType(BaseType.INT);
        arraytoken2 = (ArrayToken) arraytype.convert(arraytoken);
        initialOutputs_CGToken = arraytoken2;
        System.out.println("token = " + initialOutputs_CGToken.toString());
    }
View Full Code Here


     *   an attribute already in the container.
     */
    public ColorAttribute(NamedObj container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        setTypeEquals(new ArrayType(BaseType.DOUBLE));
    }
View Full Code Here

         *   cannot be determined.
         */
        private ArrayType _getArrayTypeRaw() throws IllegalActionException {
            Type type = _typeable.getType();
            if (_arrayType == null || !_arrayType.getElementType().equals(type)) {
                _arrayType = new ArrayType(type);
            }
            return _arrayType;
        }
View Full Code Here

         */
        private ArrayType _getArrayTypeRaw(int length)
                throws IllegalActionException {
            Type type = _typeable.getType();
            if (_arrayType == null || !_arrayType.getElementType().equals(type)) {
                _arrayType = new ArrayType(type, length);
            }
            return _arrayType;
        }
View Full Code Here

        input = new TypedIOPort(this, "input", true, false);
        input.setTypeEquals(BaseType.STRING);

        output = new TypedIOPort(this, "output", false, true);
        output.setTypeEquals(new ArrayType(BaseType.INT));

        _attachText("_iconDescription", "<svg>\n"
                + "<polygon points=\"-15,-15 15,15 15,-15 -15,15\" "
                + "style=\"fill:white\"/>\n" + "</svg>\n");
    }
View Full Code Here

            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        // Set the type of the input port.
        // Input port is a multiport.
        input.setTypeEquals(new ArrayType(BaseType.XMLTOKEN));
        input.setMultiport(true);

        // FIXME: what is the initial value of this parameter?
        template = new PortParameter(this, "template");
        template.setStringMode(true);
View Full Code Here

    public IntArrayToString(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        input = new TypedIOPort(this, "input", true, false);
        input.setTypeEquals(new ArrayType(BaseType.INT));

        output = new TypedIOPort(this, "output", false, true);
        output.setTypeEquals(BaseType.STRING);

        _attachText("_iconDescription", "<svg>\n"
View Full Code Here

        period = new Parameter(this, "period", new DoubleToken(2.0));
        period.setTypeEquals(BaseType.DOUBLE);

        offsets = new Parameter(this, "offsets");
        offsets.setExpression("{0.0, 1.0}");
        offsets.setTypeEquals(new ArrayType(BaseType.DOUBLE));

        // Call this so that we don't have to copy its code here...
        attributeChanged(offsets);

        // set the values parameter
View Full Code Here

                        .equals("Complex") ? BaseType.COMPLEX : cgType
                        .equals("Pointer") ? PointerToken.POINTER : null;

        if (cgType.endsWith("Array")) {
            String elementType = cgType.replace("Array", "");
            result = new ArrayType(ptolemyType(elementType));

        } else if (cgType.endsWith("Matrix")) {
            String elementType = cgType.replace("Matrix", "");
            result = elementType.equals("Int") ? BaseType.INT_MATRIX
                    : elementType.equals("Complex") ? BaseType.COMPLEX_MATRIX
View Full Code Here

     */
    public UnsignedByteArrayToString(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        input.setTypeEquals(new ArrayType(BaseType.UNSIGNED_BYTE));

        output.setTypeEquals(BaseType.STRING);
    }
View Full Code Here

TOP

Related Classes of ptolemy.data.type.ArrayType$TypeableArrayTypeTerm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.