Files
TeslaRel410/BORLAND/BC45/INCLUDE/CLASSLIB/SETS.H
T
CydandClaude Fable 5 63312e07f9 source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 07:33:26 -05:00

329 lines
9.3 KiB
C++

/*------------------------------------------------------------------------*/
/* */
/* SETS.H */
/* */
/* Copyright (c) 1991, 1994 Borland International */
/* All Rights Reserved */
/* */
/*------------------------------------------------------------------------*/
#if !defined( CLASSLIB_SETS_H )
#define CLASSLIB_SETS_H
#if !defined( __CHECKS_H )
#include <checks.h>
#endif
#if !defined( CLASSLIB_DEFS_H )
#include <classlib/defs.h>
#endif
#if !defined( CLASSLIB_BAGS_H )
#include <classlib/bags.h>
#endif
#pragma option -Vo-
#if defined( BI_CLASSLIB_NO_po )
#pragma option -po-
#endif
/*------------------------------------------------------------------------*/
/* */
/* template <class T,class Alloc> class TMSetAsVector */
/* template <class T,class Alloc> class TMSetAsVectorIterator */
/* */
/* Implements a managed set of objects of type T, using a vector as */
/* the underlying implementation. */
/* */
/*------------------------------------------------------------------------*/
template <class T, class Alloc> class TMSetAsVectorIterator;
template <class T,class Alloc> class TMSetAsVector :
private TMBagAsVector<T,Alloc>
{
typedef TMBagAsVector<T,Alloc> Parent;
public:
friend TMSetAsVectorIterator<T,Alloc>;
TMSetAsVector( unsigned sz = DEFAULT_SET_SIZE ) :
TMBagAsVector<T,Alloc>(sz)
{
}
int Add( const T& );
Parent::IterFunc;
Parent::CondFunc;
Parent::Detach;
Parent::HasMember;
Parent::Find;
Parent::IsEmpty;
Parent::IsFull;
Parent::GetItemsInContainer;
Parent::ForEach;
Parent::FirstThat;
Parent::LastThat;
Parent::Flush;
#if defined( BI_OLDNAMES )
void add( const T& t ) { Add(t); }
Parent::detach;
Parent::hasMember;
Parent::findMember;
Parent::isEmpty;
Parent::isFull;
Parent::getItemsInContainer;
Parent::forEach;
Parent::firstThat;
Parent::lastThat;
Parent::flush;
#endif // BI_OLDNAMES
};
template <class T,class Alloc> class TMSetAsVectorIterator :
public TMBagAsVectorIterator<T,Alloc>
{
public:
TMSetAsVectorIterator( const TMSetAsVector<T,Alloc>& s ) :
TMBagAsVectorIterator<T,Alloc>(s)
{
}
};
template <class T,class Alloc> int TMSetAsVector<T,Alloc>::Add( const T& t )
{
if( HasMember(t) )
return 0;
else
return TMBagAsVector<T,Alloc>::Add(t);
}
#if defined( BI_OLDNAMES )
#define BI_MSetAsVector TMSetAsVector
#define BI_MSetAsVectorIterator TMSetAsVectorIterator
#endif
/*------------------------------------------------------------------------*/
/* */
/* template <class T> class TSetAsVector */
/* template <class T> class TSetAsVectorIterator */
/* */
/* Implements a set of objects of type T, using a vector as */
/* the underlying implementation and TStandardAllocator as its */
/* memory manager. */
/* */
/*------------------------------------------------------------------------*/
template <class T> class TSetAsVector :
public TMSetAsVector<T,TStandardAllocator>
{
public:
TSetAsVector( unsigned sz = DEFAULT_SET_SIZE ) :
TMSetAsVector<T,TStandardAllocator>(sz)
{
}
};
template <class T> class TSetAsVectorIterator :
public TMSetAsVectorIterator<T,TStandardAllocator>
{
public:
TSetAsVectorIterator( const TSetAsVector<T>& s ) :
TMSetAsVectorIterator<T,TStandardAllocator>(s)
{
}
};
#if defined( BI_OLDNAMES )
#define BI_SetAsVector TSetAsVector
#define BI_SetAsVectorIterator TSetAsVectorIterator
#endif
/*------------------------------------------------------------------------*/
/* */
/* template <class T,class Alloc> class TMISetAsVector */
/* template <class T,class Alloc> class TMISetAsVectorIterator */
/* */
/* Implements a managed set of pointers to objects of type T, */
/* using a vector as the underlying implementation. */
/* */
/*------------------------------------------------------------------------*/
template <class T, class Alloc> class TMISetAsVectorIterator;
template <class T,class Alloc> class TMISetAsVector :
private TMIBagAsVector<T,Alloc>
{
typedef TMIBagAsVector<T,Alloc> Parent;
public:
friend TMISetAsVectorIterator<T,Alloc>;
TMISetAsVector( unsigned sz = DEFAULT_SET_SIZE ) :
TMIBagAsVector<T,Alloc>(sz)
{
}
int Add( T * );
Parent::IterFunc;
Parent::CondFunc;
Parent::Detach;
Parent::HasMember;
Parent::Find;
Parent::IsEmpty;
Parent::IsFull;
Parent::GetItemsInContainer;
Parent::ForEach;
Parent::FirstThat;
Parent::LastThat;
Parent::Flush;
Parent::OwnsElements;
#if defined( BI_OLDNAMES )
void add( T *t ) { Add(t); }
Parent::detach;
Parent::findMember;
Parent::isEmpty;
Parent::isFull;
Parent::getItemsInContainer;
Parent::forEach;
Parent::firstThat;
Parent::lastThat;
Parent::flush;
Parent::ownsElements;
#endif
};
#if defined( BI_OLDNAMES )
#define BI_MISetAsVector TMISetAsVector
#endif
template <class T,class Alloc>
int TMISetAsVector<T,Alloc>::Add( T *t )
{
if( HasMember(t) )
return 0;
else
return TMIBagAsVector<T,Alloc>::Add(t);
}
template <class T,class Alloc> class TMISetAsVectorIterator :
public TMIBagAsVectorIterator<T,Alloc>
{
public:
TMISetAsVectorIterator( const TMISetAsVector<T,Alloc>& s ) :
TMIBagAsVectorIterator<T,Alloc>(s) {}
};
#if defined( BI_OLDNAMES )
#define BI_MISetAsVectorIterator TMISetAsVectorIterator
#endif
/*------------------------------------------------------------------------*/
/* */
/* template <class T> class TISetAsVector */
/* template <class T> class TISetAsVectorIterator */
/* */
/* Implements a set of pointers to objects of type T, */
/* using a vector as the underlying implementation and */
/* TStandardAllocator as its memory manager. */
/* */
/*------------------------------------------------------------------------*/
template <class T> class TISetAsVector :
public TMISetAsVector<T,TStandardAllocator>
{
public:
TISetAsVector( unsigned sz = DEFAULT_SET_SIZE ) :
TMISetAsVector<T,TStandardAllocator>(sz)
{
}
};
template <class T> class TISetAsVectorIterator :
public TMISetAsVectorIterator<T,TStandardAllocator>
{
public:
TISetAsVectorIterator( const TISetAsVector<T>& s ) :
TMISetAsVectorIterator<T,TStandardAllocator>(s)
{
}
};
#if defined( BI_OLDNAMES )
#define BI_ISetAsVector TISetAsVector
#define BI_ISetAsVectorIterator TISetAsVectorIterator
#endif
/*------------------------------------------------------------------------*/
/* */
/* template <class T> class TSet */
/* template <class T> class TSetIterator */
/* */
/* Easy names for TSetAsVector and TSetAsVectorIterator. */
/* */
/*------------------------------------------------------------------------*/
template <class T> class TSet :
public TSetAsVector<T>
{
public:
TSet( unsigned sz = DEFAULT_SET_SIZE ) :
TSetAsVector<T>( sz )
{
}
};
template <class T> class TSetIterator :
public TSetAsVectorIterator<T>
{
public:
TSetIterator( const TSet<T>& a ) :
TSetAsVectorIterator<T>(a)
{
}
};
#if defined( BI_CLASSLIB_NO_po )
#pragma option -po.
#endif
#pragma option -Vo.
#endif // CLASSLIB_SETS_H