Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -1,20 +1,10 @@
//
//
// $Id: STEPaggregate.h,v 1.3 1999/12/15 14:50:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
#ifndef STEPAGGREGATE_H
#define STEPAGGREGATE_H
/*
* NIST STEP Core Class Library
* clstepcore/STEPaggregate.h
* May 1995
* April 1997
* K. C. Morris
* David Sauder
@@ -22,7 +12,11 @@
* and is not subject to copyright.
*/
/* */
/* $Id: STEPaggregate.h,v 1.4 2000/01/21 13:42:31 gcosmo Exp $ */
#ifdef __OSTORE__
#include <ostore/ostore.hh> // Required to access ObjectStore Class Library
#endif
#ifdef __O3DB__
#include <OpenOODB.h>
@@ -30,28 +24,29 @@
class InstMgr;
class STEPaggregate;
class Logical;
class Boolean;
#ifndef _ODI_OSSG_
class LOGICAL;
class BOOL;
#endif
class TypeDescriptor;
#include "globals.hh"
#include <errordesc.h>
#include <SingleLinkList.h>
#include <sdai.h>
#include <baseType.h>
#include <SdaiBinary.h>
#include <sdai.h>
#include <STEPundefined.h>
#include <scl_string.h>
#include "G4ios.hh"
class STEPentity;
#define S_ENTITY_NULL &NilSTEPentity
extern STEPentity NilSTEPentity;
//class SCLP23(Application_instance);
//#define S_ENTITY_NULL &NilSTEPentity
//extern SCLP23(Application_instance) NilSTEPentity;
#define AGGR_NULL &NilSTEPaggregate
extern STEPaggregate NilSTEPaggregate;
typedef unsigned short BOOLEAN;
//typedef unsigned short BOOLEAN;
class SingleLinkNode;
/******************************************************************************
@@ -59,6 +54,9 @@ class SingleLinkNode;
*****************************************************************************/
typedef STEPaggregate * STEPaggregateH;
typedef STEPaggregate * STEPaggregate_ptr;
typedef STEPaggregate_ptr STEPaggregate_var;
class STEPaggregate : public SingleLinkList
{
protected:
@@ -66,35 +64,36 @@ class STEPaggregate : public SingleLinkList
protected:
virtual Severity ReadValue(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId =0,
int assignVal =1, int ExchangeFileFormat =1);
virtual Severity ReadValue(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId =0,
int assignVal =1, int ExchangeFileFormat =1,
const char *currSch =0);
public:
int is_null() { return _null; }
int is_null() { return _null; }
virtual Severity AggrValidLevel(const char *value, ErrorDescriptor *err,
const TypeDescriptor *elem_type, InstMgr *insts,
int optional, char *tokenList, int addFileId =0,
virtual Severity AggrValidLevel(const char *value, ErrorDescriptor *err,
const TypeDescriptor *elem_type, InstMgr *insts,
int optional, char *tokenList, int addFileId =0,
int clearError =0);
virtual Severity AggrValidLevel(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type, InstMgr *insts,
int optional, char *tokenList, int addFileId =0,
virtual Severity AggrValidLevel(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type, InstMgr *insts,
int optional, char *tokenList, int addFileId =0,
int clearError =0);
// INPUT
virtual Severity StrToVal(const char *s, ErrorDescriptor *err =0,
virtual Severity StrToVal(const char *s, ErrorDescriptor *err =0,
const TypeDescriptor *elem_type =0,
InstMgr *insts =0, int addFileId = 0);
virtual Severity STEPread (G4std::istream& in, ErrorDescriptor *err,
virtual Severity STEPread (G4std::istream& in, ErrorDescriptor *err,
const TypeDescriptor *elem_type =0,
InstMgr *insts =0, int addFileId =0);
InstMgr *insts =0, int addFileId =0,
const char *currSch =0);
// OUTPUT
virtual const char *asStr(SCLstring & s) const;
virtual void STEPwrite (G4std::ostream& out =G4cout) const;
virtual void STEPwrite (G4std::ostream& out =G4cout, const char * =0) const;
// SingleLinkNode * GetHead () const
// { return (STEPnode *) SingleLinkList::GetHead(); }
@@ -109,6 +108,10 @@ class STEPaggregate : public SingleLinkList
// COPY - defined in subtypes
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
/******************************************************************
@@ -123,10 +126,16 @@ class GenericAggregate : public STEPaggregate
virtual SingleLinkNode *NewNode();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
GenericAggregate () { }
virtual ~GenericAggregate () { }
GenericAggregate();
virtual ~GenericAggregate();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef GenericAggregate * GenericAggregateH;
typedef GenericAggregate * GenericAggregate_ptr;
typedef GenericAggregate_ptr GenericAggregate_var;
/******************************************************************************
**
@@ -138,20 +147,27 @@ class EntityAggregate : public STEPaggregate
virtual Severity ReadValue(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId =0,
int assignVal =1, int ExchangeFileFormat =1);
int assignVal =1, int ExchangeFileFormat =1,
const char *currSch =0);
virtual SingleLinkNode *NewNode();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
EntityAggregate ();
virtual ~EntityAggregate ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef EntityAggregate * EntityAggregateH;
typedef EntityAggregate * EntityAggregate_ptr;
typedef EntityAggregate_ptr EntityAggregate_var;
/******************************************************************
** Class: SelectAggregate
** Description: this is a minimal representions for a collection of
** STEPenumerations
** SCLP23(Select)
******************************************************************/
class SelectAggregate : public STEPaggregate
{
@@ -159,15 +175,22 @@ class SelectAggregate : public STEPaggregate
virtual Severity ReadValue(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId =0,
int assignVal =1, int ExchangeFileFormat =1);
int assignVal =1, int ExchangeFileFormat =1,
const char *currSch =0);
virtual SingleLinkNode *NewNode ();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
SelectAggregate ();
virtual ~SelectAggregate ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef SelectAggregate * SelectAggregateH;
typedef SelectAggregate * SelectAggregate_ptr;
typedef SelectAggregate_ptr SelectAggregate_var;
/******************************************************************
** Class: StringAggregate
@@ -179,10 +202,16 @@ class StringAggregate : public STEPaggregate
virtual SingleLinkNode *NewNode();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
StringAggregate () { }
virtual ~StringAggregate () { }
StringAggregate();
virtual ~StringAggregate();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef StringAggregate * StringAggregateH;
typedef StringAggregate * StringAggregate_ptr;
typedef StringAggregate_ptr StringAggregate_var;
/******************************************************************
@@ -195,15 +224,21 @@ class BinaryAggregate : public STEPaggregate
virtual SingleLinkNode *NewNode();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
BinaryAggregate () { }
virtual ~BinaryAggregate () { }
BinaryAggregate();
virtual ~BinaryAggregate();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef BinaryAggregate * BinaryAggregateH;
typedef BinaryAggregate * BinaryAggregate_ptr;
typedef BinaryAggregate_ptr BinaryAggregate_var;
/******************************************************************
** Class: EnumAggregate
** Description: this is a minimal representions for a collection of
** STEPenumerations
** SCLP23(Enum)
******************************************************************/
class EnumAggregate : public STEPaggregate
{
@@ -213,31 +248,59 @@ class EnumAggregate : public STEPaggregate
EnumAggregate ();
virtual ~EnumAggregate ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef EnumAggregate * EnumAggregateH;
typedef EnumAggregate * EnumAggregate_ptr;
typedef EnumAggregate_ptr EnumAggregate_var;
class Logicals : public EnumAggregate
class LOGICALS : public EnumAggregate
{
public:
virtual SingleLinkNode * NewNode ();
Logicals () { }
virtual ~Logicals () { }
LOGICALS();
virtual ~LOGICALS();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef Logicals * LogicalsH;
inline Logicals * create_Logicals () { return new Logicals ; }
typedef LOGICALS * LogicalsH;
typedef LOGICALS * LOGICALS_ptr;
typedef LOGICALS_ptr LOGICALS_var;
#ifdef __OSTORE__
LOGICALS * create_LOGICALS(os_database *db);
#else
LOGICALS * create_LOGICALS();
#endif
class Booleans : public EnumAggregate
class BOOLS : public EnumAggregate
{
public:
virtual SingleLinkNode * NewNode ();
Booleans () { }
virtual ~Booleans () { }
BOOLS();
virtual ~BOOLS();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef Booleans * BooleansH;
inline Booleans * create_Booleans () { return new Booleans ; }
//typedef BOOLS * BooleansH;
typedef BOOLS * BOOLS_ptr;
typedef BOOLS_ptr BOOLS_var;
#ifdef __OSTORE__
BOOLS * create_BOOLS(os_database *db);
#else
BOOLS * create_BOOLS();
#endif
class RealAggregate : public STEPaggregate {
@@ -245,10 +308,16 @@ class RealAggregate : public STEPaggregate {
virtual SingleLinkNode *NewNode();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
RealAggregate () { }
virtual ~RealAggregate () { }
RealAggregate();
virtual ~RealAggregate();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef RealAggregate * RealAggregateH;
typedef RealAggregate * RealAggregate_ptr;
typedef RealAggregate_ptr RealAggregate_var;
class IntAggregate : public STEPaggregate {
@@ -256,10 +325,16 @@ class IntAggregate : public STEPaggregate {
virtual SingleLinkNode *NewNode();
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
IntAggregate () { }
virtual ~IntAggregate () { }
IntAggregate();
virtual ~IntAggregate();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef IntAggregate * IntAggregateH;
typedef IntAggregate * IntAggregate_ptr;
typedef IntAggregate_ptr IntAggregate_var;
///////////////////////////////////////////////////////////////////////////////
@@ -284,8 +359,11 @@ class STEPnode : public SingleLinkNode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite(SCLstring &s);
virtual const char *STEPwrite(SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
typedef STEPnode * STEPnodeH;
@@ -309,7 +387,7 @@ class GenericAggrNode : public STEPnode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite(SCLstring &s);
virtual const char *STEPwrite(SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
@@ -320,13 +398,17 @@ class GenericAggrNode : public STEPnode {
virtual SingleLinkNode * NewNode ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
/////////////////////////////////////////////////////////////////////////////
class EntityNode : public STEPnode {
public:
STEPentity * node;
SCLP23(Application_instance) * node;
// INPUT
virtual Severity StrToVal(const char *s, ErrorDescriptor *err,
@@ -344,13 +426,13 @@ class EntityNode : public STEPnode {
InstMgr *insts, int addFileId = 0);
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
EntityNode (STEPentity * e);
EntityNode () { }
~EntityNode () { }
EntityNode (SCLP23(Application_instance) * e);
EntityNode();
~EntityNode();
virtual SingleLinkNode * NewNode ();
@@ -380,6 +462,10 @@ class EntityNode : public STEPnode {
<< "\n" << _POC_ "\n";
return STEPread(in, err, 0, 0, 0);
}
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
///////////////////////////////////////////////////////////////////////////
@@ -387,13 +473,13 @@ class EntityNode : public STEPnode {
/******************************************************************
** Class: SelectNode
** Description: this is a minimal representions for node in lists of
** STEPenumerations
** SCLP23(Select)
******************************************************************/
class SelectNode : public STEPnode {
public:
SdaiSelect * node;
SCLP23(Select) * node;
public:
// INPUT
@@ -402,23 +488,25 @@ class SelectNode : public STEPnode {
InstMgr *insts, int addFileId = 0);
virtual Severity StrToVal(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId = 0);
InstMgr *insts, int addFileId = 0,
const char *currSch =0);
virtual Severity STEPread(const char *s, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId = 0);
virtual Severity STEPread(G4std::istream &in, ErrorDescriptor *err,
const TypeDescriptor *elem_type,
InstMgr *insts, int addFileId = 0);
InstMgr *insts, int addFileId = 0,
const char *currSch =0);
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
SelectNode (SdaiSelect * s) : node (s) { }
SelectNode () { }
~SelectNode () { }
SelectNode(SCLP23(Select) * s);
SelectNode();
~SelectNode();
virtual SingleLinkNode * NewNode ();
@@ -426,28 +514,32 @@ class SelectNode : public STEPnode {
Severity StrToVal(const char *s, ErrorDescriptor *err)
{
G4cerr << "Internal error: " << __FILE__ << __LINE__
<< "\n" << _POC_ "\n";
<< "\n" << _POC_ "\n";
return StrToVal(s, err, 0, 0, 0);
}
Severity StrToVal(G4std::istream &in, ErrorDescriptor *err)
{
G4cerr << "Internal error: " << __FILE__ << __LINE__
<< "\n" << _POC_ "\n";
<< "\n" << _POC_ "\n";
return StrToVal(in, err, 0, 0, 0);
}
Severity STEPread(const char *s, ErrorDescriptor *err)
{
G4cerr << "Internal error: " << __FILE__ << __LINE__
<< "\n" << _POC_ "\n";
<< "\n" << _POC_ "\n";
return STEPread(s, err, 0, 0, 0);
}
Severity STEPread(G4std::istream &in, ErrorDescriptor *err)
{
G4cerr << "Internal error: " << __FILE__ << __LINE__
<< "\n" << _POC_ "\n";
<< "\n" << _POC_ "\n";
return STEPread(in, err, 0, 0, 0);
}
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
///////////////////////////////////////////////////////////////////////////
@@ -460,7 +552,7 @@ class SelectNode : public STEPnode {
class StringNode : public STEPnode {
public:
SdaiString value;
SCLP23(String) value;
public:
// INPUT
@@ -472,16 +564,20 @@ class StringNode : public STEPnode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
StringNode(StringNode& sn);
StringNode (const char * sStr);
StringNode () { value = 0; }
~StringNode () { }
StringNode();
~StringNode();
virtual SingleLinkNode * NewNode ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
///////////////////////////////////////////////////////////////////////////
@@ -494,7 +590,7 @@ class StringNode : public STEPnode {
class BinaryNode : public STEPnode {
public:
SdaiBinary value;
SCLP23(Binary) value;
public:
// INPUT
@@ -506,28 +602,32 @@ class BinaryNode : public STEPnode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
BinaryNode(BinaryNode& bn);
BinaryNode (const char * sStr);
BinaryNode () { value = 0; }
~BinaryNode () { }
BinaryNode();
~BinaryNode();
virtual SingleLinkNode * NewNode ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
/******************************************************************
** Class: EnumNode
** Description: this is a minimal representions for node in lists of
** STEPenumerations
** SCLP23(Enum)
******************************************************************/
class EnumNode : public STEPnode {
public:
STEPenumeration * node;
SCLP23(Enum) * node;
public:
// INPUT
@@ -539,20 +639,24 @@ class EnumNode : public STEPnode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
EnumNode (STEPenumeration * e) : node (e) { }
EnumNode () { }
~EnumNode () { }
EnumNode(SCLP23(Enum) * e);
EnumNode();
~EnumNode();
virtual SingleLinkNode * NewNode ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
class RealNode : public STEPnode {
public:
SdaiReal value; // double
SCLP23(Real) value; // double
public:
// INPUT
@@ -564,19 +668,23 @@ class RealNode : public STEPnode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
RealNode () { value = S_REAL_NULL; }
~RealNode () { }
RealNode();
~RealNode();
virtual SingleLinkNode * NewNode ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
class IntNode : public STEPnode {
public:
SdaiInteger value; // long int
SCLP23(Integer) value; // long int
public:
// INPUT
@@ -588,21 +696,25 @@ class IntNode : public STEPnode {
// OUTPUT
virtual const char *asStr(SCLstring & s);
virtual const char *STEPwrite (SCLstring &s);
virtual const char *STEPwrite (SCLstring &s, const char * =0);
virtual void STEPwrite (G4std::ostream& out =G4cout);
// CONSTRUCTORS
IntNode () { value = S_INT_NULL; }
~IntNode () { }
IntNode();
~IntNode();
virtual SingleLinkNode * NewNode ();
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
};
/******************************************************************
** The following classes are currently stubs
**
**/
/*
class Array : public STEPaggregate {
public:
int lowerBound;
@@ -625,5 +737,5 @@ class Set :
public STEPaggregate {
int cnt;
};
*/
#endif