diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-05-14 02:58:27 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-05-14 02:58:27 +0400 |
commit | 6ea2dec330a0d460deb1396f258c461be34fa3c8 (patch) | |
tree | 567536490f059ab57592b5352b60f253b7e3ea1c /source/blender/freestyle/intern/system | |
parent | 1a91af691e984714204aa55326245c79a0b06fb8 (diff) |
Added support for WITH_CXX_GUARDEDALLOC build option to the Freestyle module.
Diffstat (limited to 'source/blender/freestyle/intern/system')
13 files changed, 131 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/system/BaseIterator.h b/source/blender/freestyle/intern/system/BaseIterator.h index 3398f08500c..f27bfb68b9f 100644 --- a/source/blender/freestyle/intern/system/BaseIterator.h +++ b/source/blender/freestyle/intern/system/BaseIterator.h @@ -30,6 +30,10 @@ #include <iterator> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // use for iterators defintions @@ -45,6 +49,10 @@ public: typedef const Element *pointer; typedef ptrdiff_t difference_type; typedef Nonconst_traits<Element> Non_const_traits; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Const_traits") +#endif }; template <class Element> @@ -56,18 +64,30 @@ public: typedef Element *pointer; typedef ptrdiff_t difference_type; typedef Nonconst_traits<Element> Non_const_traits; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Nonconst_traits") +#endif }; class InputIteratorTag_Traits { public: typedef std::input_iterator_tag iterator_category; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:InputIteratorTag_Traits") +#endif }; class BidirectionalIteratorTag_Traits { public: typedef std::bidirectional_iterator_tag iterator_category; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BidirectionalIteratorTag_Traits") +#endif }; template<class Traits, class IteratorTagTraits> @@ -87,6 +107,11 @@ public: protected: IteratorBase() {} + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:IteratorBase") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/BaseObject.h b/source/blender/freestyle/intern/system/BaseObject.h index c5073527297..a9e501be38f 100644 --- a/source/blender/freestyle/intern/system/BaseObject.h +++ b/source/blender/freestyle/intern/system/BaseObject.h @@ -31,6 +31,10 @@ #include "FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_SYSTEM_EXPORT BaseObject @@ -67,6 +71,11 @@ public: private: unsigned _ref_counter; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BaseObject") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/Exception.h b/source/blender/freestyle/intern/system/Exception.h index a87c8730c50..d69de7b10dd 100644 --- a/source/blender/freestyle/intern/system/Exception.h +++ b/source/blender/freestyle/intern/system/Exception.h @@ -30,6 +30,10 @@ #include "FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_SYSTEM_EXPORT Exception @@ -60,6 +64,11 @@ public: private: static exception_type _exception; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Exception") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/Id.h b/source/blender/freestyle/intern/system/Id.h index 641ae41907f..5260a38c709 100644 --- a/source/blender/freestyle/intern/system/Id.h +++ b/source/blender/freestyle/intern/system/Id.h @@ -28,6 +28,10 @@ * \date 01/07/2003 */ +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /*! Class used to tag any object by an id. @@ -125,6 +129,11 @@ public: private: id_type _first; id_type _second; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Id") +#endif }; // stream operator diff --git a/source/blender/freestyle/intern/system/Interpreter.h b/source/blender/freestyle/intern/system/Interpreter.h index 2b23a9d7c6a..9b7acc1cf46 100644 --- a/source/blender/freestyle/intern/system/Interpreter.h +++ b/source/blender/freestyle/intern/system/Interpreter.h @@ -30,6 +30,10 @@ #include <string> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -55,6 +59,11 @@ public: protected: string _language; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Interpreter") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/Iterator.h b/source/blender/freestyle/intern/system/Iterator.h index 07ea2ae992e..1fc68b133c2 100644 --- a/source/blender/freestyle/intern/system/Iterator.h +++ b/source/blender/freestyle/intern/system/Iterator.h @@ -28,6 +28,10 @@ #include <iostream> #include <string> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -65,6 +69,10 @@ public: cerr << "Warning: isEnd() not implemented" << endl; return false; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Iterator") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/PointerSequence.h b/source/blender/freestyle/intern/system/PointerSequence.h index e551eb6162e..32c7898f840 100644 --- a/source/blender/freestyle/intern/system/PointerSequence.h +++ b/source/blender/freestyle/intern/system/PointerSequence.h @@ -61,6 +61,10 @@ #include <algorithm> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { template <typename C, typename T> @@ -86,6 +90,10 @@ public: { for_each(this->begin(), this->end(), destroyer); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:PointerSequence") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/ProgressBar.h b/source/blender/freestyle/intern/system/ProgressBar.h index c1ac983a3e8..754004d7f81 100644 --- a/source/blender/freestyle/intern/system/ProgressBar.h +++ b/source/blender/freestyle/intern/system/ProgressBar.h @@ -30,6 +30,10 @@ #include <string> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -86,6 +90,11 @@ protected: unsigned _numtotalsteps; unsigned _progress; string _label; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ProgressBar") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/PseudoNoise.h b/source/blender/freestyle/intern/system/PseudoNoise.h index b190e8c8568..302b305325f 100644 --- a/source/blender/freestyle/intern/system/PseudoNoise.h +++ b/source/blender/freestyle/intern/system/PseudoNoise.h @@ -31,6 +31,10 @@ #include "FreestyleConfig.h" #include "Precision.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_SYSTEM_EXPORT PseudoNoise @@ -50,6 +54,11 @@ public: protected: static real *_values; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:PseudoNoise") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/RandGen.h b/source/blender/freestyle/intern/system/RandGen.h index 7d8de72c240..c3e2b3d99f7 100644 --- a/source/blender/freestyle/intern/system/RandGen.h +++ b/source/blender/freestyle/intern/system/RandGen.h @@ -34,6 +34,10 @@ #include "../system/Precision.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_SYSTEM_EXPORT RandGen @@ -44,6 +48,11 @@ public: private: static void next(); + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:RandGen") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/RenderMonitor.h b/source/blender/freestyle/intern/system/RenderMonitor.h index 614513b3c56..9e801f21210 100644 --- a/source/blender/freestyle/intern/system/RenderMonitor.h +++ b/source/blender/freestyle/intern/system/RenderMonitor.h @@ -32,6 +32,10 @@ extern "C" { #include "render_types.h" } +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class RenderMonitor @@ -51,6 +55,11 @@ public: protected: Render *_re; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:RenderMonitor") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/TimeStamp.h b/source/blender/freestyle/intern/system/TimeStamp.h index 2ebfb359dd5..88063280363 100644 --- a/source/blender/freestyle/intern/system/TimeStamp.h +++ b/source/blender/freestyle/intern/system/TimeStamp.h @@ -30,6 +30,10 @@ #include "FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_SYSTEM_EXPORT TimeStamp @@ -68,6 +72,11 @@ protected: private: static TimeStamp *_instance; unsigned _time_stamp; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:TimeStamp") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/system/TimeUtils.h b/source/blender/freestyle/intern/system/TimeUtils.h index a769eb5b649..1bdcf2d7d38 100644 --- a/source/blender/freestyle/intern/system/TimeUtils.h +++ b/source/blender/freestyle/intern/system/TimeUtils.h @@ -32,6 +32,10 @@ #include "FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class Chronometer @@ -54,6 +58,11 @@ public: private: clock_t _start; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Chronometer") +#endif }; } /* namespace Freestyle */ |