1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0024805: Eliminate unused static functions and methods: ShallowDump(), ShallowCopy(), STANDARD_TYPE(...)

Implementation of global functions STANDARD_TYPE() for types not inheriting Standard_Transient or Standard_Persistent are eliminated.

Global functions and class methods ShallowCopy() are removed; also removed unused classes Visual3d_PickPath and Visual3d_PickDescriptor.

Global functions and class methods ShallowDump() are removed, except for classes Standard_GUID, TopLoc_Datum, and TopLoc_Location as the latter are still used in some Debug printouts.
This commit is contained in:
abv
2014-04-11 13:59:41 +04:00
committed by apn
parent c5751993f2
commit 2cb4424136
143 changed files with 16 additions and 2825 deletions

View File

@@ -15,9 +15,7 @@ Handle_Standard_Persistent.hxx
Handle_Standard_Persistent.cxx
Handle_Standard_Transient.cxx
Handle_Standard_Transient.hxx
Standard_Address.cxx
Standard_Address.hxx
Standard_Boolean.cxx
Standard_Boolean.hxx
Standard_Byte.hxx
Standard_PByte.hxx
@@ -25,20 +23,14 @@ Standard_CLocaleSentry.hxx
Standard_CLocaleSentry.cxx
Standard_CString.cxx
Standard_CString.hxx
Standard_Character.cxx
Standard_Character.hxx
Standard_ExtCharacter.cxx
Standard_ExtCharacter.hxx
Standard_ExtString.cxx
Standard_ExtString.hxx
Standard_HashCode.cxx
Standard_IStream.cxx
Standard_IStream.hxx
Standard_Integer.cxx
Standard_Integer.hxx
Standard_Macro.hxx
Standard_OId.hxx
Standard_OStream.cxx
Standard_OStream.hxx
Standard_Persistent_proto.hxx
Standard_PrimitiveTypes.hxx
@@ -46,11 +38,9 @@ Standard_Real.cxx
Standard_Real.hxx
Standard_SStream.cxx
Standard_SStream.hxx
Standard_ShallowDump.cxx
Standard_ShortReal.cxx
Standard_ShortReal.hxx
Standard_Stream.hxx
Standard_Time.cxx
Standard_Time.hxx
Standard_Transient.hxx
Standard_Transient_proto.hxx

View File

@@ -92,8 +92,6 @@ class Handle(Standard_Persistent)
Standard_EXPORT ~Handle(Standard_Persistent)();
Standard_EXPORT void ShallowDump(Standard_OStream&) const;
bool operator==(const Handle(Standard_Persistent)& right) const
{
return entity == right.entity;

View File

@@ -1,34 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Address.hxx>
#include <Standard_Type.hxx>
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
const Handle_Standard_Type& Standard_Address_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_Address", sizeof(Standard_Address),0,NULL);
return _aType;
}
//============================================================================
//==== ShallowDump : Writes a CString value.
//============================================================================
Standard_EXPORT void ShallowDump (const Standard_Address Value, Standard_OStream& s)
{ s << Value << " Standard_Address " << "\n"; }

View File

@@ -12,35 +12,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//============================================================================
//==== Titre: Standard_Address.hxx
//==== Role : The headr file of primitve type "Address" from package "Standard"
//====
//==== Implementation: This is a primitive type implementadef with typedef
//==== typedef char* Address;
//============================================================================
#ifndef _Standard_Address_HeaderFile
#define _Standard_Address_HeaderFile
# include <string.h>
//typedef void* Standard_Address;
#include <Standard_Integer.hxx>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_Address_Type_();
//class Standard_OStream;
//void ShallowDump (const Standard_Address, Standard_OStream& );
//============================================================================
//==== ShallowCopy: Returns a CString
//============================================================================
inline Standard_Address ShallowCopy (const Standard_Address Value)
{
return Value;
}
//============================================================================
//==== HashCode : Returns a HashCode CString
//============================================================================

View File

@@ -1,51 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Boolean.hxx>
#include <Standard_RangeError.hxx>
#include <Standard_Stream.hxx>
#include <Standard_OStream.hxx>
const Handle_Standard_Type& Standard_Boolean_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_Boolean",sizeof(Standard_Boolean),0,NULL);
return _aType;
}
// ------------------------------------------------------------------
// Hascode : Computes a hascoding value for a given Integer
// ------------------------------------------------------------------
//Standard_Integer HashCode(const Standard_Boolean me
// ,const Standard_Integer Upper)
//{
// if (Upper < 1){
// Standard_RangeError::
// Raise("Try to apply HashCode method with negative or null argument.");
// }
// return (me % Upper) + 1;
//}
// ----------------------------------------
// ShallowCopy : Makes a copy of a boolean
// ----------------------------------------
Standard_Boolean ShallowCopy (const Standard_Boolean me)
{ return me; }
// ------------------------------------------------------------------
// ShallowDump : Writes a boolean value
// ------------------------------------------------------------------
Standard_EXPORT void ShallowDump (const Standard_Boolean Value, Standard_OStream& s)
{ s << Value << " Standard_Boolean" << "\n"; }

