VR-Forces 4.1.1 Class Documentation
DtVirtualBaseClass.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtVirtualBaseClass.h,v $ $Revision: 1.8 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvUtil/vrvUtil.h>
16 
17 namespace makVrv
18 {
23  {
24 
25  public:
26 
29 
31  virtual ~DtVirtualBaseClass();
32 
33  };
34 
37  template <typename T>
39  {
40  public:
41  DtInstanceHolder(T* ptr) : myPointer(ptr)
42  {
43  }
44 
46  {
47  delete myPointer;
48  myPointer = 0;
49  }
50 
51  T* get()
52  {
53  return myPointer;
54  }
55 
57  };
58 
61  template <typename T>
63  {
64  public:
66  {
67  }
68 
70  {
71  // do not delete
72  myPointer = 0;
73  }
74 
75  T* get()
76  {
77  return myPointer;
78  }
79 
81  };
82 }
83 
84 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)