home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / Vcl / contnrs.hpp < prev    next >
C/C++ Source or Header  |  2000-02-01  |  7KB  |  225 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'Contnrs.pas' rev: 5.00
  6.  
  7. #ifndef ContnrsHPP
  8. #define ContnrsHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #pragma option push -Vx
  13. #include <Classes.hpp>    // Pascal unit
  14. #include <SysUtils.hpp>    // Pascal unit
  15. #include <SysInit.hpp>    // Pascal unit
  16. #include <System.hpp>    // Pascal unit
  17.  
  18. //-- user supplied -----------------------------------------------------------
  19.  
  20. namespace Contnrs
  21. {
  22. //-- type declarations -------------------------------------------------------
  23. class DELPHICLASS TObjectList;
  24. class PASCALIMPLEMENTATION TObjectList : public Classes::TList 
  25. {
  26.     typedef Classes::TList inherited;
  27.     
  28. private:
  29.     bool FOwnsObjects;
  30.     
  31. protected:
  32.     virtual void __fastcall Notify(void * Ptr, Classes::TListNotification Action);
  33.     System::TObject* __fastcall GetItem(int Index);
  34.     void __fastcall SetItem(int Index, System::TObject* AObject);
  35.     
  36. public:
  37.     __fastcall TObjectList(void)/* overload */;
  38.     __fastcall TObjectList(bool AOwnsObjects)/* overload */;
  39.     HIDESBASE int __fastcall Add(System::TObject* AObject);
  40.     HIDESBASE int __fastcall Remove(System::TObject* AObject);
  41.     HIDESBASE int __fastcall IndexOf(System::TObject* AObject);
  42.     int __fastcall FindInstanceOf(TMetaClass* AClass, bool AExact, int AStartAt);
  43.     HIDESBASE void __fastcall Insert(int Index, System::TObject* AObject);
  44.     __property bool OwnsObjects = {read=FOwnsObjects, write=FOwnsObjects, nodefault};
  45.     __property System::TObject* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
  46. public:
  47.     #pragma option push -w-inl
  48.     /* TList.Destroy */ inline __fastcall virtual ~TObjectList(void) { }
  49.     #pragma option pop
  50.     
  51. };
  52.  
  53.  
  54. class DELPHICLASS TComponentList;
  55. class PASCALIMPLEMENTATION TComponentList : public TObjectList 
  56. {
  57.     typedef TObjectList inherited;
  58.     
  59. private:
  60.     Classes::TComponent* FNexus;
  61.     
  62. protected:
  63.     virtual void __fastcall Notify(void * Ptr, Classes::TListNotification Action);
  64.     Classes::TComponent* __fastcall GetItems(int Index);
  65.     void __fastcall SetItems(int Index, Classes::TComponent* AComponent);
  66.     void __fastcall HandleFreeNotify(System::TObject* Sender, Classes::TComponent* AComponent);
  67.     
  68. public:
  69.     __fastcall virtual ~TComponentList(void);
  70.     HIDESBASE int __fastcall Add(Classes::TComponent* AComponent);
  71.     HIDESBASE int __fastcall Remove(Classes::TComponent* AComponent);
  72.     HIDESBASE int __fastcall IndexOf(Classes::TComponent* AComponent);
  73.     HIDESBASE void __fastcall Insert(int Index, Classes::TComponent* AComponent);
  74.     __property Classes::TComponent* Items[int Index] = {read=GetItems, write=SetItems/*, default*/};
  75. public:
  76.         
  77.     #pragma option push -w-inl
  78.     /* TObjectList.Create */ inline __fastcall TComponentList(void)/* overload */ : TObjectList() { }
  79.     #pragma option pop
  80.     
  81. };
  82.  
  83.  
  84. class DELPHICLASS TClassList;
  85. class PASCALIMPLEMENTATION TClassList : public Classes::TList 
  86. {
  87.     typedef Classes::TList inherited;
  88.     
  89. protected:
  90.     TMetaClass* __fastcall GetItems(int Index);
  91.     void __fastcall SetItems(int Index, TMetaClass* AClass);
  92.     
  93. public:
  94.     HIDESBASE int __fastcall Add(TMetaClass* aClass);
  95.     HIDESBASE int __fastcall Remove(TMetaClass* aClass);
  96.     HIDESBASE int __fastcall IndexOf(TMetaClass* aClass);
  97.     HIDESBASE void __fastcall Insert(int Index, TMetaClass* aClass);
  98.     __property TMetaClass* Items[int Index] = {read=GetItems, write=SetItems/*, default*/};
  99. public:
  100.     #pragma option push -w-inl
  101.     /* TList.Destroy */ inline __fastcall virtual ~TClassList(void) { }
  102.     #pragma option pop
  103.     
  104. public:
  105.     #pragma option push -w-inl
  106.     /* TObject.Create */ inline __fastcall TClassList(void) : Classes::TList() { }
  107.     #pragma option pop
  108.     
  109. };
  110.  
  111.  
  112. class DELPHICLASS TOrderedList;
  113. class PASCALIMPLEMENTATION TOrderedList : public System::TObject 
  114. {
  115.     typedef System::TObject inherited;
  116.     
  117. private:
  118.     Classes::TList* FList;
  119.     
  120. protected:
  121.     virtual void __fastcall PushItem(void * AItem) = 0 ;
  122.     virtual void * __fastcall PopItem(void);
  123.     virtual void * __fastcall PeekItem(void);
  124.     __property Classes::TList* List = {read=FList};
  125.     
  126. public:
  127.     __fastcall TOrderedList(void);
  128.     __fastcall virtual ~TOrderedList(void);
  129.     int __fastcall Count(void);
  130.     bool __fastcall AtLeast(int ACount);
  131.     void __fastcall Push(void * AItem);
  132.     void * __fastcall Pop(void);
  133.     void * __fastcall Peek(void);
  134. };
  135.  
  136.  
  137. class DELPHICLASS TStack;
  138. class PASCALIMPLEMENTATION TStack : public TOrderedList 
  139. {
  140.     typedef TOrderedList inherited;
  141.     
  142. protected:
  143.     virtual void __fastcall PushItem(void * AItem);
  144. public:
  145.     #pragma option push -w-inl
  146.     /* TOrderedList.Create */ inline __fastcall TStack(void) : TOrderedList() { }
  147.     #pragma option pop
  148.     #pragma option push -w-inl
  149.     /* TOrderedList.Destroy */ inline __fastcall virtual ~TStack(void) { }
  150.     #pragma option pop
  151.     
  152. };
  153.  
  154.  
  155. class DELPHICLASS TObjectStack;
  156. class PASCALIMPLEMENTATION TObjectStack : public TStack 
  157. {
  158.     typedef TStack inherited;
  159.     
  160. public:
  161.     HIDESBASE void __fastcall Push(System::TObject* AObject);
  162.     HIDESBASE System::TObject* __fastcall Pop(void);
  163.     HIDESBASE System::TObject* __fastcall Peek(void);
  164. public:
  165.     #pragma option push -w-inl
  166.     /* TOrderedList.Create */ inline __fastcall TObjectStack(void) : TStack() { }
  167.     #pragma option pop
  168.     #pragma option push -w-inl
  169.     /* TOrderedList.Destroy */ inline __fastcall virtual ~TObjectStack(void) { }
  170.     #pragma option pop
  171.     
  172. };
  173.  
  174.  
  175. class DELPHICLASS TQueue;
  176. class PASCALIMPLEMENTATION TQueue : public TOrderedList 
  177. {
  178.     typedef TOrderedList inherited;
  179.     
  180. protected:
  181.     virtual void __fastcall PushItem(void * AItem);
  182. public:
  183.     #pragma option push -w-inl
  184.     /* TOrderedList.Create */ inline __fastcall TQueue(void) : TOrderedList() { }
  185.     #pragma option pop
  186.     #pragma option push -w-inl
  187.     /* TOrderedList.Destroy */ inline __fastcall virtual ~TQueue(void) { }
  188.     #pragma option pop
  189.     
  190. };
  191.  
  192.  
  193. class DELPHICLASS TObjectQueue;
  194. class PASCALIMPLEMENTATION TObjectQueue : public TQueue 
  195. {
  196.     typedef TQueue inherited;
  197.     
  198. public:
  199.     HIDESBASE void __fastcall Push(System::TObject* AObject);
  200.     HIDESBASE System::TObject* __fastcall Pop(void);
  201.     HIDESBASE System::TObject* __fastcall Peek(void);
  202. public:
  203.     #pragma option push -w-inl
  204.     /* TOrderedList.Create */ inline __fastcall TObjectQueue(void) : TQueue() { }
  205.     #pragma option pop
  206.     #pragma option push -w-inl
  207.     /* TOrderedList.Destroy */ inline __fastcall virtual ~TObjectQueue(void) { }
  208.     #pragma option pop
  209.     
  210. };
  211.  
  212.  
  213. //-- var, const, procedure ---------------------------------------------------
  214.  
  215. }    /* namespace Contnrs */
  216. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  217. using namespace Contnrs;
  218. #endif
  219. #pragma option pop    // -w-
  220. #pragma option pop    // -Vx
  221.  
  222. #pragma delphiheader end.
  223. //-- end unit ----------------------------------------------------------------
  224. #endif    // Contnrs
  225.