View File

@@ -12,64 +12,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//============================================================================
//==== Titre: Standard_Boolean.hxx
//==== Role : The headr file of primitve type "Boolean" from package "Standard"
//====
//==== Implementation: This is a primitive type implementadef with typedef
//==== typedef int Standard_Boolean
//==== #define Standard_False 0
//==== #define Standard_True 1
//============================================================================
#ifndef _Standard_Boolean_HeaderFile
#define _Standard_Boolean_HeaderFile
//typedef unsigned int Standard_Boolean;
#ifndef _Standard_TypeDef_HeaderFile
//typedef unsigned integer Standard_Boolean;
#include <Standard_TypeDef.hxx>
#endif
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_Boolean_Type_();
//class Standard_OStream;
//void ShallowDump (const Standard_Boolean, Standard_OStream& );
// ===============================================
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
// - IsSimilar
// - Shallowcopy
// - ShallowDump
// ===============================================
// ==================================
// Method implemented in Standard_Boolean.cxx
// ==================================
__Standard_API Standard_Boolean ShallowCopy (const Standard_Boolean);
//__Standard_API Standard_Integer HashCode (const Standard_Boolean, const Standard_Integer);
// ===============
// inline methods
// ===============
// ------------------------------------------------------------------
// IsEqual : Returns Standard_True if two booleans have the same value
// ------------------------------------------------------------------
//inline Standard_Boolean IsEqual(const Standard_Boolean One
// ,const Standard_Boolean Two)
//{ return One == Two; }
// ------------------------------------------------------------------
// IsSimilar : Returns Standard_True if two booleans have the same value
// ------------------------------------------------------------------
inline Standard_Boolean IsSimilar(const Standard_Boolean One
,const Standard_Boolean Two)
{ return One == Two; }
#endif

View File

@@ -27,23 +27,6 @@
#include <string.h>
#include <stdarg.h>
//============================================================================
//====
//============================================================================
const Handle_Standard_Type& Standard_CString_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_CString",sizeof(Standard_CString),0,NULL);
return _aType;
}
//============================================================================
//==== ShallowDump : Writes a CString value.
//============================================================================
Standard_EXPORT void ShallowDump (const Standard_CString Value, Standard_OStream& s)
{ s << Value << " Standard_CString " << "\n"; }
//============================================================================
//==== HashCode of a CString
//============================================================================

View File

@@ -41,11 +41,7 @@
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_CString_Type_();
inline Standard_Integer Abs (const Standard_Integer);
inline Standard_CString ShallowCopy (const Standard_CString Value);
inline Standard_Boolean IsSimilar(const Standard_CString One
,const Standard_CString Two);
__Standard_API Standard_Integer HashCode (const Standard_CString,
@@ -67,14 +63,6 @@ __Standard_API int Printf (const char* theFormat, ...);
__Standard_API int Fprintf (FILE* theFile, const char* theFormat, ...);
__Standard_API int Sprintf (char* theBuffer, const char* theFormat, ...);
//============================================================================
//==== ShallowCopy: Returns a CString
//============================================================================
inline Standard_CString ShallowCopy (const Standard_CString Value)
{
return Value;
}
//============================================================================
//==== IsSimilar : Returns Standard_True if two booleans have the same value
//============================================================================

View File

@@ -1,58 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//============================================================================
//==== Titre: Standard_Character.cxx
//==== Role : the methodes which raise the exceptions are implemented in
//==== this file.
//============================================================================
#include <stdlib.h>
#include <Standard_Character.hxx>
#include <Standard_Integer.hxx>
#include <Standard_RangeError.hxx>
#include <Standard_Stream.hxx>
#include <Standard_OStream.hxx>
#include <Standard_Type.hxx>
const Handle_Standard_Type& Standard_Character_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_Character",sizeof(Standard_Character),0,NULL);
return _aType;
}
// ------------------------------------------------------------------
// Hascode : Computes a hascoding value for a given Character
// ------------------------------------------------------------------
Standard_Integer HashCode(const Standard_Character me,
const Standard_Integer Upper)
{
if (Upper < 1){
Standard_RangeError::
Raise("Try to apply HashCode method with negative or null argument.");
}
Standard_Character S[2];
S[0] = me;
S[1] = 0;
return HashCode( atoi(S) , Upper ) ;
}
// ------------------------------------------------------------------
// ShallowDump : Writes a character
// ------------------------------------------------------------------
Standard_EXPORT void ShallowDump (const Standard_Character Value, Standard_OStream& s)
{
s << Value << " Standard_Character" << endl;
}

