home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / DgItmIt.cpp < prev    next >
C/C++ Source or Header  |  1997-03-21  |  4KB  |  108 lines

  1. /* @(#)Z 1.4 com/src/storage/DgItmIt.cpp, oddataxfer, od96os2, odos29712d 97/03/21 17:18:33 (96/10/29 09:30:40) */
  2. //====START_GENERATED_PROLOG======================================
  3. //
  4. //
  5. //   COMPONENT_NAME: oddataxfer
  6. //
  7. //   CLASSES: none
  8. //
  9. //   ORIGINS: 82,27
  10. //
  11. //
  12. //   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //   All Rights Reserved
  14. //   Licensed Materials - Property of IBM
  15. //   US Government Users Restricted Rights - Use, duplication or
  16. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //       
  18. //   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //   OR PERFORMANCE OF THIS SOFTWARE.
  25. //
  26. //====END_GENERATED_PROLOG========================================
  27. //
  28.  
  29. /*
  30.     File:        DgItmIt.cpp
  31.  
  32.     Contains:    Implementation of ODDragItemIterator
  33.  
  34.     Owned by:    Vincent Lo
  35.  
  36.     Copyright:    ⌐ 1994 - 1995 by Apple Computer, Inc., all rights reserved.
  37.  
  38.     Change History (most recent first):
  39.  
  40.          <5>      8/3/95    RR        #1257260: Collapse B classes. Remove
  41.                                     somInit methods. Don't call IsInitialized
  42.                                     or SubclassResponsibility
  43.          <4>     5/26/95    VL        1251403: Multithreading naming support.
  44.          <3>     5/25/95    jpa        List.h --> LinkList.h [1253324]
  45.          <2>     7/21/94    VL        Added implementation.
  46.  
  47.     To Do:
  48. */
  49.  
  50. #define ODDragItemIterator_Class_Source
  51. #define VARIABLE_MACROS
  52. #include <DgItmIt.xih>
  53.  
  54. #ifndef _DRAGPRIV_
  55. #include <DragPriv.h>
  56. #endif
  57.  
  58. #ifndef _LINKLIST_
  59. #include <LinkList.h>
  60. #endif
  61.  
  62. #include "DgItmItB.cpp"    // Platform-independent methods, if any
  63.  
  64. SOM_Scope void  SOMLINK ODDragItemIteratorInitDragItemIterator(ODDragItemIterator *somSelf, Environment *ev,
  65.         LinkedListIterator* dragItemListIter)
  66. {
  67.     ODDragItemIteratorData *somThis = ODDragItemIteratorGetData(somSelf);
  68.     ODDragItemIteratorMethodDebug("ODDragItemIterator","ODDragItemIteratorInitDragItemIterator");
  69.  
  70.     _fDragItemListIter = dragItemListIter;
  71. }
  72.  
  73. SOM_Scope void  SOMLINK ODDragItemIteratorsomUninit(ODDragItemIterator *somSelf)
  74. {
  75.     ODDragItemIteratorData *somThis = ODDragItemIteratorGetData(somSelf);
  76.     ODDragItemIteratorMethodDebug("ODDragItemIterator","ODDragItemIteratorsomUninit");
  77.  
  78.     delete _fDragItemListIter;
  79.     
  80.     ODDragItemIterator_parent_ODObject_somUninit(somSelf);
  81. }
  82.  
  83. SOM_Scope ODStorageUnit*  SOMLINK ODDragItemIteratorFirst(ODDragItemIterator *somSelf, Environment *ev)
  84. {
  85.     ODDragItemIteratorData *somThis = ODDragItemIteratorGetData(somSelf);
  86.     ODDragItemIteratorMethodDebug("ODDragItemIterator","ODDragItemIteratorFirst");
  87.  
  88.     ODDragLink*    theLink = (ODDragLink*) _fDragItemListIter->First();
  89.     return(theLink ? (ODStorageUnit*) theLink->fItem->fSU : (ODStorageUnit*) kODNULL);
  90. }
  91.  
  92. SOM_Scope ODStorageUnit*  SOMLINK ODDragItemIteratorNext(ODDragItemIterator *somSelf, Environment *ev)
  93. {
  94.     ODDragItemIteratorData *somThis = ODDragItemIteratorGetData(somSelf);
  95.     ODDragItemIteratorMethodDebug("ODDragItemIterator","ODDragItemIteratorNext");
  96.  
  97.     ODDragLink *theLink = (ODDragLink*)_fDragItemListIter->Next();
  98.     return(theLink ? (ODStorageUnit*) theLink->fItem->fSU : (ODStorageUnit*) kODNULL);
  99. }
  100.  
  101. SOM_Scope ODBoolean  SOMLINK ODDragItemIteratorIsNotComplete(ODDragItemIterator *somSelf, Environment *ev)
  102. {
  103.     ODDragItemIteratorData *somThis = ODDragItemIteratorGetData(somSelf);
  104.     ODDragItemIteratorMethodDebug("ODDragItemIterator","ODDragItemIteratorIsNotComplete");
  105.  
  106.     return (_fDragItemListIter->IsNotComplete());
  107. }
  108.