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: STEPattribute.h,v 1.3 1999/12/15 14:50:14 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
//
#ifndef STEPATTRIBUTE_H
#define STEPATTRIBUTE_H 1
/*
* NIST STEP Core Class Library
* clstepcore/STEPattribute.h
* May 1995
* April 1997
* K. C. Morris
* David Sauder
@@ -22,7 +12,13 @@
* and is not subject to copyright.
*/
/* */
/* $Id: STEPattribute.h,v 1.4 2000/01/21 13:42:31 gcosmo Exp $ */
#include <sclprefixes.h>
#ifdef __OSTORE__
#include <ostore/ostore.hh> // Required to access ObjectStore Class Library
#endif
#ifdef __O3DB__
#include <OpenOODB.h>
@@ -32,29 +28,33 @@
#include <errordesc.h>
#include <baseType.h>
#include <sdai.h>
// this is used to set a const int Real_Num_Precision
// in STEPaggregate.cc and STEPattribute.cc
#define REAL_NUM_PRECISION 15
typedef unsigned short BOOLEAN;
//typedef unsigned short BOOLEAN;
typedef double real;
class InstMgr;
class STEPentity;
class STEPenumeration;
// Commented out following declaration, since meaningless - GC
//class SCLP23(Application_instance);
class STEPaggregate;
class SCLundefined;
class SdaiSelect;
class SdaiBinary;
//class SCLP23(Enum);
//class SCLP23(Select);
//class SCLP23(Binary);
//class SCLP23(String);
class TypeDescriptor;
class AttrDescriptor;
class EntityDescriptor;
#include "g4std/strstream"
#include <ExpDict.h>
//#include <ExpDict.h>
#define s_String char *
//#define s_String char *
extern int SetErrOnNull(const char *attrValue, ErrorDescriptor *error);
////////////////////
@@ -65,16 +65,16 @@ CheckRemainingInput(G4std::istream &in, ErrorDescriptor *err,
const char *typeName, // used in error message
const char *tokenList); // e.g. ",)"
extern STEPentity *
extern SCLP23(Application_instance) *
ReadEntityRef(G4std::istream &in, ErrorDescriptor *err, char *tokenList,
InstMgr * instances, int addFileId);
extern STEPentity *
extern SCLP23(Application_instance) *
ReadEntityRef(const char * s, ErrorDescriptor *err, char *tokenList,
InstMgr * instances, int addFileId);
extern Severity
EntityValidLevel(STEPentity *se,
EntityValidLevel(SCLP23(Application_instance) *se,
const TypeDescriptor *ed, // entity type that entity se needs
// to match. (this must be an
// EntityDescriptor)
@@ -91,7 +91,7 @@ EntityValidLevel(const char *attrValue, // string contain entity ref
////////////////////
////////////////////
extern STEPentity *STEPread_reference (const char * s, ErrorDescriptor *err,
extern SCLP23(Application_instance) *STEPread_reference (const char * s, ErrorDescriptor *err,
InstMgr * instances, int addFileId);
////////////////////
@@ -108,39 +108,47 @@ PushPastImbedAggr (G4std::istream& in, SCLstring &s, ErrorDescriptor *err);
extern void
PushPastAggr1Dim(G4std::istream& in, SCLstring &s, ErrorDescriptor *err);
//extern Severity ValidateEntityType(STEPentity *se,
//extern Severity ValidateEntityType(SCLP23(Application_instance) *se,
// const AttrDescriptor *ad,
// ErrorDescriptor *error);
class STEPattribute {
friend G4std::ostream &operator<< ( G4std::ostream&, STEPattribute& );
friend class STEPentity;
protected:
// The CenterLine compiler couldn't handle this friend declaration.
// Here is the error
// "../../../src/clstepcore/STEPattribute.h", line 118: internal << AT&T C++ Translator 3.0.2 - ObjectCenter Version 2.1>> error: cannot find friend P23::Application_instance
// We may want to change the next two lines back at some point? DAS
// friend class SCLP23(Application_instance);
// protected:
public:
ErrorDescriptor _error;
unsigned int _derive : 1;
int Derive (unsigned int n =1) { return _derive =n; }
STEPattribute *_redefAttr;
void RedefiningAttr(STEPattribute *a) { _redefAttr = a; }
public:
const AttrDescriptor * aDesc;
// You know which of these to use based on the return value of
// NonRefType() - see below. BASE_TYPE is defined in baseType.h
// This variable points to an appropriate member variable in the entity
// class in the generated schema class library (the entity class is
// inherited from STEPentity)
// inherited from SCLP23(Application_instance))
union {
SdaiInteger *i; // INTEGER_TYPE // SdaiInteger is a long int
class SdaiString *S; // STRING_TYPE
class SdaiBinary *b; // BINARY_TYPE
SdaiReal *r; // REAL_TYPE and NUMBER_TYPE // SdaiReal is a double
class STEPentity* *c; // ENTITY_TYPE
SCLP23(String) *S;// STRING_TYPE
SCLP23(Integer) *i; // INTEGER_TYPE (Integer is a long int)
SCLP23(Binary) *b; // BINARY_TYPE
SCLP23(Real) *r; // REAL_TYPE and NUMBER_TYPE (Real is a double)
SCLP23(Application_instance)* *c; // ENTITY_TYPE
STEPaggregate *a; // AGGREGATE_TYPE
STEPenumeration *e; // ENUM_TYPE, BOOLEAN_TYPE, and LOGICAL_TYPE
class SdaiSelect *sh; // SELECT_TYPE
SCLP23(Enum) *e; // ENUM_TYPE, BOOLEAN_TYPE, and LOGICAL_TYPE
SCLP23(Select) *sh; // SELECT_TYPE
SCLundefined *u; // UNKNOWN_TYPE
void *p;
} ptr;
@@ -156,23 +164,25 @@ class STEPattribute {
Severity StrToVal(const char *s, InstMgr *instances =0,
int addFileId =0);
Severity STEPread(G4std::istream& in = G4cin, InstMgr *instances =0,
int addFileId =0);
int addFileId =0, const char * =NULL);
const char * asStr(SCLstring &) const; // return the attr value as a string
void STEPwrite(G4std::ostream& out = G4cout);
const char * asStr(SCLstring &, const char * =0) const;
// return the attr value as a string
void STEPwrite(G4std::ostream& out = G4cout, const char * =0);
BOOLEAN ShallowCopy(STEPattribute *sa);
int ShallowCopy(STEPattribute *sa);
Severity set_null();
////////////// Return info on attr
BOOLEAN Nullable() const; // may this attribute be null?
BOOLEAN is_null () const; // is this attribute null?
int Nullable() const; // may this attribute be null?
int is_null () const; // is this attribute null?
int IsDerived () const { return _derive; }
STEPattribute *RedefiningAttr() { return _redefAttr; }
const s_String Name() const;
const s_String TypeName() const;
const char * Name() const;
const char * TypeName() const;
const BASE_TYPE Type() const;
const BASE_TYPE NonRefType() const;
const BASE_TYPE BaseType() const;
@@ -184,6 +194,9 @@ class STEPattribute {
Severity ValidLevel (const char *attrValue, ErrorDescriptor *error,
InstMgr *im, int clearError = 1);
#ifdef __OSTORE__
static os_typespec* get_os_typespec();
#endif
public:
////////////////// Constructors
@@ -194,21 +207,21 @@ class STEPattribute {
~STEPattribute () {};
// INTEGER
STEPattribute (const class AttrDescriptor& d, SdaiInteger *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(Integer) *p);
// BINARY
STEPattribute (const class AttrDescriptor& d, SdaiBinary *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(Binary) *p);
// STRING
STEPattribute (const class AttrDescriptor& d, SdaiString *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(String) *p);
// REAL & NUMBER
STEPattribute (const class AttrDescriptor& d, SdaiReal *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(Real) *p);
// ENTITY
STEPattribute (const class AttrDescriptor& d, STEPentity* *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(Application_instance)* *p);
// AGGREGATE
STEPattribute (const class AttrDescriptor& d, STEPaggregate *p);
// ENUMERATION and Logical
STEPattribute (const class AttrDescriptor& d, STEPenumeration *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(Enum) *p);
// SELECT
STEPattribute (const class AttrDescriptor& d, class SdaiSelect *p);
STEPattribute (const class AttrDescriptor& d, SCLP23(Select) *p);
// UNDEFINED
STEPattribute (const class AttrDescriptor& d, SCLundefined *p);