View File

@@ -29,30 +29,6 @@
#include <string.h>
#include <cctype>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_Character_Type_();
//class Standard_OStream;
//void ShallowDump (const Standard_Character, Standard_OStream& );
// =====================================
// Method implemented in Standard_Character.cxx
// =====================================
__Standard_API Standard_Integer HashCode(const Standard_Character, const Standard_Integer);
// ===============================================
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
// - IsSimilar
// - Shallowcopy
// - ShallowDump
// ===============================================
// ===============
// inline methods
// ===============
// ------------------------------------------------------------------
// IsEqual : Returns Standard_True if two characters have the same value
// ------------------------------------------------------------------
@@ -162,10 +138,4 @@ inline Standard_Character LowerCase(const Standard_Character me)
inline Standard_Character UpperCase(const Standard_Character me)
{ return (Standard_Character)(unsigned char)std::toupper(me); }
// ------------------------------------------------------------------
// ShallowCopy : Make a copy of one Character
// ------------------------------------------------------------------
inline Standard_Character ShallowCopy (const Standard_Character me)
{ return me; }
#endif

View File

@@ -1,59 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//============================================================================
//==== Titre: Standard_ExtCharacter.cxx
//==== Role : the methodes which raise the exceptions are implemented in
//==== this file.
//============================================================================
#include <stdlib.h>
#include <Standard_ExtCharacter.hxx>
#include <Standard_Integer.hxx>
#include <Standard_RangeError.hxx>
#include <Standard_Type.hxx>
#include <Standard_Stream.hxx>
#include <Standard_OStream.hxx>
const Handle_Standard_Type& Standard_ExtCharacter_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_ExtCharacter",sizeof(Standard_ExtCharacter),
0,NULL);
return _aType;
}
// ------------------------------------------------------------------
// Hascode : Computes a hascoding value for a given ExtCharacter
// ------------------------------------------------------------------
Standard_Integer HashCode(const Standard_ExtCharacter me,
const Standard_Integer Upper)
{
if (Upper < 1){
Standard_RangeError::
Raise("Try to apply HashCode method with negative or null argument.");
}
Standard_Integer aCode = me;
return ( aCode % Upper) + 1;
}
// ------------------------------------------------------------------
// ShallowDump : Writes a character
// ------------------------------------------------------------------
Standard_EXPORT void ShallowDump (const Standard_ExtCharacter Value
,Standard_OStream& s)
{
s << hex << Value << " Standard_ExtCharacter" << endl;
}

View File

@@ -29,25 +29,6 @@
#include <string.h>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_ExtCharacter_Type_();
//class Standard_OStream;
//void ShallowDump (const Standard_ExtCharacter, Standard_OStream& );
// =====================================
// Method implemented in Standard_ExtCharacter.cxx
// =====================================
__Standard_API Standard_Integer HashCode(const Standard_ExtCharacter, const Standard_Integer);
// ===============================================
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
// - IsSimilar
// - Shallowcopy
// - ShallowDump
// ===============================================
// ===============
// inline methods
// ===============
@@ -92,25 +73,4 @@ inline Standard_Boolean IsSimilar(const Standard_ExtCharacter One,
const Standard_ExtCharacter Two)
{ return One == Two; }
// ------------------------------------------------------------------
// ShallowCopy : Make a copy of one Character
// ------------------------------------------------------------------
inline Standard_ExtCharacter ShallowCopy (const Standard_ExtCharacter me)
{ return me; }
#endif

View File

@@ -18,25 +18,7 @@
#include <Standard_ExtString.hxx>
#include <Standard_Type.hxx>
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
//============================================================================
//==== ShallowDump : Writes a ExtString value.
//============================================================================
Standard_EXPORT void ShallowDump (const Standard_ExtString Value, Standard_OStream& s)
{
s << hex << Value << " Standard_ExtString " << endl;
}
const Handle_Standard_Type& Standard_ExtString_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_ExtString",sizeof(Standard_ExtString),0,NULL);
return _aType;
}
Standard_Integer HashCode (const Standard_ExtString Value,
const Standard_Integer Upper)

View File

@@ -24,19 +24,6 @@
#include <Standard_TypeDef.hxx>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_ExtString_Type_();
//class Standard_OStream;
//void ShallowDump (const Standard_ExtString, Standard_OStream& );
//============================================================================
//==== ShallowCopy: Returns a CString
//============================================================================
inline Standard_ExtString ShallowCopy (const Standard_ExtString Value)
{
return Value;
}
//============================================================================
//==== HashCode : Returns a HashCode ExtString
//============================================================================

