在c++ Builder 6中用哪个头文件?
各位老师,我们以前有一个在C++ Builder 4上编译的软件。现在想在C++ Builder 6上进行编译,编译出现“Unable to open include file ‘classlib/arrays.h’。C++ Builder 6没有该头文件。请问在C++ Builder 6 中用哪个头文件代替,然后进行相应的修改?arrays.h头文件内容如下:
//----------------------------------------------------------------------------
// Borland BIDS Container Library
// Copyright (c) 1991, 1998 by Borland International, All Rights Reserved
//
//$Revision: 1.4 $
//
//----------------------------------------------------------------------------
#if !defined( CLASSLIB_ARRAYS_H )
#include <classlib/pre.h> /* - pre-CLASSLIB - */
#define CLASSLIB_ARRAYS_H
//#define TEMPLATES
#if !defined( CLASSLIB_DEFS_H )
# include <classlib/defs.h>
#endif
#if !defined( CLASSLIB_SHDDEL_H )
# include <classlib/shddel.h>
#endif
#if !defined( CLASSLIB_ALLOCTR_H )
# include <classlib/alloctr.h>
#endif
#if !defined( CLASSLIB_VECTIMP_H )
# include <classlib/vectimp.h>
#endif
#pragma option -Vo-
#if defined( BI_CLASSLIB_NO_po )
# pragma option -po-
#endif
#if defined(BI_NAMESPACE)
namespace ClassLib {
#endif
/*------------------------------------------------------------------------*/
/* */
/* [INTERNAL USE ONLY] */
/* */
/* template <class Vect, class T> class TArrayAsVectorImp */
/* */
/* Implements the type-independent array operations, using a vector */
/* as the underlying implementation. The type Vect specifies the */
/* form of the vector, either a TCVectorImp<T0>, a TSVectorImp<T0>, a */
/* TICVectorImp<T0>, or a TISVectorImp<T0>. The type T specifies the */
/* type of the objects to be put in the array. When using */
/* TCVectorImp<T0> or a TSVectorImp<T0> T should be the same as T0. When */
/* using TICVectorImp<T0> or TISVectorImp<T0> T should be of type */
/* pointer to T0. See TArrayAsVector and */
/* TIArrayAsVector for examples. */
/* */
/*------------------------------------------------------------------------*/
template <class Vect, class T> class TArrayAsVectorImp
{
public:
TArrayAsVectorImp( int upper, int lower, int delta ) :
Data( upper-lower+1,delta ),
Lowerbound( lower )
{
}
int LowerBound() const
{
return Lowerbound;
}
int UpperBound() const
{
return BoundBase( Data.Limit() )-1;
}
unsigned ArraySize() const
{
return Data.Limit();
}
int IsFull() const
{
return Data.GetDelta() == 0 && Data.Count() >= Data.Limit();
}
int IsEmpty() const
{
return Data.Count() == 0;
}
unsigned GetItemsInContainer() const
{
return Data.Count();
}
#if defined( BI_OLDNAMES )
int lowerBound() const { return LowerBound(); }
int upperBound() const { return UpperBound(); }
unsigned arraySize() const { return ArraySize(); }
int isFull() const { return IsFull(); }
int isEmpty() const { return IsEmpty(); }
unsigned getItemsInContainer() const { return GetItemsInContainer(); }
#endif
void Reallocate( unsigned sz, unsigned offset = 0 )
{
Data.Resize( sz, offset );
}
void SetData( int loc, const T& t )
{
PRECONDITION( loc >= Lowerbound && loc <= UpperBound() );
Data[ ZeroBase(loc) ] = t;
}
void RemoveEntry( int loc )
{
SqueezeEntry( ZeroBase(loc) );
}
void SqueezeEntry( unsigned loc )
{
PRECONDITION( loc < Data.Count() );
Data.Detach( loc );
}
unsigned ZeroBase( int loc ) const
{
return loc - Lowerbound;
}
int BoundBase( unsigned loc ) const
{
return loc == UINT_MAX ? INT_MAX : loc + Lowerbound;
}
void Grow( int loc )
{
if( loc < LowerBound() )
Reallocate( ArraySize() + (loc - Lowerbound) );
else if( loc >= BoundBase( Data.Limit()) )
Reallocate( ZeroBase(loc) );
}
int Lowerbound;
Vect Data;
};
/*------------------------------------------------------------------------*/
/* */
/* [INTERNAL USE ONLY] */
/* */
/* template <class Vect, class T> class TDArrayAsVectorImp */
/* */
/* Implements the fundamental array operations for direct arrays, using */
/* a vector as the underlying implementation. */
/* */
/*------------------------------------------------------------------------*/
template <class Vect, class T> class TDArrayAsVectorImp :
public TArrayAsVectorImp<Vect,T>
{
public:
typedef void (*IterFunc)(T&, void *);
typedef int (*CondFunc)(const T&, void *);
TDArrayAsVectorImp( int upper, int lower, int delta ) :
TArrayAsVectorImp<Vect,T>( upper, lower, delta )
{
}
int Add( const T& t )
{
return Data.Add(t);
}
int Detach( const T& t )
{
return Data.Detach(t);
}
int Detach( int loc )
{
return Data.Detach( ZeroBase(loc) );
}
int Destroy( const T& t )
{
return Detach(t);
}
int Destroy( int loc )
{
return Detach(loc);
}
int HasMember( const T& t ) const
{
return Data.Find(t) != UINT_MAX;
}
int Find( const T& t ) const
{
return BoundBase( Data.Find( t ) );
}
T& operator []( int loc )
{
Grow( loc+1 );
return Data[ZeroBase(loc)];
}
T& operator []( int loc ) const
{
PRECONDITION( loc >= Lowerbound && ZeroBase(loc) < Data.Limit() );
return Data[ZeroBase(loc)];
}
void ForEach( IterFunc iter, void *args )
{
if( !IsEmpty() )
Data.ForEach( iter, args );
}
T *FirstThat( CondFunc cond, void *args ) const
{
if( IsEmpty() )
return 0;
return Data.FirstThat( cond, args );
}
T *LastThat( CondFunc cond, void *args ) const
{
if( IsEmpty() )
return 0;
return Data.LastThat( cond, args );
}
void Flush()
{
Data.Flush();
}
#if defined( BI_OLDNAMES )
int add( const T& t ) { return Add(t); }
int detach( const T& t,TShouldDelete::DeleteType=TShouldDelete::NoDelete)
{ return Detach(t); }
int detach( int loc,TShouldDelete::DeleteType=TShouldDelete::NoDelete)
{ return Detach(loc); }
int destroy( const T& t ) { return Destroy(t); }
int destroy( int loc,TShouldDelete::DeleteType ) { return Destroy(loc); }
int hasMember( const T& t ) const { return HasMember(t); }
void forEach( IterFunc iter, void *args )
{ ForEach( iter, args ); }
T *firstThat( CondFunc cond, void *args ) const
{ return FirstThat( cond, args ); }
T *lastThat( CondFunc cond, void *args ) const
{ return lastThat( cond, args ); }
void flush( TShouldDelete::DeleteType = TShouldDelete::DefDelete )
{ Flush(); }
#endif
protected:
const T& ItemAt( int i ) const
{
return Data[ ZeroBase(i) ];
}
};
/*------------------------------------------------------------------------*/
/* */
/* [INTERNAL USE ONLY] */
/* */
/* template <class Vect, class T> class TIArrayAsVectorImp */
/* */
/* Implements the fundamental array operations for indirect arrays, */
/* using a vector as the underlying implementation. */
/* */
/*------------------------------------------------------------------------*/
template <class Vect, class T> class TIArrayAsVectorImp :
public TArrayAsVectorImp<Vect,T *>, public TShouldDelete
{
public:
typedef void (*IterFunc)(T&, void *);
typedef int (*CondFunc)(const T&, void *);
TIArrayAsVectorImp( int upper, int lower, int delta ) :
TArrayAsVectorImp<Vect,T *>( upper, lower, delta )
{
}
~TIArrayAsVectorImp()
{
Flush();
}
int Add( T *t )
{
return Data.Add(t);
}
int Detach( T *t,
TShouldDelete::DeleteType dt = TShouldDelete::NoDelete )
{
return Data.Detach(t,DelObj(dt));
}
int Detach( int loc,
TShouldDelete::DeleteType dt = TShouldDelete::NoDelete )
{
return Data.Detach( ZeroBase(loc), DelObj(dt) );
}
int Destroy( T *t )
{
return Detach(t,TShouldDelete::Delete);
}
int Destroy( int loc )
{
return Detach(loc,TShouldDelete::Delete);
}
int HasMember( const T *t ) const
{
return Data.Find(t) != UINT_MAX;
}
int Find( const T *t ) const
{
return BoundBase( Data.Find( t ) );
}
T *& operator []( int loc )
{
Grow( loc+1 );
return Data[ZeroBase(loc)];
}
T *& o