Rambler's Top100
/*
 *  Copyright (C) 2004 Roman Krylov
 *  rkrylov@mail.ru
 *  
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package org.JWrapper;

public abstract class JWrapper
{
    protected String name;
//    protected Signal0 name_changed = new Signal0();
    protected Signal1 name_changed = new Signal1();
            
    protected JCompositeWrapper parent = null;
    protected Signal0 parent_changed = new Signal0();
    protected java.util.Map user_functions
            = new java.util.LinkedHashMap();
        
    public JWrapper(String _name)
        {
        name=_name;
        }
    
    public void finalize() {}
    
    public abstract void refresh() throws Exception;
    
    public java.util.Map< String,UserFunction >
            getUserFunctions()
        { return user_functions; }
    
    public String getName()
        { return name; }
    /** Sould it be public? */
    public void setName(String _name) throws Exception
        {
        name=_name;
        name_changed.Op(_name);
        }
    
    public JCompositeWrapper getParent()
        { return parent; }
    public JWrapper setParent(JCompositeWrapper _parent) throws Exception
        {
        parent = _parent;
        parent_changed.Op();
        return this;
        }
//    public Signal0 getSignalNameChanged()
//        { return name_changed;}
    public Signal1 getSignalNameChanged()
        { return name_changed;}
    
    public Signal0 getSignalParentChanged()
        { return parent_changed;}
    
    public String toString()
        { return this.getName(); }
    
    public boolean equals(JWrapper other)
        { return other==this; }
    
        protected java.util.Map additionalInfo
            = new java.util.LinkedHashMap();
    public java.util.Map getAdditionalInfo()
        { return additionalInfo; }

}

Предприятие реального времени №1

На главную   Новости   Карта сайта
  Rambler's Top100