View File

@@ -85,7 +85,7 @@ is
Assign(me : out; uid : UUID from Standard);
---C++: alias operator =
ShallowDump(me; aStream : in out OStream from Standard) is redefined;
ShallowDump(me; aStream : in out OStream from Standard);
---Purpose: Display the GUID with the following format:
--
-- "00000000-0000-0000-0000-000000000000"

View File

@@ -1,25 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_IStream.hxx>
#include <Standard_Type.hxx>
const Handle_Standard_Type& Standard_IStream_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_IStream", sizeof(Standard_IStream));
return _aType;
}

View File

@@ -18,10 +18,6 @@
#include <Standard_Macro.hxx>
#include <Standard_Stream.hxx>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_IStream_Type_();
#define Standard_IStream istream
typedef std::istream Standard_IStream;
#endif

View File

@@ -1,227 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdlib.h>
#include <Standard_Integer.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_RangeError.hxx>
#include <Standard_Stream.hxx>
#include <Standard_OStream.hxx>
// ------------------------------------------------------------------
// CharToInt : Converts a character in an integer value
// ------------------------------------------------------------------
const Handle_Standard_Type& Standard_Integer_Type_()
{
static Handle_Standard_Type _aType = new
Standard_Type("Standard_Integer",sizeof(Standard_Integer),0,NULL);
return _aType;
}
Standard_Integer CharToInt(const Standard_Character me)
{
if (!IsDigit(me)) {
Standard_ConstructionError::Raise();
}
Standard_Character S[2];
S[0] = me;
S[1] = 0;
return atoi(S);
}
// ------------------------------------------------------------------
// CharToInt : Converts a string in an integer value
// ------------------------------------------------------------------
Standard_Integer CharToInt(const Standard_CString me)
{
const Standard_Size Len = strlen(me);
for (Standard_Size I = 0; I < Len; I++)
if (!IsDigit(me[I])) {
Standard_ConstructionError::Raise();
}
return atoi(me);
}
// ------------------------------------------------------------------
// ShallowCopy : Copy of an integer
// ------------------------------------------------------------------
Standard_Integer ShallowCopy (const Standard_Integer me)
{ return me; }
// ------------------------------------------------------------------
// ShallowDump : Writes an integer value
// ------------------------------------------------------------------
Standard_EXPORT void ShallowDump (const Standard_Integer Value, Standard_OStream& s)
{ s << Value << " Standard_Integer" << "\n"; }
// ------------------------------------------------------------------
// NextPrime : Compute the first prime number greater or equal than an integer
// ------------------------------------------------------------------
#define VALUESNBR 4
long NextPrime (const long me )
{
struct svalue {int signiaib ;
int nbr ;} ;
struct svalue values[VALUESNBR] ;
long ia ;
long maxia ;
long ib[4] ;
int n[4] ;
// int signiaib[4] = { -1 , +1 , +1 , -1 } ;
int signiaib[4];
signiaib[0] = -1;
signiaib[1] = 1;
signiaib[2] = 1;
signiaib[3] = -1;
long remain ;
int nbvalues ;
int loop ;
int nindd ;
long minn ;
long maxvn ;
long premret = 0 ;
if (me < 0 || me >
#if defined (__alpha) || defined(DECOSF1)
127149130704178201
#else
2147483647
#endif
){
Standard_RangeError::
Raise("Try to apply NextPrime method with negative, null or too large value.");
}
if ( me <= 7 ) {
if ( me <= 1 )
return 1 ;
else if ( me <= 2 )
return 2 ;
else if ( me <= 3 )
return 3 ;
else if ( me <= 5 )
return 5 ;
else if ( me <= 7 )
return 7 ;
}
minn = ( me - 1 ) / 6 ; // n minimum
while ( 6*minn+1 < me ) {
minn += 1 ;
}
maxia = long( sqrt((double ) me ) / 6 + 1 ) ;
maxvn = minn + VALUESNBR ;
nbvalues = 0 ;
for ( nindd = 0 ; nindd < VALUESNBR ; nindd++ ) {
if ( 6*(nindd+minn)-1 < me ) {
values[nindd].nbr = 1 ;
values[nindd].signiaib = -1 ;
nbvalues += 1 ;
}
else {
values[nindd].nbr = 0 ;
values[nindd].signiaib = 0 ;
}
}
for ( ia = 1 ; ia <= maxia ; ia++ ) {
if ( nbvalues == VALUESNBR*2 ) {
break ;
}
remain = -VALUESNBR ;
ib[0] = ( minn + ia - remain ) / (6*ia - 1) ;
n[0] = int ( 6*ia*ib[0] - ia - ib[0] - minn ) ;
ib[1] = ( minn - ia - remain ) / (6*ia - 1) ;
n[1] = int ( 6*ia*ib[1] + ia - ib[1] - minn ) ;
ib[2] = ( minn + ia - remain ) / (6*ia + 1) ;
n[2] = int ( 6*ia*ib[2] - ia + ib[2] - minn ) ;
ib[3] = ( minn - ia - remain ) / (6*ia + 1) ;
n[3] = int ( 6*ia*ib[3] + ia + ib[3] - minn ) ;
for ( loop = 0 ; loop < 4 ; loop++ ) {
if ( n[loop] >= 0 && n[loop] < VALUESNBR ) {
if ( ( values[n[loop]].nbr == 0 ) ||
( values[n[loop]].signiaib == signiaib[loop] ) ) {
values[n[loop]].signiaib = -signiaib[loop] ;
values[n[loop]].nbr += 1 ;
if ( values[n[loop]].nbr <= 2 )
nbvalues += 1 ;
}
}
}
}
for ( nindd = 0 ; nindd < VALUESNBR ; nindd++ ) {
if ( values[nindd].nbr == 0 ) {
if ( me <= 6*(nindd+minn)-1 ) {
premret = 6*(nindd+minn)-1 ;
break ;
}
else if ( me <= 6*(nindd+minn)+1 ) {
premret = 6*(nindd+minn)+1 ;
break ;
}
}
else if ( values[nindd].nbr == 1 ) {
if ( values[nindd].signiaib > 0 ) {
if ( me <= 6*(nindd+minn)-1 ) {
premret = 6*(nindd+minn)-1 ;
break ;
}
}
else {
if ( me <= 6*(nindd+minn)+1 ) {
premret = 6*(nindd+minn)+1 ;
break ;
}
}
}
}
if ( premret != 0 ) {
return premret ;
}
return NextPrime ( 6*(maxvn-1)+2) ;
}
static const Standard_Integer Primes[] = {
101, 1009, 2003, 3001, 4001, 5003, 6007, 7001, 8009, 9001,
10007, 12007, 14009, 16007, 18013,
20011, 23003, 26003, 29009,
33013, 37003,
41011, 46021,
51001, 57037,
65003,
100019}; // catch the biggest
const Standard_Integer NbPrimes = 26; // does not include the biggest
Standard_Integer NextPrimeForMap(const Standard_Integer N)
{
Standard_Integer i;
for (i = 0; i < NbPrimes; i++)
if (Primes[i] > N) break;
return Primes[i];
}

