From 7028cbe09c688437910a25623098762bf0fa592d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Mar 2016 22:28:34 +1000 Subject: Move Irrlicht to src/others. --- .../doc/html/_i_reference_counted_8h_source.html | 196 +++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html (limited to 'src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html') diff --git a/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html new file mode 100644 index 0000000..641e3b0 --- /dev/null +++ b/src/others/irrlicht-1.8.1/doc/html/_i_reference_counted_8h_source.html @@ -0,0 +1,196 @@ + + +
+ +00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt +00002 // This file is part of the "Irrlicht Engine". +00003 // For conditions of distribution and use, see copyright notice in irrlicht.h +00004 +00005 #ifndef __I_IREFERENCE_COUNTED_H_INCLUDED__ +00006 #define __I_IREFERENCE_COUNTED_H_INCLUDED__ +00007 +00008 #include "irrTypes.h" +00009 +00010 namespace irr +00011 { +00012 +00014 +00041 class IReferenceCounted +00042 { +00043 public: +00044 +00046 IReferenceCounted() +00047 : DebugName(0), ReferenceCounter(1) +00048 { +00049 } +00050 +00052 virtual ~IReferenceCounted() +00053 { +00054 } +00055 +00057 +00086 void grab() const { ++ReferenceCounter; } +00087 +00089 +00116 bool drop() const +00117 { +00118 // someone is doing bad reference counting. +00119 _IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0) +00120 +00121 --ReferenceCounter; +00122 if (!ReferenceCounter) +00123 { +00124 delete this; +00125 return true; +00126 } +00127 +00128 return false; +00129 } +00130 +00132 +00133 s32 getReferenceCount() const +00134 { +00135 return ReferenceCounter; +00136 } +00137 +00139 +00142 const c8* getDebugName() const +00143 { +00144 return DebugName; +00145 } +00146 +00147 protected: +00148 +00150 +00153 void setDebugName(const c8* newName) +00154 { +00155 DebugName = newName; +00156 } +00157 +00158 private: +00159 +00161 const c8* DebugName; +00162 +00164 mutable s32 ReferenceCounter; +00165 }; +00166 +00167 } // end namespace irr +00168 +00169 #endif +00170 +