Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREP_H
|
||||
#define HEPREP_HEPREP_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Include all other HepRep header files here for convenience
|
||||
#include "HEPREP/HepRepAction.h"
|
||||
#include "HEPREP/HepRepAttDef.h"
|
||||
#include "HEPREP/HepRepAttribute.h"
|
||||
#include "HEPREP/HepRepAttValue.h"
|
||||
#include "HEPREP/HepRepConstants.h"
|
||||
#include "HEPREP/HepRepDefinition.h"
|
||||
#include "HEPREP/HepRepFactory.h"
|
||||
#include "HEPREP/HepRepInstance.h"
|
||||
#include "HEPREP/HepRepInstanceTree.h"
|
||||
#include "HEPREP/HepRepIterator.h"
|
||||
#include "HEPREP/HepRepIteratorListener.h"
|
||||
#include "HEPREP/HepRepPoint.h"
|
||||
#include "HEPREP/HepRepSelectFilter.h"
|
||||
#include "HEPREP/HepRepTreeID.h"
|
||||
#include "HEPREP/HepRepType.h"
|
||||
#include "HEPREP/HepRepTypeTree.h"
|
||||
#include "HEPREP/HepRepWriter.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRepAction;
|
||||
class HepRepInstanceTree;
|
||||
class HepRepSelectFilter;
|
||||
class HepRepType;
|
||||
class HepRepTypeTree;
|
||||
|
||||
/**
|
||||
* The HepRep interface.
|
||||
*
|
||||
* Any of these methods may throw a UnsupportedOperationException in Java.
|
||||
*
|
||||
* This interface is NOT final yet.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRep {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRep() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Add a layer to the list of layers in this heprep.
|
||||
* The layer is added to the back of the list.
|
||||
*
|
||||
* @param layer name of layer to be added to the back of the list.
|
||||
*/
|
||||
virtual bool addLayer(std::string layer) = 0;
|
||||
|
||||
/**
|
||||
* Returns the list of layers.
|
||||
*
|
||||
* @return the known layer names, in the order back-to-front.
|
||||
*/
|
||||
virtual std::vector<std::string> * getLayerOrder() = 0;
|
||||
|
||||
/**
|
||||
* Add a typetree to this heprep.
|
||||
*
|
||||
* @param typeTree to be added.
|
||||
* @return false only if the tree is written immediately to some stream.
|
||||
*/
|
||||
virtual bool addTypeTree(HepRepTypeTree * typeTree) = 0;
|
||||
|
||||
/**
|
||||
* Remove a typetree from this heprep.
|
||||
*
|
||||
* @param typeTree to be removed.
|
||||
*/
|
||||
virtual void removeTypeTree(HepRepTypeTree * typeTree) = 0;
|
||||
|
||||
/**
|
||||
* Returns the collection of all typetrees of this heprep.
|
||||
*
|
||||
* @return collection of HepRepTypeTrees.
|
||||
*/
|
||||
virtual std::vector<HepRepTypeTree *> * getTypeTrees() = 0;
|
||||
|
||||
/**
|
||||
* Returns a named and versioned typetree.
|
||||
*
|
||||
* @param name name of the typetree.
|
||||
* @param version version of the typetree.
|
||||
* @return named and versioned HepRepTypeTree.
|
||||
*/
|
||||
virtual HepRepTypeTree * getTypeTree(std::string name, std::string version) = 0;
|
||||
|
||||
/**
|
||||
* Searches for a named type in any of the typetrees.
|
||||
* The first occurrence found is returned.
|
||||
*
|
||||
* @param name name of type.
|
||||
* @return named HepRepType.
|
||||
*/
|
||||
virtual HepRepType * getType(std::string name) = 0;
|
||||
|
||||
/**
|
||||
* Adds an instancetree to this heprep.
|
||||
*
|
||||
* @param instanceTree to be added.
|
||||
* @return false only if the tree is written immediately to some stream.
|
||||
*/
|
||||
virtual bool addInstanceTree(HepRepInstanceTree * instanceTree) = 0;
|
||||
|
||||
/**
|
||||
* Remove an instanectree from this heprep.
|
||||
*
|
||||
* @param instanceTree to be removed.
|
||||
*/
|
||||
virtual void removeInstanceTree(HepRepInstanceTree * instanceTree) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of instancetrees.
|
||||
*
|
||||
* @return collection of HepRepInstanceTrees.
|
||||
*/
|
||||
virtual std::vector<HepRepInstanceTree *> * getInstanceTrees() = 0;
|
||||
|
||||
/**
|
||||
* Returns a named and versioned instancetree.
|
||||
* FIXME: doc is incorrect here, should only return TOP of the tree. Filling
|
||||
* in should be done by getInstances calls.
|
||||
* <p>
|
||||
* This tree needs to be added to the heprep afterwards.
|
||||
*
|
||||
* @param name name of the instancetree.
|
||||
* @param version version of the instancetree.
|
||||
* @return HepRepIntanceTree
|
||||
*/
|
||||
virtual HepRepInstanceTree * getInstanceTreeTop(std::string name, std::string version) = 0;
|
||||
|
||||
/**
|
||||
* Returns a named and versioned instancetree for a list of typenames.
|
||||
* <p>
|
||||
* This tree needs to be added to the heprep afterwards.
|
||||
*
|
||||
* @param name name of the instancetree.
|
||||
* @param version version of the instancetree.
|
||||
* @param typeNames a list of typenames for which we need instancetrees.
|
||||
* @return HepRepIntanceTree
|
||||
*/
|
||||
virtual HepRepInstanceTree * getInstances(std::string name, std::string version, std::vector<std::string> typeNames) = 0;
|
||||
|
||||
/**
|
||||
* Returns a named and versioned instancetree for a list of typenames
|
||||
* after executing some action and for specific filters.
|
||||
*
|
||||
* This tree needs to be added to the heprep afterwards.
|
||||
* <p>
|
||||
* The inversion effect of invertAtts depends on the values of
|
||||
* GetDrawAtts and GetNonDrawAtts as follows:
|
||||
* <UL>
|
||||
* <LI>GetDrawAtts GetNonDrawAtts effect of InvertAtts
|
||||
* <LI>FALSE FALSE all Attributes specified will be downloaded
|
||||
* <LI>TRUE FALSE Draw Attributes specified will be omitted, NonDraw Attributes specified will be included
|
||||
* <LI>FALSE TRUE Draw Attributes specified will be included, NonDraw Attributes specified will be omitted
|
||||
* <LI>TRUE TRUE all Attributes specified will be omitted
|
||||
* </UL>
|
||||
*
|
||||
* @param name name of the instancetree.
|
||||
* @param version version of the instancetree.
|
||||
* @param typeNames a list of typenames for which we need instancetrees.
|
||||
* @param actions execute this list of actions before returning.
|
||||
* @param getPoints include the HepRepPoints in the instance tree.
|
||||
* @param getDrawAtts include the Draw attributes in the instance tree.
|
||||
* @param getNonDrawAtts include the Non-Draw attributes in the instance tree.
|
||||
* @param invertAtts list of attributes to be included or not depending on getDrawAtts and getNonDrawAtts.
|
||||
* @return HepRepIntanceTree
|
||||
*/
|
||||
virtual HepRepInstanceTree * getInstancesAfterAction(std::string name, std::string version, std::vector<std::string> typeNames, std::vector<HepRepAction *> actions, bool getPoints, bool getDrawAtts, bool getNonDrawAtts, std::vector<std::string> invertAtts) = 0;
|
||||
|
||||
/**
|
||||
* Returns last exception thrown and clears it. Useful for implementations without
|
||||
* exception handling.
|
||||
*
|
||||
* @return last exception and clears it.
|
||||
*/
|
||||
virtual std::string checkForException() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of the heprep, with all its attached trees, where
|
||||
* instances are filtered using a HepRepSelectFilter.
|
||||
*
|
||||
* @param filter to be used for filtering instances.
|
||||
* @return copy of heprep.
|
||||
*/
|
||||
virtual HepRep * copy(HepRepSelectFilter * filter = NULL) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREP_H */
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPACTION_H
|
||||
#define HEPREP_HEPREPACTION_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
/**
|
||||
* HepRepAction interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepAction {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepAction() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Returns name of this action.
|
||||
*
|
||||
* @return name of this action.
|
||||
*/
|
||||
virtual std::string getName() = 0;
|
||||
|
||||
/**
|
||||
* Returns expression associated with this action.
|
||||
*
|
||||
* @return expression of this action.
|
||||
*/
|
||||
virtual std::string getExpression() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this action.
|
||||
*
|
||||
* @return copy of this action.
|
||||
*/
|
||||
virtual HepRepAction * copy() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPACTION_H */
|
||||
@@ -0,0 +1,92 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPATTDEF_H
|
||||
#define HEPREP_HEPREPATTDEF_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
/**
|
||||
* HepRepAttDef interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepAttDef {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepAttDef() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Returns the mixed case name of this attdef.
|
||||
*
|
||||
* @return name.
|
||||
*/
|
||||
virtual std::string getName() = 0;
|
||||
|
||||
/**
|
||||
* Returns the lowercased name of this attdef.
|
||||
*
|
||||
* @return lowercased name.
|
||||
*/
|
||||
virtual std::string getLowerCaseName() = 0;
|
||||
|
||||
/**
|
||||
* Returns a description of this attdef.
|
||||
*
|
||||
* @return description.
|
||||
*/
|
||||
virtual std::string getDescription() = 0;
|
||||
|
||||
/**
|
||||
* Returns category of this attdef.
|
||||
*
|
||||
* @return category.
|
||||
*/
|
||||
virtual std::string getCategory() = 0;
|
||||
|
||||
/**
|
||||
* Returns any extra information of this attdef.
|
||||
*
|
||||
* @return extra info.
|
||||
*/
|
||||
virtual std::string getExtra() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this attdef.
|
||||
*
|
||||
* @return copy of this attdef.
|
||||
*/
|
||||
virtual HepRepAttDef * copy() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPATTDEF_H */
|
||||
@@ -0,0 +1,142 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPATTVALUE_H
|
||||
#define HEPREP_HEPREPATTVALUE_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
/**
|
||||
* HepRepAttValue interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepAttValue {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepAttValue() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Returns name of the attvalue.
|
||||
*
|
||||
* @return Capitalized Name.
|
||||
*/
|
||||
virtual std::string getName() = 0;
|
||||
|
||||
/**
|
||||
* Returns lowercased name of the attvalue.
|
||||
*
|
||||
* @return Lowercased Name.
|
||||
*/
|
||||
virtual std::string getLowerCaseName() = 0;
|
||||
|
||||
/**
|
||||
* Returns type of the attvalue, defined in HepRepConstants with names TYPE_xxx.
|
||||
*
|
||||
* @return type.
|
||||
*/
|
||||
virtual int getType() = 0;
|
||||
|
||||
/**
|
||||
* Returns the Java-like name for the type of this attvalue.
|
||||
*
|
||||
* @return type name.
|
||||
*/
|
||||
virtual std::string getTypeName() = 0;
|
||||
|
||||
/**
|
||||
* Returns the flag bits for showing this attvalue as a label, defined in HepRepConstants with names SHOW_xxx.
|
||||
*
|
||||
* @return flag bits if should be shown as label.
|
||||
*/
|
||||
virtual int showLabel() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as string.
|
||||
*
|
||||
* @return value as string (if type is string).
|
||||
*/
|
||||
virtual std::string getString() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as string.
|
||||
*
|
||||
* @return value (of any type) in string format.
|
||||
*/
|
||||
virtual std::string getAsString() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as Color.
|
||||
*
|
||||
* @return value as Color.
|
||||
*/
|
||||
virtual std::vector<double> getColor() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as long.
|
||||
*
|
||||
* @return value as long.
|
||||
*/
|
||||
virtual long getLong() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as int.
|
||||
*
|
||||
* @return value as integer.
|
||||
*/
|
||||
virtual int getInteger() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as double.
|
||||
*
|
||||
* @return value as double.
|
||||
*/
|
||||
virtual double getDouble() = 0;
|
||||
|
||||
/**
|
||||
* Returns value as boolean.
|
||||
*
|
||||
* @return value as boolean.
|
||||
*/
|
||||
virtual bool getBoolean() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this attvalue.
|
||||
*
|
||||
* @return copy of this attvalue.
|
||||
*/
|
||||
virtual HepRepAttValue * copy() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPATTVALUE_H */
|
||||
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPATTRIBUTE_H
|
||||
#define HEPREP_HEPREPATTRIBUTE_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepConstants.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRepAttValue;
|
||||
|
||||
/**
|
||||
* HepRepAttribute interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepAttribute {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepAttribute() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Adds an attValue.
|
||||
*
|
||||
* @param attValue to be added.
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(HepRepAttValue * attValue) = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Adds a char* attValue as a String.
|
||||
* This call is mapped to addAttValue(std::string, std::string, int); and necessary
|
||||
* because C++ converts char* into bool and would thus call addAttValue(std::string, bool, int)
|
||||
* for a call such as addAttValue("drawAs", "Cylinder", 0);
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param value value of attValue
|
||||
* @param showLabel show this as label
|
||||
* @return false if an IOException was created.
|
||||
*/
|
||||
bool addAttValue(std::string key, char* value, int showLabel = HepRepConstants::SHOW_NONE) {
|
||||
return addAttValue(key, std::string(value), showLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attValue.
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param value value of attValue
|
||||
* @param showLabel show this as label
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(std::string key, std::string value, int showLabel = HepRepConstants::SHOW_NONE) = 0;
|
||||
|
||||
/**
|
||||
* Adds an attValue.
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param value value of attValue
|
||||
* @param showLabel show this as label
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(std::string key, int value, int showLabel = HepRepConstants::SHOW_NONE) = 0;
|
||||
|
||||
/**
|
||||
* Adds an attValue.
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param value value of attValue
|
||||
* @param showLabel show this as label
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(std::string key, double value, int showLabel = HepRepConstants::SHOW_NONE) = 0;
|
||||
|
||||
/**
|
||||
* Adds an attValue.
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param value value of attValue
|
||||
* @param showLabel show this as label
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(std::string key, bool value, int showLabel = HepRepConstants::SHOW_NONE) = 0;
|
||||
|
||||
/**
|
||||
* Adds a Color attValue.
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param value value of attValue
|
||||
* @param showLabel show this as label
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(std::string key, std::vector<double> value, int showLabel = HepRepConstants::SHOW_NONE) = 0;
|
||||
|
||||
/**
|
||||
* Adds a Color attValue.
|
||||
*
|
||||
* @param key name of attValue
|
||||
* @param red color
|
||||
* @param green color
|
||||
* @param blue color
|
||||
* @param alpha value
|
||||
* @param showLabel show this as label
|
||||
* @return false only if the value is immediately written to a stream.
|
||||
*/
|
||||
virtual bool addAttValue(std::string key, double red, double green, double blue, double alpha = 1.0, int showLabel = HepRepConstants::SHOW_NONE) = 0;
|
||||
|
||||
/**
|
||||
* Remove the attvalue named by key.
|
||||
*
|
||||
* @param key name of the attValue to be removed.
|
||||
* @return removed HepRepAttValue, or null if not removed.
|
||||
*/
|
||||
virtual HepRepAttValue * removeAttValue(std::string key) = 0;
|
||||
|
||||
/**
|
||||
* Returns the attValue specified by name. This attValue is normally searched
|
||||
* on the node itself and then on its type, moving up the typetree.
|
||||
*
|
||||
* @param name of attribute value.
|
||||
* @return attribute value.
|
||||
*/
|
||||
virtual HepRepAttValue * getAttValue(std::string name) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of all attribute values from this node.
|
||||
*
|
||||
* @return collection of HepRepAttValues.
|
||||
*/
|
||||
virtual std::vector<HepRepAttValue *> * getAttValuesFromNode() = 0;
|
||||
|
||||
/**
|
||||
* Returns a named attribute value from this node.
|
||||
*
|
||||
* @param lowerCaseName name in all lowercase.
|
||||
* @return corresponding HepRepAttValue.
|
||||
*/
|
||||
virtual HepRepAttValue * getAttValueFromNode(std::string lowerCaseName) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPATTRIBUTE_H */
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPCONSTANTS_H
|
||||
#define HEPREP_HEPREPCONSTANTS_H 1
|
||||
|
||||
// Copyright 2000, FreeHEP.
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
/**
|
||||
* Constants for HepRep interfaces.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepConstants {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepConstants() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Defines constants for type
|
||||
*/
|
||||
enum { TYPE_UNKNOWN = -1, TYPE_STRING = 1, TYPE_COLOR = 2, TYPE_LONG = 10, TYPE_INT = 11, TYPE_DOUBLE = 20, TYPE_BOOLEAN = 30 };
|
||||
|
||||
/**
|
||||
* Defines constants for showLabel
|
||||
*/
|
||||
enum { SHOW_NONE = 0x0000, SHOW_NAME = 0x0001, SHOW_DESC = 0x0002, SHOW_VALUE = 0x0004, SHOW_EXTRA = 0x0008 };
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPCONSTANTS_H */
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPDEFINITION_H
|
||||
#define HEPREP_HEPREPDEFINITION_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepAttribute.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRepAttDef;
|
||||
|
||||
/**
|
||||
* HepRepDefinition interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*
|
||||
*/
|
||||
class HepRepDefinition : virtual public HepRepAttribute {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepDefinition() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Adds an attdef.
|
||||
*
|
||||
* @param name name of the definition.
|
||||
* @param desc description of the definition.
|
||||
* @param category category of the definition.
|
||||
* @param extra extra info of the definition.
|
||||
* @return false only if this definition is written immediately to a stream.
|
||||
*/
|
||||
virtual bool addAttDef(std::string name, std::string desc, std::string category, std::string extra) = 0;
|
||||
|
||||
/**
|
||||
* Adds an attdef.
|
||||
*
|
||||
* @param attDef to be added.
|
||||
* @return false only if this definition is written immediately to a stream.
|
||||
*/
|
||||
virtual bool addAttDef(HepRepAttDef * attDef) = 0;
|
||||
|
||||
/**
|
||||
* Return a named attribute definition searched on this node and any parent nodes.
|
||||
*
|
||||
* @param name of attribute definition.
|
||||
* @return attribute definition.
|
||||
*/
|
||||
virtual HepRepAttDef * getAttDef(std::string name) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of all attribute definitions defined on this node.
|
||||
*
|
||||
* @return collection of attributes definitions.
|
||||
*/
|
||||
virtual std::vector<HepRepAttDef *> * getAttDefsFromNode() = 0;
|
||||
|
||||
/**
|
||||
* Returns a named attribute definition defined on this node.
|
||||
*
|
||||
* @param lowerCaseName name of the attribute in lower case.
|
||||
* @return attribute definition.
|
||||
*/
|
||||
virtual HepRepAttDef * getAttDefFromNode(std::string lowerCaseName) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPDEFINITION_H */
|
||||
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPFACTORY_H
|
||||
#define HEPREP_HEPREPFACTORY_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRep;
|
||||
class HepRepAction;
|
||||
class HepRepInstance;
|
||||
class HepRepInstanceTree;
|
||||
class HepRepPoint;
|
||||
class HepRepTreeID;
|
||||
class HepRepType;
|
||||
class HepRepTypeTree;
|
||||
class HepRepWriter;
|
||||
|
||||
/**
|
||||
* HepRepFactory interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepFactory {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepFactory() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Creates a HepRepWriter.
|
||||
*
|
||||
* @param out output stream.
|
||||
*/
|
||||
virtual HepRepWriter * createHepRepWriter(std::ostream * out) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepPoint.
|
||||
*
|
||||
* @param instance to add the point to.
|
||||
* @param x x coordinate of point.
|
||||
* @param y y coordinate of point.
|
||||
* @param z z coordinate of point.
|
||||
*/
|
||||
virtual HepRepPoint * createHepRepPoint(HepRepInstance * instance, double x, double y, double z) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepInstance.
|
||||
*
|
||||
* @parent to add the instance to.
|
||||
* @type type the associated type.
|
||||
*/
|
||||
virtual HepRepInstance * createHepRepInstance(HepRepInstance * parent, HepRepType * type) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepInstance.
|
||||
*
|
||||
* @parent to add the instance to.
|
||||
* @type type the associated type.
|
||||
*/
|
||||
virtual HepRepInstance * createHepRepInstance(HepRepInstanceTree * parent, HepRepType * type) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepTreeID.
|
||||
*
|
||||
* @param name of the treeID.
|
||||
* @param version of the treeID.
|
||||
* @param qualifier of the treeID.
|
||||
*/
|
||||
virtual HepRepTreeID * createHepRepTreeID(std::string name, std::string version, std::string qualifier = "top-level") = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepAction.
|
||||
*
|
||||
* @param name of the action.
|
||||
* @param expression of the action.
|
||||
*/
|
||||
virtual HepRepAction * createHepRepAction(std::string name, std::string expression) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepInstanceTree.
|
||||
* <p>
|
||||
* The tree needs to be added to the HepRep.
|
||||
*
|
||||
* @param name of the instancetree.
|
||||
* @param version of the instancetree.
|
||||
* @param typeTree associated typetree.
|
||||
*/
|
||||
virtual HepRepInstanceTree * createHepRepInstanceTree(std::string name, std::string version, HepRepTreeID * typeTree) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepType.
|
||||
*
|
||||
* @param parent to add this type to.
|
||||
* @param name of the type to create.
|
||||
*/
|
||||
virtual HepRepType * createHepRepType(HepRepType * parent, std::string name) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRepTypeTree.
|
||||
* <p>
|
||||
* The tree needs to be added to the HepRep.
|
||||
*
|
||||
* @param treeID to name the tree being created.
|
||||
*/
|
||||
virtual HepRepTypeTree * createHepRepTypeTree(HepRepTreeID * treeID) = 0;
|
||||
|
||||
/**
|
||||
* Creates a HepRep.
|
||||
*
|
||||
*/
|
||||
virtual HepRep * createHepRep() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPFACTORY_H */
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPINSTANCE_H
|
||||
#define HEPREP_HEPREPINSTANCE_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepAttribute.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRep;
|
||||
class HepRepInstanceTree;
|
||||
class HepRepPoint;
|
||||
class HepRepSelectFilter;
|
||||
class HepRepType;
|
||||
|
||||
/**
|
||||
* HepRepInstance interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepInstance : virtual public HepRepAttribute {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepInstance() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Adds an sub-instance to this instance.
|
||||
*
|
||||
* @param instance sub-instance.
|
||||
* @return false only if written immediately to a stream.
|
||||
*/
|
||||
virtual bool addInstance(HepRepInstance * instance) = 0;
|
||||
|
||||
/**
|
||||
* Removes a sub-instance from this instance.
|
||||
*
|
||||
* @param instance sub-instance.
|
||||
*/
|
||||
virtual void removeInstance(HepRepInstance * instance) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of all sub-instances this instance keeps.
|
||||
*
|
||||
* @return collection of HepRepInstances.
|
||||
*/
|
||||
virtual std::vector<HepRepInstance *> * getInstances() = 0;
|
||||
|
||||
/**
|
||||
* Returns the associated type for this instance.
|
||||
*
|
||||
* @return associated HepRepType.
|
||||
*/
|
||||
virtual HepRepType * getType() = 0;
|
||||
|
||||
/**
|
||||
* Adds a point to this instance.
|
||||
*
|
||||
* @param point to be added.
|
||||
* @return false only if written immediately to a stream.
|
||||
*/
|
||||
virtual bool addPoint(HepRepPoint * point) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of all points this instance keeps.
|
||||
*
|
||||
* @return collection of HepRepPoints.
|
||||
*/
|
||||
virtual std::vector<HepRepPoint *> * getPoints() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this instance.
|
||||
*
|
||||
* @param heprep needed to find the associated type.
|
||||
* @param parent to which the copy is added.
|
||||
* @param filter run on all instances before copying.
|
||||
* @return copy of this instance.
|
||||
*/
|
||||
virtual HepRepInstance * copy(HepRep * heprep, HepRepInstance * parent, HepRepSelectFilter * filter = NULL) = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this instance.
|
||||
*
|
||||
* @param heprep needed to find the associated type.
|
||||
* @param parent to which the copy is added.
|
||||
* @param filter run on all instances before copying.
|
||||
* @return copy of this instance.
|
||||
*/
|
||||
virtual HepRepInstance * copy(HepRep * heprep, HepRepInstanceTree * parent, HepRepSelectFilter * filter = NULL) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPINSTANCE_H */
|
||||
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPINSTANCETREE_H
|
||||
#define HEPREP_HEPREPINSTANCETREE_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepTreeID.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRep;
|
||||
class HepRepInstance;
|
||||
class HepRepSelectFilter;
|
||||
class HepRepTreeID;
|
||||
|
||||
/**
|
||||
* HepRepInstanceTree interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepInstanceTree : virtual public HepRepTreeID {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepInstanceTree() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Adds an instance to this instancetree.
|
||||
*
|
||||
* @param instance to be added.
|
||||
* @return false only if written immediately to a stream.
|
||||
*/
|
||||
virtual bool addInstance(HepRepInstance * instance) = 0;
|
||||
|
||||
/**
|
||||
* Removes an instance from this instancetree.
|
||||
*
|
||||
* @param instance to be removed.
|
||||
*/
|
||||
virtual void removeInstance(HepRepInstance * instance) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of instances.
|
||||
*
|
||||
* @return collection of HepRepInstances.
|
||||
*/
|
||||
virtual std::vector<HepRepInstance *> * getInstances() = 0;
|
||||
|
||||
/**
|
||||
* Adds a related instance tree to this instancetree.
|
||||
*
|
||||
* @param instanceTree related instancetree.
|
||||
* @return false only if written immediately to a stream.
|
||||
*/
|
||||
virtual bool addInstanceTree(HepRepTreeID * instanceTree) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of associated instance trees.
|
||||
*
|
||||
* @return collection of HepRepInstanceTrees.
|
||||
*/
|
||||
virtual std::vector<HepRepInstanceTree *> * getInstanceTrees() = 0;
|
||||
|
||||
/**
|
||||
* Returns the associated typetree.
|
||||
*
|
||||
* @return TreeID of the associated typetree.
|
||||
*/
|
||||
virtual HepRepTreeID * getTypeTree() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this instancetree.
|
||||
*
|
||||
* @param heprep needed to find the associated type.
|
||||
* @param filter to filter the instances.
|
||||
* @return copy of this instancetree.
|
||||
*/
|
||||
virtual HepRepInstanceTree * copy(HepRep * heprep, HepRepSelectFilter * filter = NULL) = 0;
|
||||
|
||||
virtual HepRepTreeID * copy() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPINSTANCETREE_H */
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPITERATOR_H
|
||||
#define HEPREP_HEPREPITERATOR_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRepAttValue;
|
||||
class HepRepInstance;
|
||||
class HepRepIteratorListener;
|
||||
|
||||
/**
|
||||
* HepRepIterator interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepIterator {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepIterator() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Signals if there is a next instance to iterate to.
|
||||
*
|
||||
* @return true if next() can be called.
|
||||
*/
|
||||
virtual bool hasNext() = 0;
|
||||
|
||||
/**
|
||||
* Returns next instance.
|
||||
*
|
||||
* @return next HepRepInstance.
|
||||
*/
|
||||
virtual HepRepInstance * nextInstance() = 0;
|
||||
|
||||
/**
|
||||
* Adds a listener to be informed about attribute changes while iterating.
|
||||
*
|
||||
* @param listener to be added.
|
||||
*/
|
||||
virtual void addHepRepIteratorListener(HepRepIteratorListener * listener) = 0;
|
||||
|
||||
/**
|
||||
* Removes a listener.
|
||||
*
|
||||
* @param listener to be removed.
|
||||
*/
|
||||
virtual void removeHepRepIteratorListener(HepRepIteratorListener * listener) = 0;
|
||||
|
||||
/**
|
||||
* Returns the attValue for key at the current point of iteration.
|
||||
*
|
||||
* @param key name of tye attribute to be looked up.
|
||||
* @return value associated to name at this point in the iteration.
|
||||
*/
|
||||
virtual HepRepAttValue * getAttValue(std::string key) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPITERATOR_H */
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPITERATORLISTENER_H
|
||||
#define HEPREP_HEPREPITERATORLISTENER_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
/**
|
||||
* HepRepIteratorListener interface. The implementor is called back for changes
|
||||
* of attributes while using the HepRepIterator to iterate over all the HepRepInstances.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepIteratorListener {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepIteratorListener() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Called if attribute key changes its value.
|
||||
*
|
||||
* @param key name of the changed attribute.
|
||||
* @param value value of the changed attribute.
|
||||
* @param showLabel value of showLabel.
|
||||
*/
|
||||
virtual void setAttribute(std::string key, std::string value, int showLabel) = 0;
|
||||
|
||||
/**
|
||||
* Called if attribute key changes its value.
|
||||
*
|
||||
* @param key name of the changed attribute.
|
||||
* @param value value of the changed attribute.
|
||||
* @param showLabel value of showLabel.
|
||||
*/
|
||||
virtual void setAttribute(std::string key, std::vector<double> value, int showLabel) = 0;
|
||||
|
||||
/**
|
||||
* Called if attribute key changes its value.
|
||||
*
|
||||
* @param key name of the changed attribute.
|
||||
* @param value value of the changed attribute.
|
||||
* @param showLabel value of showLabel.
|
||||
*/
|
||||
virtual void setAttribute(std::string key, long value, int showLabel) = 0;
|
||||
|
||||
/**
|
||||
* Called if attribute key changes its value.
|
||||
*
|
||||
* @param key name of the changed attribute.
|
||||
* @param value value of the changed attribute.
|
||||
* @param showLabel value of showLabel.
|
||||
*/
|
||||
virtual void setAttribute(std::string key, int value, int showLabel) = 0;
|
||||
|
||||
/**
|
||||
* Called if attribute key changes its value.
|
||||
*
|
||||
* @param key name of the changed attribute.
|
||||
* @param value value of the changed attribute.
|
||||
* @param showLabel value of showLabel.
|
||||
*/
|
||||
virtual void setAttribute(std::string key, double value, int showLabel) = 0;
|
||||
|
||||
/**
|
||||
* Called if attribute key changes its value.
|
||||
*
|
||||
* @param key name of the changed attribute.
|
||||
* @param value value of the changed attribute.
|
||||
* @param showLabel value of showLabel.
|
||||
*/
|
||||
virtual void setAttribute(std::string key, bool value, int showLabel) = 0;
|
||||
|
||||
/**
|
||||
* Called if attribute key is removed from the attribute set.
|
||||
*
|
||||
* @param key name of the removed attribute.
|
||||
*/
|
||||
virtual void removeAttribute(std::string key) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPITERATORLISTENER_H */
|
||||
@@ -0,0 +1,190 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPPOINT_H
|
||||
#define HEPREP_HEPREPPOINT_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepAttribute.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRepInstance;
|
||||
|
||||
/**
|
||||
* HepRepPoint interface. The HepRepMath class can be used to deal with the conversions.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepPoint : virtual public HepRepAttribute {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepPoint() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return dx-coordinate
|
||||
*/
|
||||
virtual double getX() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return dy-coordinate
|
||||
*/
|
||||
virtual double getY() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return dz-coordinate
|
||||
*/
|
||||
virtual double getZ() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return rho = sqrt(dx2+dy2);
|
||||
*/
|
||||
virtual double getRho() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return phi = atan2(dy, dx);
|
||||
*/
|
||||
virtual double getPhi() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return theta = atan2(rho, dx);
|
||||
*/
|
||||
virtual double getTheta() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return r = sqrt(dx2+dy2+dz2);
|
||||
*/
|
||||
virtual double getR() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @return eta = -0.5*clog((1.-ct)/(1.+ct)), where ct = .cos(getTheta(dx, dy, dz));
|
||||
*/
|
||||
virtual double getEta() = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return dx-coordinate
|
||||
*/
|
||||
virtual double getX(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return dy-coordinate
|
||||
*/
|
||||
virtual double getY(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return dz-coordinate
|
||||
*/
|
||||
virtual double getZ(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return rho = sqrt(dx2+dy2);
|
||||
*/
|
||||
virtual double getRho(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return phi = atan2(dy, dx);
|
||||
*/
|
||||
virtual double getPhi(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return theta = atan2(rho, dx);
|
||||
*/
|
||||
virtual double getTheta(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return r = sqrt(dx2+dy2+dz2);
|
||||
*/
|
||||
virtual double getR(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (xVertex, yVertex, zVertex).
|
||||
*
|
||||
* @return eta = -0.5*clog((1.-ct)/(1.+ct)), where ct = .cos(getTheta(dx, dy, dz));
|
||||
*/
|
||||
virtual double getEta(double xVertex, double yVertex, double zVertex) = 0;
|
||||
|
||||
/**
|
||||
* Returns coordinate with respect to vertex at (0, 0, 0).
|
||||
*
|
||||
* @param xyz list of three coordinates which are filled and returned.
|
||||
* If null, a new list of three coordinates is allocated.
|
||||
* @return list of 3 coordinates.
|
||||
*/
|
||||
virtual std::vector<double> * getXYZ(std::vector<double> * xyz) = 0;
|
||||
|
||||
/**
|
||||
* Returns associated instance (parent).
|
||||
*
|
||||
* @return HepRepInstance.
|
||||
*/
|
||||
virtual HepRepInstance * getInstance() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this point.
|
||||
*
|
||||
* @param parent to add the copy to.
|
||||
* @return copy of this point.
|
||||
*/
|
||||
virtual HepRepPoint * copy(HepRepInstance * parent) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPPOINT_H */
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPSELECTFILTER_H
|
||||
#define HEPREP_HEPREPSELECTFILTER_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRepInstance;
|
||||
|
||||
/**
|
||||
* HepRepSelectFilter interface used in copying HepReps.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepSelectFilter {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepSelectFilter() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Selects if the given instance will pass.
|
||||
*
|
||||
* @param instance to be checked.
|
||||
* @return true if instance passes.
|
||||
*/
|
||||
virtual bool select(HepRepInstance * instance) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPSELECTFILTER_H */
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPTREEID_H
|
||||
#define HEPREP_HEPREPTREEID_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
/**
|
||||
* HepRepTreeID interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepTreeID {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepTreeID() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Returns the name of this treeID.
|
||||
*
|
||||
* @return name of treeID.
|
||||
*/
|
||||
virtual std::string getName() = 0;
|
||||
|
||||
/**
|
||||
* Returns the version of this treeID.
|
||||
*
|
||||
* @return version of treeID.
|
||||
*/
|
||||
virtual std::string getVersion() = 0;
|
||||
|
||||
/**
|
||||
* Returns the qualifier that qualifies the relation that this treeID has with what it refers to.
|
||||
*
|
||||
* @return qualifier.
|
||||
*/
|
||||
virtual std::string getQualifier() = 0;
|
||||
|
||||
/**
|
||||
* Sets the qualifier that qualifies the relation that this treeID has with what it refers to.
|
||||
*
|
||||
* @param qualifier to be set.
|
||||
*/
|
||||
virtual void setQualifier(std::string qualifier) = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this treeID.
|
||||
*
|
||||
* @return copy of this treeID.
|
||||
*/
|
||||
virtual HepRepTreeID * copy() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPTREEID_H */
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPTYPE_H
|
||||
#define HEPREP_HEPREPTYPE_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepDefinition.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRep;
|
||||
|
||||
/**
|
||||
* HepRepType interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepType : virtual public HepRepDefinition {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepType() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Adds a sub-type to this type.
|
||||
*
|
||||
* @param type sub-type to be added.
|
||||
* @return false only if written directly to a stream.
|
||||
*/
|
||||
virtual bool addType(HepRepType * type) = 0;
|
||||
|
||||
/**
|
||||
* Returns the name of this type.
|
||||
*
|
||||
* @return name of type.
|
||||
*/
|
||||
virtual std::string getName() = 0;
|
||||
|
||||
/**
|
||||
* Returns the description of this type.
|
||||
*
|
||||
* @return description of type.
|
||||
*/
|
||||
virtual std::string getDescription() = 0;
|
||||
|
||||
/**
|
||||
* Returns the information URL of this type.
|
||||
*
|
||||
* @return info URL of type.
|
||||
*/
|
||||
virtual std::string getInfoURL() = 0;
|
||||
|
||||
/**
|
||||
* Returns the parent of this type.
|
||||
*
|
||||
* @return parent of type, or null if top-level.
|
||||
*/
|
||||
virtual HepRepType * getSuperType() = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of all the sub-types of this type.
|
||||
*
|
||||
* @return collection of HepRepTypes.
|
||||
*/
|
||||
virtual std::vector<HepRepType *> * getTypes() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this type.
|
||||
*
|
||||
* @param heprep top-level heprep. (Not sure if this is necessary).
|
||||
* @param parent to which this copy is added.
|
||||
* @return copy of this type.
|
||||
*/
|
||||
virtual HepRepType * copy(HepRep * heprep, HepRepType * parent) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPTYPE_H */
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPTYPETREE_H
|
||||
#define HEPREP_HEPREPTYPETREE_H 1
|
||||
|
||||
// Copyright 2000-2002, FreeHEP.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "HEPREP/HepRepTreeID.h"
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRep;
|
||||
class HepRepTreeID;
|
||||
class HepRepType;
|
||||
|
||||
/**
|
||||
* HepRepTypeTree interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepTypeTree : virtual public HepRepTreeID {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepTypeTree() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Adds a type to this typetree.
|
||||
*
|
||||
* @param type to be added.
|
||||
* @return false only if written immediatelty to a stream.
|
||||
*/
|
||||
virtual bool addType(HepRepType * type) = 0;
|
||||
|
||||
/**
|
||||
* Returns a collection of all types in this tree.
|
||||
*
|
||||
* @return collection of HepRepTypes.
|
||||
*/
|
||||
virtual std::vector<HepRepType *> * getTypes() = 0;
|
||||
|
||||
/**
|
||||
* Returns a deep copy of this typetree.
|
||||
*
|
||||
* @param heprep top-level heprep. (Not sure if this is necessary).
|
||||
* @return copy of this typetree.
|
||||
*/
|
||||
virtual HepRepTypeTree * copy(HepRep * heprep) = 0;
|
||||
|
||||
// To be enable in g++ 3.0
|
||||
// using HepRep::HepRepTreeID::copy;
|
||||
// To be disabled in g++ 3.0
|
||||
virtual HepRepTreeID * copy() = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPTYPETREE_H */
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -*- C++ -*-
|
||||
// AID-GENERATED
|
||||
// =========================================================================
|
||||
// This class was generated by AID - Abstract Interface Definition
|
||||
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
|
||||
// =========================================================================
|
||||
#ifndef HEPREP_HEPREPWRITER_H
|
||||
#define HEPREP_HEPREPWRITER_H 1
|
||||
|
||||
// Copyright 2002, Freehep.
|
||||
|
||||
namespace HEPREP {
|
||||
|
||||
class HepRep;
|
||||
class HepRepAction;
|
||||
class HepRepAttDef;
|
||||
class HepRepAttValue;
|
||||
class HepRepAttribute;
|
||||
class HepRepDefinition;
|
||||
class HepRepInstance;
|
||||
class HepRepInstanceTree;
|
||||
class HepRepPoint;
|
||||
class HepRepTreeID;
|
||||
class HepRepType;
|
||||
class HepRepTypeTree;
|
||||
|
||||
/**
|
||||
* HepRepWriter interface.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
*/
|
||||
class HepRepWriter {
|
||||
|
||||
public:
|
||||
/// Destructor.
|
||||
virtual ~HepRepWriter() { /* nop */; }
|
||||
|
||||
/**
|
||||
* Closes the writer and its underlying stream.
|
||||
*
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool close() = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRep.
|
||||
*
|
||||
* @param heprep to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRep * heprep) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepTypeTree.
|
||||
*
|
||||
* @param typeTree to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepTypeTree * typeTree) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepType.
|
||||
*
|
||||
* @param type to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepType * type) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepTreeID.
|
||||
*
|
||||
* @param treeID to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepTreeID * treeID) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepAction.
|
||||
*
|
||||
* @param action to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepAction * action) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepInstanceTree.
|
||||
*
|
||||
* @param instanceTree to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepInstanceTree * instanceTree) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepInstance.
|
||||
*
|
||||
* @param instance to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepInstance * instance) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepPoint.
|
||||
*
|
||||
* @param point to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepPoint * point) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepAttribute.
|
||||
*
|
||||
* @param attribute to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepAttribute * attribute) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepDefinition.
|
||||
*
|
||||
* @param definition to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepDefinition * definition) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepAttValue.
|
||||
*
|
||||
* @param attValue to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepAttValue * attValue) = 0;
|
||||
|
||||
/**
|
||||
* Writes a HepRepAttDef.
|
||||
*
|
||||
* @param attDef to be written.
|
||||
* @return false in case of a stream problem.
|
||||
*/
|
||||
virtual bool write(HepRepAttDef * attDef) = 0;
|
||||
}; // class
|
||||
}; // namespace HEPREP
|
||||
#endif /* ifndef HEPREP_HEPREPWRITER_H */
|
||||
Reference in New Issue
Block a user