Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.NamedList


     *  The object is added to the workspace directory.
     *  Increment the version number of the workspace.
     */
    public GenericJNIActor() {
        super();
        _argumentsList = new NamedList(this);
    }
View Full Code Here


     @param workspace The workspace for synchronization and version
     *  tracking.
     */
    public GenericJNIActor(Workspace workspace) {
        super(workspace);
        _argumentsList = new NamedList(this);
    }
View Full Code Here

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

        _argumentsList = new NamedList(this);

        // FIXME: Should libraryDirectory be a FileParameter?
        libraryDirectory = new Parameter(this, "libraryDirectory",
                new StringToken("jni/lib"));
        nativeFunction = new Parameter(this, "nativeFunction", new StringToken(
View Full Code Here

     *   if one of the attributes cannot be cloned.
     *  @return The new Entity.
     */
    public Object clone(Workspace workspace) throws CloneNotSupportedException {
        GenericJNIActor newEntity = (GenericJNIActor) super.clone(workspace);
        newEntity._argumentsList = new NamedList(newEntity);

        // Clone the ports.
        Iterator arguments = argumentsList().iterator();

        while (arguments.hasNext()) {
View Full Code Here

     */
    public static NamedList getScope(NamedObj object) {
        try {
            object.workspace().getReadAccess();

            NamedList scope = new NamedList();
            NamedObj container = object.getContainer();

            while (container != null) {
                Iterator level1 = container.attributeList().iterator();
                Attribute var = null;

                while (level1.hasNext()) {
                    // add the variables in the same NamedObj to scope,
                    // excluding this
                    var = (Attribute) level1.next();

                    if ((var instanceof Variable) && (var != object)) {
                        if (var.workspace() != object.workspace()) {
                            continue;
                        }

                        try {
                            scope.append(var);
                        } catch (NameDuplicationException ex) {
                            // This occurs when a variable is shadowed by one
                            // that has been previously entered in the scope.
                        } catch (IllegalActionException ex) {
                            // This should not happen since we are dealing with
                            // variables which are Nameable.
                        }
                    }
                }

                level1 = container.attributeList(ScopeExtender.class)
                        .iterator();

                while (level1.hasNext()) {
                    ScopeExtender extender = (ScopeExtender) level1.next();
                    Iterator level2 = extender.attributeList().iterator();

                    while (level2.hasNext()) {
                        // add the variables in the scope extender to scope,
                        // excluding this
                        var = (Attribute) level2.next();

                        if ((var instanceof Variable) && (var != object)) {
                            if (var.workspace() != object.workspace()) {
                                continue;
                            }

                            try {
                                scope.append(var);
                            } catch (NameDuplicationException ex) {
                                // This occurs when a variable is shadowed by
                                // one that has been previously entered in the
                                // scope.
                            } catch (IllegalActionException ex) {
View Full Code Here

            workspace().getReadAccess();

            CompositeEntity newEntity = (CompositeEntity) super
                    .clone(workspace);

            newEntity._containedEntities = new NamedList(newEntity);
            newEntity._containedRelations = new NamedList(newEntity);

            // Clone the contained relations.
            Iterator relations = relationList().iterator();

            while (relations.hasNext()) {
View Full Code Here

    public List relationList() {
        try {
            _workspace.getReadAccess();

            // Copy the list so we can create a static enumeration.
            NamedList relationsCopy = new NamedList(_containedRelations);
            return relationsCopy.elementList();
        } finally {
            _workspace.doneReading();
        }
    }
View Full Code Here

     *  The object is added to the workspace directory.
     *  Increment the version number of the workspace.
     */
    public Entity() {
        super();
        _portList = new NamedList(this);
    }
View Full Code Here

     @param name The name of this object.
     *  @exception IllegalActionException If the name has a period.
     */
    public Entity(String name) throws IllegalActionException {
        super(name);
        _portList = new NamedList(this);
    }
View Full Code Here

     *  Increment the version of the workspace.
     *  @param workspace The workspace for synchronization and version tracking.
     */
    public Entity(Workspace workspace) {
        super(workspace);
        _portList = new NamedList(this);
    }
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.NamedList

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.