View File

@@ -16,28 +16,7 @@
#define _Standard_Integer_HeaderFile
#include <Standard_TypeDef.hxx>
# include <Standard_values.h>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_Integer_Type_();
// ===============================================
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
// - IsSimilar
// - Shallowcopy
// - ShallowDump
// ===============================================
// ==================================
// Methods implemeted in Standard_Integer.cxx
// ==================================
__Standard_API Standard_Integer NextPrimeForMap(const Standard_Integer anInt ) ;
__Standard_API long NextPrime (const long me);
__Standard_API Standard_Integer CharToInt (const Standard_Character me);
__Standard_API Standard_Integer CharToInt (const Standard_CString me);
__Standard_API Standard_Integer ShallowCopy (const Standard_Integer me);
#include <Standard_values.h>
// ===============
// Inline methods

View File

@@ -1,31 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Standard_OId_HeaderFile
#define _Standard_OId_HeaderFile
#include <Standard_Integer.hxx>
#include <Standard_OStream.hxx>
class Standard_Persistent;
typedef Standard_Persistent* Standard_OId;
extern Standard_OId ShallowCopy (const Standard_OId me) ;
extern Standard_Integer HashCode(const Standard_OId me,
const Standard_Integer Upper);
//extern void ShallowDump (const Standard_OId Value, Standard_OStream& s);
const Handle_Standard_Type& Standard_OId_Type_();
#endif

View File

@@ -1,26 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_OStream.hxx>
#include <Standard_Type.hxx>
const Handle_Standard_Type& Standard_OStream_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_OStream", sizeof(Standard_OStream));
return _aType;
}

View File

@@ -18,24 +18,7 @@
#include <Standard_TypeDef.hxx>
#include <Standard_Stream.hxx>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_OStream_Type_();
typedef ostream Standard_OStream;
__Standard_API void ShallowDump(const Standard_Boolean, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_CString, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_Character, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_ExtCharacter, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_ExtString, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_Integer, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_Real, Standard_OStream& );
__Standard_API void ShallowDump(const Standard_ShortReal, Standard_OStream& );
class Handle(Standard_Transient);
__Standard_API void ShallowDump(const Handle(Standard_Transient)&, Standard_OStream& );
class Handle(Standard_Persistent);
__Standard_API void ShallowDump(const Handle(Standard_Persistent)&, Standard_OStream& );
typedef std::ostream Standard_OStream;
#endif

