// (c) MIT 2003.  All rights reserved.

// -*-Mode: Java-*- 
// WSimObject.java -- 
// Author: Christine Alvarado <calvarad@ai.mit.edu> 
// Maintainer: Christine Alvarado <calvarad@ai.mit.edu> 
// Version: 
// Created: <Mon Apr 19 16:44:44 1999> 
// Time-stamp: <2000-04-22 18:25:49 moltmans> 
// Keywords: 

// wrapper for all simulatable objects.  they then become either bodies
// or parts for now.

package rec.simulate.widgets;

import java.util.*;
import rec.util.*;
import java.io.*;
import rec.sys.*;
import rec.simulate.*;

public abstract class WSimObject extends VisibleWidget
{
  public WSimObject()
  {
    setDefaultColor( "sim" );
  }

  public Collection isa()
  {
    Class c = null;
    try {
      c = Class.forName( "rec.simulate.widgets.WSimObject" );
    }
    catch( ClassNotFoundException e ) {
      Assert.error( "bad/unrecognized widget class name" );
    }

    Collection isa_c = new HashSet( super.isa() );
    isa_c.add( c );

    return isa_c;
  }
  
  public String getName() 
  {
    return m_Name;
  }
  
  public abstract String load( WMSimulatorRegistryBase reg );
  

  protected String m_Name; 
}
