FreeHEP API
Version v1.2

hep.graphics.heprep
Interface HepRepInstance

All Superinterfaces:
HepRepAttribute, HepRepConstants
All Known Implementing Classes:
DefaultHepRepInstance, HepRepInstanceAdapter, HepRepInstanceAdapter, StreamerHepRepInstance

public interface HepRepInstance
extends HepRepAttribute

HepRepInstance interface.

Author:
Mark Donszelmann

Field Summary
 
Fields inherited from interface hep.graphics.heprep.HepRepConstants
SHOW_DESC, SHOW_EXTRA, SHOW_NAME, SHOW_NONE, SHOW_VALUE, TYPE_BOOLEAN, TYPE_COLOR, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_STRING, TYPE_UNKNOWN
 
Method Summary
 void addInstance(HepRepInstance instance)
          Adds an sub-instance to this instance.
 void addPoint(HepRepPoint point)
          Adds a point to this instance.
 HepRepInstance copy(HepRep heprep, HepRepInstance parent)
          Returns a deep copy of this instance.
 HepRepInstance copy(HepRep heprep, HepRepInstance parent, HepRepSelectFilter filter)
          Returns a deep copy of this instance.
 HepRepInstance copy(HepRep heprep, HepRepInstanceTree parent)
          Returns a deep copy of this instance.
 HepRepInstance copy(HepRep heprep, HepRepInstanceTree parent, HepRepSelectFilter filter)
          Returns a deep copy of this instance.
 Collection getInstances()
          Returns a collection of all sub-instances this instance keeps.
 Collection getPoints()
          Returns a collection of all points this instance keeps.
 HepRepType getType()
          Returns the associated type for this instance.
 Object getUserObject()
          Returns a user object previously set on this instance.
 void removeInstance(HepRepInstance instance)
          Removes a sub-instance from this instance.
 void setUserObject(Object object)
          Sets a User Object on this instance.
 
Methods inherited from interface hep.graphics.heprep.HepRepAttribute
addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 

Method Detail

addInstance

public void addInstance(HepRepInstance instance)
                 throws IOException
Adds an sub-instance to this instance.

Parameters:
instance - sub-instance.
Throws:
IOException - only if written immediately to a stream.

removeInstance

public void removeInstance(HepRepInstance instance)
Removes a sub-instance from this instance.

Parameters:
instance - sub-instance.

getInstances

public Collection getInstances()
Returns a collection of all sub-instances this instance keeps.

Returns:
collection of HepRepInstances.

getType

public HepRepType getType()
Returns the associated type for this instance.

Returns:
associated HepRepType.

addPoint

public void addPoint(HepRepPoint point)
              throws IOException
Adds a point to this instance.

Parameters:
point - to be added.
Throws:
IOException - only if written immediately to a stream.

getPoints

public Collection getPoints()
Returns a collection of all points this instance keeps.

Returns:
collection of HepRepPoints.

copy

public HepRepInstance copy(HepRep heprep,
                           HepRepInstance parent)
                    throws CloneNotSupportedException
Returns a deep copy of this instance.

Parameters:
heprep - needed to find the associated type.
parent - to which the copy is added.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstance copy(HepRep heprep,
                           HepRepInstance parent,
                           HepRepSelectFilter filter)
                    throws CloneNotSupportedException
Returns a deep copy of this instance.

Parameters:
heprep - needed to find the associated type.
parent - to which the copy is added.
filter - run on all instances before copying.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstance copy(HepRep heprep,
                           HepRepInstanceTree parent)
                    throws CloneNotSupportedException
Returns a deep copy of this instance.

Parameters:
heprep - needed to find the associated type.
parent - to which the copy is added.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstance copy(HepRep heprep,
                           HepRepInstanceTree parent,
                           HepRepSelectFilter filter)
                    throws CloneNotSupportedException
Returns a deep copy of this instance.

Parameters:
heprep - needed to find the associated type.
parent - to which the copy is added.
filter - run on all instances before copying.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

setUserObject

public void setUserObject(Object object)
Sets a User Object on this instance.

Parameters:
object - User Object.

getUserObject

public Object getUserObject()
Returns a user object previously set on this instance.

Returns:
User Object.

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.