View File

@@ -59,13 +59,6 @@ uses
is
ShallowCopy (me) returns mutable like me is deferred;
---Purpose: Returns a copy at the first level of <me>.
-- The objects referenced are not copied.
-- Entities copied by ShallowCopy are equal.
---C++: function call
---Level: Advanced
Delete (me: mutable) is redefined;
---Purpose: Deletes this object.

View File

@@ -49,33 +49,12 @@ Handle_Standard_Persistent Standard_Persistent::This() const
return aHand;
}
// The Method ShallowCopy
//
Handle_Standard_Persistent Standard_Persistent::ShallowCopy() const
{
//the method must be redefined in the every subclass that is expected to use it
Standard_NotImplemented::Raise ("The ShallowCopy() method must be redefined in the subclass");
return This(); // for compilation only
}
// Empty Constructor
//
// Standard_Persistent::Standard_Persistent()
// {
// }
// Empty Destructor
//
Standard_Persistent::~Standard_Persistent()
{
}
// Constructor from a Standard_Persistent
//
// Standard_Persistent::Standard_Persistent(const Standard_Persistent& )
// {
// }
// Operator= with a Standard_Persistent
//
Standard_Persistent& Standard_Persistent::operator=(const Standard_Persistent& )
@@ -106,13 +85,6 @@ Standard_Boolean Standard_Persistent::IsKind (const Handle(Standard_Type)& aType
// return (aType == STANDARD_TYPE(Standard_Persistent));
}
void Standard_Persistent::ShallowDump(Standard_OStream& AStream) const
{
Handle(Standard_Persistent) me = this;
::ShallowDump(me, AStream);
}
void Standard_Persistent::Delete() const
{
delete((Standard_Persistent *)this);

View File

@@ -21,6 +21,7 @@
class Standard_Type;
class Handle_Standard_Type;
class Handle_Standard_Persistent;
class Standard_Type;
class Storage_stCONSTclCOM;
@@ -40,7 +41,6 @@ public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT virtual Handle_Standard_Persistent This() const;
Standard_EXPORT virtual Handle_Standard_Persistent ShallowCopy () const;
Standard_EXPORT virtual void Delete() const;
Standard_EXPORT virtual ~Standard_Persistent();
@@ -52,7 +52,6 @@ public:
Standard_EXPORT virtual const Handle_Standard_Type& DynamicType() const;
Standard_EXPORT Standard_Boolean IsKind(const Handle_Standard_Type&)const;
Standard_EXPORT Standard_Boolean IsInstance(const Handle_Standard_Type&)const;
Standard_EXPORT virtual void ShallowDump(Standard_OStream& ) const;
};
#include <Handle_Standard_Persistent.hxx>

View File

@@ -36,9 +36,6 @@ class Standard_Transient;
#include <Standard_Address.hxx>
#include <Standard_Storable.hxx>
__Standard_API Standard_Address ShallowCopy(const Standard_Address,
const Handle_Standard_Type& );
__Standard_API Standard_Integer HashCode(const Standard_Address,
const Standard_Integer,
const Handle_Standard_Type&);

View File

@@ -20,14 +20,6 @@
#include <Standard_Stream.hxx>
#include <Standard_OStream.hxx>
const Handle_Standard_Type& Standard_Real_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_Real",sizeof(Standard_Real),0,NULL);
return _aType;
}
// ------------------------------------------------------------------
// Hascode : Computes a hascoding value for a given real
// ------------------------------------------------------------------
@@ -47,14 +39,6 @@ Standard_Integer HashCode(const Standard_Real me, const Standard_Integer Upper)
return HashCode( ( U.I[0] ^ U.I[1] ) , Upper ) ;
}
// ------------------------------------------------------------------
// ShallowCopy : Makes a copy of a real value
// ------------------------------------------------------------------
Standard_Real ShallowCopy (const Standard_Real me)
{
return me;
}
//-------------------------------------------------------------------
// ACos : Returns the value of the arc cosine of a real
//-------------------------------------------------------------------
@@ -245,14 +229,6 @@ double NextAfter(const double x, const double y)
return res.real;
}
// ------------------------------------------------------------------
// ShallowDump : Writes a real value
// ------------------------------------------------------------------
Standard_EXPORT void ShallowDump(const Standard_Real Value,
Standard_OStream& s)
{ s << Value << " Standard_Real" << "\n"; }
//-------------------------------------------------------------------
// ATanh : Returns the value of the hyperbolic arc tangent of a real
//-------------------------------------------------------------------

View File

