/* 
 * <copyright> 
 *  Copyright (c) 2001 by Hyperwave AG
 * </copyright> 
 * 
 * <file> 
 *  Name:        AbstractResource.js
 *  Created:     2001-01-14
 *  $Id: AbstractResource.js,v 1.2 2001/05/18 14:36:32 mmair Exp $
 * </file>
 */

initPackage ( "com.hyperwave.res" );

//----------------------------------------------------------------------
/**
 * This abstract class provides the basic interface for all
 * Resource Classes. It consists of the methods 
 * <code>toString</code> and <code>toSource</code>. 
 * Since native JavaScript strings are used as resources (performance!)
 * AbstractResource has to provide the same interface. That is why 
 * the specified method names are chosen.
 */
// <JSClass Name="com.hyperwave.res.AbstractResource">

  //--------------------------------------------------------------------
  /**
   * The Constructor of this class is only used for prototyping.
   */
  com.hyperwave.res.AbstractResource = function ( aParam )
  {
    if ( aParam == "__proto__" )
      return;

    this.error_ = null;
  }
  class$ = doInherit ( com.hyperwave.res.AbstractResource );

  //--------------------------------------------------------------------
  /**
   * Provides a kind of <i>transport mechanism</i>
   * to transport Resource objects to the client. The output
   * of the function must always be a valid JavaScript string
   * that is executable on all supported JavaScript engines.
   * @return String: an executable JavaScript representation
   *   of a Resource object.
   */
  class$.toSource = function ()
  {
    // abstract !
  }

  //--------------------------------------------------------------------
  /**
   * Provides the basic mechanism of creating an output
   * string from a Resource class.
   * @return String: a HTML portion of the user interface.
   */
  class$.toString = function ()
  {
    // abstract !
  }

// </JSClass>
//----------------------------------------------------------------------

/* End of "com.hyperwave.res.AbstractResource" */

