VR-Forces 4.5 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) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
17 
18 #pragma once
19 
20 #include "vrfcore/simManager.h"
22 
23 template<class T> class DtBaseSimObjectIterator : public DtIteratorBase<T>
24 {
25 private:
26 
27  //Default constructor. Do not use.
29 
31  const DtBaseSimObjectIterator& orig);
32 
33 public:
34 
39  simObjectManager) : DtIteratorBase<T>(list), mySimObjectManager(simObjectManager) {};
40 
43  DtIteratorBase<T>(orig),
45 
48 
49  T* first(bool move = true)
50  {
51  return dataToObject(this->internalFirst(move));
52  };
53  T* next(bool move = true)
54  {
55  return dataToObject(this->internalNext(move));
56  };
57  T* prev(bool move = true)
58  {
59  return dataToObject(this->internalPrev(move));
60  };
61  T* last(bool move = true)
62  {
63  return dataToObject(this->internalLast(move));
64  };
65  T* wrapNext(bool move = true)
66  {
67  return dataToObject(this->internalWrapNext(move));
68  };
69  T* wrapPrev(bool move = true)
70  {
71  return dataToObject(this->internalWrapPrev(move));
72  };
73 
74 protected:
75  T* dataToObject(void* data) const
76  {
77  DtEntityIdentifier* keyP = (DtEntityIdentifier*) data;
78  if (keyP)
79  {
81 
82  if (object.isValid())
83  {
84  return *object;
85  }
86  }
87 
88  return NULL;
89  }
90 
91 protected:
93 };
94 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)