/*
 * Instance Class for Hierarchical Modeling
 * 
 * Don Fussell
 * October 2002
 */

import java.util.*;
import java.awt.*;
import java.awt.geom.*;

public class GrInstance {

    // Expose the transform so other classes can use the methods
    // of AffineTransform on it.
    public AffineTransform transform;

    private GrObject myObject;

    // Constructor, create the instance AffineTransform and
    // remember the object this is an instance of.
    public GrInstance(GrObject object){
	transform = new AffineTransform();
	myObject = object;
    }

    // This returns the next shape of the object.
    // Should this have been inherited?
    public Shape nextShape() {
	return myObject.nextShape();
    }

    // This just returns the next instance of the object.
    // Should this have been inherited?
    public GrInstance nextInstance() {
	return myObject.nextInstance();
    }

    // This just returns the "more shapes" test from the object.
    // Should this have been inherited?
    public boolean moreShapes() {
	return myObject.moreShapes();
    }

    // This just returns the "more instances" test from the object.
    // Should this have been inherited?
    public boolean moreInstances() {
	return myObject.moreInstances();
    }
}
