VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
keyedVrfObjectIterator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: keyedObjIter.h,v $ $Revision: 1.8 $ $State: Exp $
7 *******************************************************************************/
8 
11 
20 
21 #pragma once
22 
24 
25 template<class T> class DtBaseSimObjectIterator : public DtIteratorBase<T>
26 {
27 private:
28 
29  //Default constructor. Do not use.
31 
33  const DtBaseSimObjectIterator& orig);
34 
35 public:
36 
41  simObjectManager) : DtIteratorBase<T>(list), mySimObjectManager(simObjectManager) {};
42 
45  DtIteratorBase<T>(orig),
47 
50 
51  T* first(bool move = true)
52  {
53  return dataToObject(this->internalFirst(move));
54  };
55  T* next(bool move = true)
56  {
57  return dataToObject(this->internalNext(move));
58  };
59  T* prev(bool move = true)
60  {
61  return dataToObject(this->internalPrev(move));
62  };
63  T* last(bool move = true)
64  {
65  return dataToObject(this->internalLast(move));
66  };
67  T* wrapNext(bool move = true)
68  {
69  return dataToObject(this->internalWrapNext(move));
70  };
71  T* wrapPrev(bool move = true)
72  {
73  return dataToObject(this->internalWrapPrev(move));
74  };
75 
76 protected:
77  T* dataToObject(void* data) const
78  {
79  DtEntityIdentifier* keyP = (DtEntityIdentifier*) data;
80  if (keyP)
81  {
82  return (T*)mySimObjectManager->lookup(*keyP);
83  }
84 
85  return NULL;
86  }
87 
88 protected:
90 };
91 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)