FreeHEP API
Version v1.2

hep.graphics.heprep
Interface HepRepInstanceTree

All Superinterfaces:
HepRepTreeID
All Known Implementing Classes:
DefaultHepRepInstanceTree, HepRepInstanceTreeAdapter, HepRepInstanceTreeAdapter, StreamerHepRepInstanceTree

public interface HepRepInstanceTree
extends HepRepTreeID

HepRepInstanceTree interface.

Author:
Mark Donszelmann

Method Summary
 void addInstance(HepRepInstance instance)
          Adds an instance to this instancetree.
 void addInstanceTree(HepRepTreeID instanceTree)
          Adds a related instance tree to this instancetree.
 HepRepInstanceTree copy(HepRep heprep)
          Returns a deep copy of this instancetree.
 HepRepInstanceTree copy(HepRep heprep, HepRepSelectFilter filter)
          Returns a deep copy of this instancetree.
 Collection getInstances()
          Returns a collection of instances.
 Collection getInstanceTrees()
          Returns a collection of associated instance trees.
 HepRepTreeID getTypeTree()
          Returns the associated typetree.
 void removeInstance(HepRepInstance instance)
          Removes an instance from this instancetree.
 
Methods inherited from interface hep.graphics.heprep.HepRepTreeID
copy, getName, getQualifier, getVersion, setQualifier
 

Method Detail

addInstance

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

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

removeInstance

public void removeInstance(HepRepInstance instance)
Removes an instance from this instancetree.

Parameters:
instance - to be removed.

getInstances

public Collection getInstances()
Returns a collection of instances.

Returns:
collection of HepRepInstances.

addInstanceTree

public void addInstanceTree(HepRepTreeID instanceTree)
                     throws IOException
Adds a related instance tree to this instancetree.

Parameters:
instanceTree - related instancetree.
Throws:
IOException - only if written immediately to a stream.

getInstanceTrees

public Collection getInstanceTrees()
Returns a collection of associated instance trees.

Returns:
collection of HepRepInstanceTrees.

getTypeTree

public HepRepTreeID getTypeTree()
Returns the associated typetree.

Returns:
TreeID of the associated typetree.

copy

public HepRepInstanceTree copy(HepRep heprep)
                        throws CloneNotSupportedException
Returns a deep copy of this instancetree.

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

copy

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

Parameters:
heprep - needed to find the associated type.
filter - to filter the instances.
Returns:
copy of this instancetree.
Throws:
CloneNotSupportedException - if copying is not possible.

FreeHEP API
Version v1.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.