@@ -21,17 +21,11 @@
#include <Standard_math.hxx>
#include <Standard_TypeDef.hxx>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_Real_Type_();
// ===============================================
// Methods from Standard_Entity class which are redefined:
// - Hascode
// - IsEqual
// - IsSimilar
// - Shallowcopy
// - ShallowDump
// ===============================================
// ==================================
@@ -39,7 +33,6 @@ __Standard_API const Handle_Standard_Type& Standard_Real_Type_();
// ==================================
//.... Herited from Standard_Storable
__Standard_API Standard_Integer HashCode (const Standard_Real, const Standard_Integer);
__Standard_API Standard_Real ShallowCopy (const Standard_Real );
__Standard_API Standard_Real ACos (const Standard_Real );
__Standard_API Standard_Real ACosApprox (const Standard_Real );
@@ -52,9 +45,6 @@ __Standard_API Standard_Real ACosh (const Standard_Real );
__Standard_API Standard_Real Log (const Standard_Real );
__Standard_API Standard_Real Sqrt (const Standard_Real );
//class Standard_OStream;
//void ShallowDump(const Standard_Real, Standard_OStream& );
//-------------------------------------------------------------------
// RealSmall : Returns the smallest positive real
//-------------------------------------------------------------------

View File

@@ -1,40 +0,0 @@
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
#include <Standard_TypeMismatch.hxx>
#include <Standard_Persistent.hxx>
// now with these two proto, we don't need the include of Standard_Persistent
class Handle(Standard_Persistent);
const Handle_Standard_Type &Standard_Persistent_Type_();
//============================================================================
void ShallowDump(const Handle(Standard_Persistent)& me, Standard_OStream &aOut)
{
Handle(Standard_Type) aType = me->DynamicType();
aOut << "class " << aType->Name() << endl;
}
//============================================================================
void ShallowDump(const Handle(Standard_Transient)& me, Standard_OStream &aOut)
{
Handle(Standard_Type) aType = me->DynamicType();
aOut << "class " << aType->Name() << endl;
}

View File

@@ -18,15 +18,6 @@
#include <Standard_Stream.hxx>
#include <Standard_OStream.hxx>
const Handle_Standard_Type& Standard_ShortReal_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type("Standard_ShortReal",sizeof(Standard_ShortReal),0,NULL);
return _aType;
}
// ------------------------------------------------------------------
// Hascode : Computes a hascoding value for a given ShortReal
// ------------------------------------------------------------------
@@ -43,20 +34,4 @@ Standard_Integer HashCode(const Standard_ShortReal me, const Standard_Integer Up
} U;
U.R = me;
return HashCode( U.I , Upper) ;
}
// ------------------------------------------------------------------
// ShallowCopy : Makes a copy of a ShortReal value
// ------------------------------------------------------------------
Standard_ShortReal ShallowCopy (const Standard_ShortReal me)
{
return me;
}
// ------------------------------------------------------------------
// ShallowDump : Writes a ShortReal value
// ------------------------------------------------------------------
Standard_EXPORT void ShallowDump(const Standard_ShortReal Value,
Standard_OStream& s)
{ s << Value << " Standard_ShortReal" << "\n"; }

View File

@@ -23,10 +23,6 @@
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_ShortReal_Type_();
//class Standard_OStream;
//void ShallowDump (const Standard_ShortReal, Standard_OStream& );
// *********************************** //
// Class methods //
// //
@@ -140,8 +136,6 @@ inline Standard_ShortReal Min (const Standard_ShortReal Val1,
// - Hascode
// - IsEqual
// - IsSimilar
// - Shallowcopy
// - ShallowDump
// ===============================================
// ==================================
@@ -149,7 +143,6 @@ inline Standard_ShortReal Min (const Standard_ShortReal Val1,
// ==================================
//.... Herited from Standard_Storable
__Standard_API Standard_Integer HashCode (const Standard_ShortReal, const Standard_Integer);
__Standard_API Standard_ShortReal ShallowCopy (const Standard_ShortReal );
//-------------------------------------------------------------------
// IsEqual : Returns Standard_True if two ShortReals are equal

View File

@@ -49,13 +49,5 @@ is
---C++: function call
---Level: Public
ShallowDump (me; S: in out OStream) is virtual;
---Purpose: Prints the contents at the first level of <me> on
-- the stream <s>. The Root version of ShallowDump prints
-- the name of the class <me> is instance of, followed by
-- its memory address.
---C++: function call
---Level: Public
end Storable;

View File

@@ -34,10 +34,3 @@ Standard_Boolean Standard_Storable::IsSimilar(const Standard_Storable& ) const
{
return Standard_True;
}
//========================================================================
void Standard_Storable::ShallowDump(Standard_OStream& ) const
{
// ::ShallowDump((Standard_Address) this, STANDARD_TYPE(Standard_Storable), S);
}

View File

@@ -1,23 +0,0 @@
// Copyright (c) 2013-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Time.hxx>
#include <Standard_ConstructionError.hxx>
const Handle_Standard_Type& Standard_Time_Type_()
{
static Handle_Standard_Type _aType =
new Standard_Type ("Standard_Time", sizeof(Standard_Time), 0, NULL);
return _aType;
}

View File

@@ -16,10 +16,6 @@
#include <Standard_TypeDef.hxx>
class Handle_Standard_Type;
__Standard_API const Handle_Standard_Type& Standard_Time_Type_();
// ===============================================
// Methods from Standard_Entity class which are redefined:
// - IsEqual

View File

@@ -67,12 +67,6 @@ Standard_Boolean Standard_Transient::IsKind (const Standard_CString theTypeName)
return DynamicType()->SubType ( theTypeName );
}
void Standard_Transient::ShallowDump(Standard_OStream& theStream) const
{
theStream << "class " << DynamicType()->Name() << " at " << this << endl;
}
void Standard_Transient::Delete() const
{
delete((Standard_Transient *)this);

View File

@@ -50,8 +50,6 @@ class Standard_Transient
//! Memory deallocator for transient classes
Standard_EXPORT virtual void Delete() const;
Standard_EXPORT virtual void ShallowDump(Standard_OStream& ) const;
//! Returns a type information object about this object.
Standard_EXPORT virtual const Handle_Standard_Type& DynamicType() const;

View File

@@ -165,18 +165,6 @@ is
-- AncestorIterator.
---Level: Advanced
ShallowDump (me);
---Purpose:
-- Prints the Information about type.
---C++: function call
---Level: Advanced
ShallowDump (me; S: in out OStream);
---Purpose:
-- Prints the Information about type.
---C++: function call
---Level: Advanced
Print (me; s: in out OStream);
---Purpose:
-- Prints on the stream <s> the name of Type.

View File

@@ -188,73 +188,6 @@ Standard_Boolean Standard_Type::SubType(const Standard_CString theName)const
return Standard_False;
}
//============================================================================
void Standard_Type::ShallowDump() const
{
ShallowDump(cout) ;
}
//============================================================================
void Standard_Type::ShallowDump(Standard_OStream& AStream) const
{
Standard_Integer i;
Handle(Standard_Type) aType;
Handle(Standard_Type) *allAncestors;
// AStream << "Standard_Type " << hex << (Standard_Address )this << dec << " " ;
allAncestors = (Handle(Standard_Type) *)myAncestors;
if(myKind == Standard_IsEnumeration) {
AStream << "enumeration " << myName << endl;
}
if(myKind == Standard_IsPrimitive) {
AStream << "primitive " << myName << endl;
}
if(myKind == Standard_IsImported) {
AStream << "imported " << myName << endl;
}
if(myKind == Standard_IsClass) {
AStream << "class " << myName << endl;
if(SubType(STANDARD_TYPE(Standard_Transient))) {
AStream << " -- manipulated by 'Handle'" << endl;
}
else if(SubType(STANDARD_TYPE(Standard_Persistent))) {
AStream << " -- manipulated by 'Handle' and is 'persistent'"<< endl;
}
}
if(myNumberOfParent > 0) {
AStream << " inherits ";
for(i=0; i<myNumberOfParent; i++){
aType = allAncestors[i];
if (i>1) AStream <<", ";
if ( !aType.IsNull() )
AStream << aType->Name();
else
AStream << " ??? (TypeIsNull)" ;
}
AStream << endl;
}
if(myNumberOfAncestor > myNumberOfParent) {
AStream << " -- Ancestors: ";
for(i=myNumberOfParent; i<myNumberOfAncestor; i++){
aType = allAncestors[i];
if (i>1) AStream <<", ";
if ( !aType.IsNull() )
AStream << aType->Name();
else
AStream << " ??? (TypeIsNull)" ;
}
AStream << endl;
}
}
// ------------------------------------------------------------------
// Print (me; s: in out OStream) returns OStream;
// ------------------------------------------------------------------

View File

@@ -15,12 +15,6 @@
#include <Standard_GUID.hxx>
#include <Standard_UUID.hxx>
const Handle(Standard_Type) & TYPE(Standard_UUID)
{ static Handle(Standard_Type) _aType=
new Standard_Type("Standard_UUID", sizeof(Standard_UUID));
return _aType;
}
//void Standard_GUID::Assign(const Standard_UUID& uid)
void Standard_GUID::Assign(const Standard_UUID& )
{

View File

@@ -30,9 +30,6 @@ typedef struct {
typedef GUID Standard_UUID ;
class Handle_Standard_Type;
const Handle(Standard_Type) & TYPE(Standard_UUID);
#endif