diff options
Diffstat (limited to 'source/blender/freestyle')
67 files changed, 731 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/application/AppConfig.h b/source/blender/freestyle/intern/application/AppConfig.h index d647b7fc59c..ad64fce2c44 100644 --- a/source/blender/freestyle/intern/application/AppConfig.h +++ b/source/blender/freestyle/intern/application/AppConfig.h @@ -32,6 +32,10 @@ #include "../system/FreestyleConfig.h" #include "../system/Precision.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -68,6 +72,10 @@ public: const string& getHomeDir() const {return _HomeDir;} static string getEnvVar(const string& iEnvVarName); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Config:Path") +#endif }; // diff --git a/source/blender/freestyle/intern/application/AppView.h b/source/blender/freestyle/intern/application/AppView.h index 0a9bc6449f4..ca250f89850 100644 --- a/source/blender/freestyle/intern/application/AppView.h +++ b/source/blender/freestyle/intern/application/AppView.h @@ -31,6 +31,10 @@ #include "../scene_graph/NodeDrawingStyle.h" #include "../system/Precision.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -228,6 +232,11 @@ protected: bool _Draw3DScene; NodeGroup _p2DNode; NodeDrawingStyle *_p2DSelectionNode; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:AppView") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h index ff9a85f8041..3315fe7e20b 100644 --- a/source/blender/freestyle/intern/application/Controller.h +++ b/source/blender/freestyle/intern/application/Controller.h @@ -45,6 +45,10 @@ extern "C" { #include "DNA_scene_types.h" } +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class AppView; @@ -238,6 +242,11 @@ private: bool _ComputeSteerableViewMap; FEdgeXDetector edgeDetector; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Controller") +#endif }; extern Controller *g_pController; diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h index fd0672d8e13..494dd375be0 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h @@ -53,6 +53,10 @@ extern "C" { #include "BLI_math.h" } +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class NodeGroup; @@ -120,6 +124,11 @@ protected: float _z_near, _z_far; RenderMonitor *_pRenderMonitor; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BlenderFileLoader") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/BBox.h b/source/blender/freestyle/intern/geometry/BBox.h index 8220bc6c65b..04fe6118815 100644 --- a/source/blender/freestyle/intern/geometry/BBox.h +++ b/source/blender/freestyle/intern/geometry/BBox.h @@ -28,6 +28,10 @@ * \date 22/05/2003 */ +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { template <class Point> @@ -130,6 +134,11 @@ private: Point _min; Point _max; bool _empty; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BBox") +#endif }; template <class Point> diff --git a/source/blender/freestyle/intern/geometry/Bezier.h b/source/blender/freestyle/intern/geometry/Bezier.h index 4bd8dc8df4b..34af31d0ba8 100644 --- a/source/blender/freestyle/intern/geometry/Bezier.h +++ b/source/blender/freestyle/intern/geometry/Bezier.h @@ -34,6 +34,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -60,8 +64,11 @@ public: { return _Vertices; } -}; +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BezierCurveSegment") +#endif +}; class LIB_GEOMETRY_EXPORT BezierCurve { @@ -86,6 +93,10 @@ public: { return _Segments; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BezierCurve") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.h b/source/blender/freestyle/intern/geometry/GeomCleaner.h index 46ee6337ecc..0b97614f6ea 100644 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.h +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.h @@ -32,6 +32,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -128,6 +132,10 @@ public: */ static void CleanIndexedVertexArray(const float *iVertices, unsigned iVSize, const unsigned *iIndices, unsigned iISize, real **oVertices, unsigned *oVSize, unsigned **oIndices); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GeomCleaner") +#endif }; @@ -210,6 +218,10 @@ public: { return (_Vector == v._Vector); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:IndexedVertex") +#endif }; #if 0 diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 8ba74f9ba2c..08b614faa95 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -45,6 +45,10 @@ extern "C" { #include "BLI_utildefines.h" } +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -83,6 +87,11 @@ public: private: Vec3r _orig; OccludersSet _occluders; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Cell") +#endif }; @@ -100,6 +109,10 @@ public: virtual bool stop() { return false; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridVisitor") +#endif }; /*! Gathers all the occluders belonging to the cells traversed by the ray */ @@ -357,6 +370,11 @@ protected: //OccludersSet _ray_occluders; // Set storing the occluders contained in the cells traversed by a ray OccludersSet _occluders; // List of all occluders inserted in the grid + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Grid") +#endif }; // @@ -375,6 +393,11 @@ private: Polygon3r *firstOccluderFromNextCell(); Grid& grid; OccludersSet::iterator it, end; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VirtualOccludersSet") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/GridHelpers.h b/source/blender/freestyle/intern/geometry/GridHelpers.h index 57b56ca2ff4..22efdcf1d11 100644 --- a/source/blender/freestyle/intern/geometry/GridHelpers.h +++ b/source/blender/freestyle/intern/geometry/GridHelpers.h @@ -37,6 +37,10 @@ #include "../winged_edge/WEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { namespace GridHelpers { @@ -121,6 +125,10 @@ class Transform public: virtual ~Transform () = 0; virtual Vec3r operator()(const Vec3r& point) const = 0; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridHelpers:Transform") +#endif }; inline bool insideProscenium (const real proscenium[4], const Polygon3r& polygon) diff --git a/source/blender/freestyle/intern/geometry/Noise.h b/source/blender/freestyle/intern/geometry/Noise.h index bed46ab1b01..cd1be53a5aa 100644 --- a/source/blender/freestyle/intern/geometry/Noise.h +++ b/source/blender/freestyle/intern/geometry/Noise.h @@ -32,6 +32,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -75,6 +79,11 @@ private: float g1[_NOISE_B + _NOISE_B + 2]; /* UNUSED */ // int start; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Noise") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/Polygon.h b/source/blender/freestyle/intern/geometry/Polygon.h index 8f7ab8e440c..cfeae8fd632 100644 --- a/source/blender/freestyle/intern/geometry/Polygon.h +++ b/source/blender/freestyle/intern/geometry/Polygon.h @@ -33,6 +33,10 @@ #include "Geom.h" #include "GeomUtils.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -165,6 +169,11 @@ protected: Point _min; Point _max; unsigned _id; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Geometry:Polygon") +#endif }; diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h index 8777dd0ba51..86058a434bf 100644 --- a/source/blender/freestyle/intern/geometry/SweepLine.h +++ b/source/blender/freestyle/intern/geometry/SweepLine.h @@ -31,6 +31,10 @@ #include <list> #include <vector> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /*! Class to define the intersection berween two segments*/ @@ -74,6 +78,10 @@ public: Edge *EdgeB; // second segment real tA; // parameter defining the intersection point with respect to the segment EdgeA. real tB; // parameter defining the intersection point with respect to the segment EdgeB. + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Intersection") +#endif }; #ifdef _MSC_VER @@ -180,6 +188,11 @@ private: Point B; std::vector<Intersection<Segment<T, Point> >*> _Intersections; // list of intersections parameters bool _order; // true if A and B are in the same order than _edge.A and _edge.B. false otherwise. + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Segment") +#endif }; #ifdef _MSC_VER @@ -322,6 +335,11 @@ private: std::list<Segment<T, Point> *> _set; // set of active edges for a given position of the sweep line std::vector<Segment<T, Point> *> _IntersectedEdges; // the list of intersected edges std::vector<Intersection<Segment<T, Point> > *> _Intersections; // the list of all intersections. + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SweepLine") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/VecMat.h b/source/blender/freestyle/intern/geometry/VecMat.h index 5319bbc0feb..1948dadb207 100644 --- a/source/blender/freestyle/intern/geometry/VecMat.h +++ b/source/blender/freestyle/intern/geometry/VecMat.h @@ -34,6 +34,10 @@ #include <math.h> #include <vector> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { namespace VecMat { @@ -272,6 +276,11 @@ protected: enum { _dim = N, }; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VecMat:Vec") +#endif }; @@ -755,6 +764,11 @@ public: protected: value_type _coord[_SIZE]; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VecMat:Matrix") +#endif }; #undef _SIZE diff --git a/source/blender/freestyle/intern/geometry/normal_cycle.h b/source/blender/freestyle/intern/geometry/normal_cycle.h index 86e3ed0f2f5..441fca7ac5f 100644 --- a/source/blender/freestyle/intern/geometry/normal_cycle.h +++ b/source/blender/freestyle/intern/geometry/normal_cycle.h @@ -43,6 +43,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -123,6 +127,11 @@ private: real eigen_value_[3]; real M_[6]; int i_[3]; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OGF:NormalCycle") +#endif }; inline void NormalCycle::accumulate_dihedral_angle(const Vec3r& edge, const double beta, double neigh_area) diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index 02c2a917bde..313441a07d3 100644 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -37,6 +37,10 @@ extern "C" { #include "BLI_math.h" } +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_IMAGE_EXPORT GaussianFilter @@ -109,6 +113,11 @@ public: protected: void computeMask(); + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GaussianFilter") +#endif }; /* diff --git a/source/blender/freestyle/intern/image/Image.h b/source/blender/freestyle/intern/image/Image.h index e4a8e3f9041..12be1816c1a 100644 --- a/source/blender/freestyle/intern/image/Image.h +++ b/source/blender/freestyle/intern/image/Image.h @@ -30,6 +30,10 @@ #include <string.h> // for memcpy +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // @@ -167,6 +171,11 @@ protected: unsigned _storedHeight; unsigned _Ox; // origin of the stored part unsigned _Oy; // origin of the stored part + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FrsImage") +#endif }; diff --git a/source/blender/freestyle/intern/image/ImagePyramid.h b/source/blender/freestyle/intern/image/ImagePyramid.h index c3f3f63e4e7..5ce937ed9f8 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.h +++ b/source/blender/freestyle/intern/image/ImagePyramid.h @@ -32,6 +32,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class GrayImage; @@ -78,6 +82,10 @@ public: { return _levels.size(); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ImagePyramid") +#endif }; class LIB_IMAGE_EXPORT GaussianPyramid : public ImagePyramid diff --git a/source/blender/freestyle/intern/scene_graph/DrawingStyle.h b/source/blender/freestyle/intern/scene_graph/DrawingStyle.h index b95e96a09aa..9fbdd0e0fad 100644 --- a/source/blender/freestyle/intern/scene_graph/DrawingStyle.h +++ b/source/blender/freestyle/intern/scene_graph/DrawingStyle.h @@ -28,6 +28,10 @@ * \date 10/10/2002 */ +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class DrawingStyle @@ -100,6 +104,11 @@ private: float LineWidth; float PointSize; bool LightingEnabled; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:DrawingStyle") +#endif }; DrawingStyle::DrawingStyle(const DrawingStyle& iBrother) diff --git a/source/blender/freestyle/intern/scene_graph/FrsMaterial.h b/source/blender/freestyle/intern/scene_graph/FrsMaterial.h index 43a61e772f9..7e9eeda26d5 100644 --- a/source/blender/freestyle/intern/scene_graph/FrsMaterial.h +++ b/source/blender/freestyle/intern/scene_graph/FrsMaterial.h @@ -30,6 +30,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /*! Class defining a material */ @@ -253,6 +257,11 @@ private: float Ambient[4]; float Emission[4]; float Shininess; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FrsMaterial") +#endif }; FrsMaterial::FrsMaterial() diff --git a/source/blender/freestyle/intern/scene_graph/SceneVisitor.h b/source/blender/freestyle/intern/scene_graph/SceneVisitor.h index 1f1be21df72..d3870fe835d 100644 --- a/source/blender/freestyle/intern/scene_graph/SceneVisitor.h +++ b/source/blender/freestyle/intern/scene_graph/SceneVisitor.h @@ -30,6 +30,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { #define VISIT_COMPLETE_DEF(type) \ @@ -92,6 +96,10 @@ public: VISIT_COMPLETE_DEF(IndexedFaceSet) VISIT_COMPLETE_DEF(DrawingStyle) VISIT_COMPLETE_DEF(FrsMaterial) + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SceneVisitor") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/Canvas.h b/source/blender/freestyle/intern/stroke/Canvas.h index dc752f1c94d..07aa171534a 100644 --- a/source/blender/freestyle/intern/stroke/Canvas.h +++ b/source/blender/freestyle/intern/stroke/Canvas.h @@ -40,6 +40,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -239,6 +243,10 @@ public: void resetModified(bool iMod = false); void causalStyleModules(std::vector<unsigned>& vec, unsigned index = 0); void setModified(unsigned index, bool b); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Canvas") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h index 7e09a482e4c..68da744d7b3 100644 --- a/source/blender/freestyle/intern/stroke/Curve.h +++ b/source/blender/freestyle/intern/stroke/Curve.h @@ -41,6 +41,10 @@ #include "../system/BaseIterator.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { diff --git a/source/blender/freestyle/intern/stroke/Modifiers.h b/source/blender/freestyle/intern/stroke/Modifiers.h index ea386a5cbda..b10789504fc 100644 --- a/source/blender/freestyle/intern/stroke/Modifiers.h +++ b/source/blender/freestyle/intern/stroke/Modifiers.h @@ -30,6 +30,10 @@ #include "TimeStamp.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /* ----------------------------------------- * @@ -49,6 +53,10 @@ struct EdgeModifier : public unary_function<Edge, void> /*! the () operator */ virtual void operator()(Edge& iEdge) {} + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:EdgeModifier") +#endif }; /*! Modifier that sets the time stamp of an Interface1D to the time stamp of the system. */ diff --git a/source/blender/freestyle/intern/stroke/Module.h b/source/blender/freestyle/intern/stroke/Module.h index e575892e635..b43c2d6247e 100644 --- a/source/blender/freestyle/intern/stroke/Module.h +++ b/source/blender/freestyle/intern/stroke/Module.h @@ -31,6 +31,10 @@ #include "Canvas.h" #include "StyleModule.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class Module @@ -72,6 +76,11 @@ private: Canvas *canvas = Canvas::getInstance(); return canvas->getCurrentStyleModule(); } + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Module") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/Operators.h b/source/blender/freestyle/intern/stroke/Operators.h index 7cff86eafce..61b20f556b5 100644 --- a/source/blender/freestyle/intern/stroke/Operators.h +++ b/source/blender/freestyle/intern/stroke/Operators.h @@ -43,6 +43,10 @@ #include "../view_map/Interface1D.h" #include "../view_map/ViewMap.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /*! Class defining the operators used in a style module. @@ -264,6 +268,11 @@ private: static I1DContainer _current_chains_set; static I1DContainer *_current_set; static StrokesContainer _current_strokes_set; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Operators") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/Predicates0D.h b/source/blender/freestyle/intern/stroke/Predicates0D.h index 6a24740f386..0f04c0827c3 100644 --- a/source/blender/freestyle/intern/stroke/Predicates0D.h +++ b/source/blender/freestyle/intern/stroke/Predicates0D.h @@ -33,6 +33,10 @@ #include "../view_map/Functions0D.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // @@ -76,6 +80,11 @@ public: { return Director_BPy_UnaryPredicate0D___call__(this, it); } + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryPredicate0D") +#endif }; @@ -122,6 +131,11 @@ public: { return Director_BPy_BinaryPredicate0D___call__(this, inter1, inter2); } + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BinaryPredicate0D") +#endif }; diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index 54c04f6b71e..257f938bf30 100644 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -40,6 +40,10 @@ #include "../view_map/Interface1D.h" #include "../view_map/Functions1D.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // @@ -83,6 +87,10 @@ public: { return Director_BPy_UnaryPredicate1D___call__(this, inter); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryPredicate1D") +#endif }; @@ -129,6 +137,10 @@ public: { return Director_BPy_BinaryPredicate1D___call__(this, inter1, inter2); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BinaryPredicate1D") +#endif }; diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h index ee2e1ccba04..deb70c21b2a 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.h +++ b/source/blender/freestyle/intern/stroke/Stroke.h @@ -39,6 +39,10 @@ #include "../system/FreestyleConfig.h" #include "../system/StringUtils.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // @@ -297,6 +301,11 @@ private: realMap *_userAttributesReal; Vec2fMap *_userAttributesVec2f; Vec3fMap *_userAttributesVec3f; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeAttribute") +#endif }; diff --git a/source/blender/freestyle/intern/stroke/StrokeLayer.h b/source/blender/freestyle/intern/stroke/StrokeLayer.h index ff36c40fd0a..91292e237d6 100644 --- a/source/blender/freestyle/intern/stroke/StrokeLayer.h +++ b/source/blender/freestyle/intern/stroke/StrokeLayer.h @@ -30,6 +30,10 @@ #include <deque> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class Stroke; @@ -96,6 +100,10 @@ public: { _strokes.push_back(iStroke); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeLayer") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/StrokeRenderer.h b/source/blender/freestyle/intern/stroke/StrokeRenderer.h index 5ee1eaf17eb..e38b7107efd 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRenderer.h +++ b/source/blender/freestyle/intern/stroke/StrokeRenderer.h @@ -38,6 +38,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /**********************************/ @@ -107,6 +111,11 @@ protected: static string _patterns_path; static string _brushes_path; unsigned int _defaultTextureId; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:TextureManager") +#endif }; @@ -135,6 +144,10 @@ public: //static unsigned int getTextureIndex(unsigned int index); static TextureManager *_textureManager; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeRenderer") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.h b/source/blender/freestyle/intern/stroke/StrokeRep.h index bc6d7e67a68..38d6716584d 100644 --- a/source/blender/freestyle/intern/stroke/StrokeRep.h +++ b/source/blender/freestyle/intern/stroke/StrokeRep.h @@ -32,6 +32,10 @@ #include "../geometry/Geom.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -114,6 +118,11 @@ protected: Vec2r _texCoord; Vec3r _color; float _alpha; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeVertexRep") +#endif }; class Strip @@ -147,6 +156,10 @@ public: { return _vertices; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Strip") +#endif }; class StrokeRep @@ -207,6 +220,10 @@ public: { _textureId = textureId; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeRep") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/StrokeShader.h b/source/blender/freestyle/intern/stroke/StrokeShader.h index d0cf3b8066b..7986a08e303 100644 --- a/source/blender/freestyle/intern/stroke/StrokeShader.h +++ b/source/blender/freestyle/intern/stroke/StrokeShader.h @@ -34,6 +34,10 @@ #include "../python/Director.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // @@ -97,6 +101,10 @@ public: { return Director_BPy_StrokeShader_shade( const_cast<StrokeShader *>(this), ioStroke); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeShader") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/StrokeTesselator.h b/source/blender/freestyle/intern/stroke/StrokeTesselator.h index b9020b9b35e..e8ff75f7a96 100644 --- a/source/blender/freestyle/intern/stroke/StrokeTesselator.h +++ b/source/blender/freestyle/intern/stroke/StrokeTesselator.h @@ -32,6 +32,10 @@ #include "../scene_graph/LineRep.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class StrokeTesselator @@ -68,6 +72,11 @@ public: private: FrsMaterial _FrsMaterial; bool _overloadFrsMaterial; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeTesselator") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/stroke/StyleModule.h b/source/blender/freestyle/intern/stroke/StyleModule.h index 336a3251a60..c34a288c5d6 100644 --- a/source/blender/freestyle/intern/stroke/StyleModule.h +++ b/source/blender/freestyle/intern/stroke/StyleModule.h @@ -39,6 +39,10 @@ #include "../system/Interpreter.h" #include "../system/StringUtils.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -174,6 +178,11 @@ private: protected: Interpreter *_inter; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StyleModule") +#endif }; } /* namespace Freestyle */ 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 */ diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h index 5ceb84761bf..8aa5167732d 100644 --- a/source/blender/freestyle/intern/view_map/BoxGrid.h +++ b/source/blender/freestyle/intern/view_map/BoxGrid.h @@ -50,6 +50,10 @@ #include "BKE_global.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class BoxGrid @@ -66,6 +70,11 @@ public: // However, code comments make it clear that userdata is deprecated, so we avoid the temptation // to save 4 or 8 bytes. WFace *face; + +#ifdef WITH_CXX_GUARDEDALLOC + public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid:OccluderData") +#endif }; private: @@ -126,6 +135,11 @@ public: real _occludeeDepth; //deque<OccluderData*>::iterator _current, _occludeeCandidate; vector<OccluderData*>::iterator _current, _occludeeCandidate; + +#ifdef WITH_CXX_GUARDEDALLOC + public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid:Iterator") +#endif }; class Transform : public GridHelpers::Transform @@ -176,6 +190,11 @@ private: occluderContainer _faces; Vec3r _viewpoint; bool _enableQI; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid") +#endif }; inline void BoxGrid::Iterator::initBeforeTarget() diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h index fb0702278ba..59d6e23312f 100644 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h @@ -39,6 +39,10 @@ #include "../winged_edge/Curvature.h" #include "../winged_edge/WXEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -231,6 +235,11 @@ protected: ProgressBar *_pProgressBar; RenderMonitor *_pRenderMonitor; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FEdgeXDetector") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h index 5036433e586..69f6f42e022 100644 --- a/source/blender/freestyle/intern/view_map/Functions0D.h +++ b/source/blender/freestyle/intern/view_map/Functions0D.h @@ -43,6 +43,10 @@ #include "../system/Exception.h" #include "../system/Precision.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class FEdge; @@ -103,6 +107,10 @@ public: { return Director_BPy_UnaryFunction0D___call__(this, py_uf0D, iter); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryFunction0D") +#endif }; #ifdef SWIG diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h index b6f914cd43b..a4dd1cd5e03 100644 --- a/source/blender/freestyle/intern/view_map/Functions1D.h +++ b/source/blender/freestyle/intern/view_map/Functions1D.h @@ -39,6 +39,10 @@ #include "../python/Director.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { // @@ -119,6 +123,11 @@ public: protected: IntegrationType _integration; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryFunction1D") +#endif }; @@ -161,6 +170,11 @@ public: protected: IntegrationType _integration; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryFunction1D_void") +#endif }; diff --git a/source/blender/freestyle/intern/view_map/GridDensityProvider.h b/source/blender/freestyle/intern/view_map/GridDensityProvider.h index a39f17753d4..d096fb3aacd 100644 --- a/source/blender/freestyle/intern/view_map/GridDensityProvider.h +++ b/source/blender/freestyle/intern/view_map/GridDensityProvider.h @@ -37,6 +37,10 @@ #include "BKE_global.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class GridDensityProvider @@ -123,6 +127,11 @@ protected: unsigned _cellsX, _cellsY; float _cellSize; float _cellOrigin[2]; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridDensityProvider") +#endif }; class GridDensityProviderFactory @@ -142,6 +151,10 @@ public: virtual auto_ptr<GridDensityProvider> newGridDensityProvider(OccluderSource& source) = 0; virtual ~GridDensityProviderFactory () {} + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridDensityProviderFactory") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h index 770929b21f9..c9776bb77fa 100644 --- a/source/blender/freestyle/intern/view_map/Interface0D.h +++ b/source/blender/freestyle/intern/view_map/Interface0D.h @@ -40,6 +40,10 @@ #include "../winged_edge/Nature.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -176,6 +180,10 @@ public: PyErr_SetString(PyExc_TypeError, "method castToTVertex() not properly overridden"); return 0; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Interface0D") +#endif }; diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h index 02c9468554f..2c1f4956e96 100644 --- a/source/blender/freestyle/intern/view_map/Interface1D.h +++ b/source/blender/freestyle/intern/view_map/Interface1D.h @@ -40,6 +40,10 @@ #include "../winged_edge/Nature.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -220,6 +224,11 @@ public: protected: unsigned _timeStamp; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Interface1D") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.h b/source/blender/freestyle/intern/view_map/OccluderSource.h index 1f9209d8445..b6f30ce9e3a 100644 --- a/source/blender/freestyle/intern/view_map/OccluderSource.h +++ b/source/blender/freestyle/intern/view_map/OccluderSource.h @@ -32,6 +32,10 @@ #include "../winged_edge/WEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class OccluderSource @@ -66,6 +70,11 @@ protected: const GridHelpers::Transform& transform; void buildCachedPolygon(); + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OccluderSource") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index c4221069a66..e0bf2ff6120 100644 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -48,6 +48,10 @@ #include "../winged_edge/Curvature.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -1867,6 +1871,10 @@ public: { _importance = importance; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SShape") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h index 0a1e86a1449..4002385a823 100644 --- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h +++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h @@ -35,6 +35,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -126,6 +130,10 @@ public: /*! From world to image */ static Vec3r WorldToImage(const Vec3r& M); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SilhouetteGeomEngine") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h index 9551a0a3e95..56d2ae3cf5e 100644 --- a/source/blender/freestyle/intern/view_map/SphericalGrid.h +++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h @@ -49,6 +49,10 @@ #include "BKE_global.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class SphericalGrid @@ -65,6 +69,10 @@ public: // However, code comments make it clear that userdata is deprecated, so we avoid the temptation to save // 4 or 8 bytes. WFace *face; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SphericalGrid:OccluderData") +#endif }; private: @@ -125,6 +133,12 @@ public: real _occludeeDepth; //deque<OccluderData*>::iterator _current, _occludeeCandidate; vector<OccluderData*>::iterator _current, _occludeeCandidate; + +#ifdef WITH_CXX_GUARDEDALLOC + public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SphericalGrid:Iterator") +#endif + }; class Transform : public GridHelpers::Transform @@ -175,6 +189,11 @@ private: occluderContainer _faces; Vec3r _viewpoint; bool _enableQI; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SphericalGrid") +#endif }; inline void SphericalGrid::Iterator::initBeforeTarget() diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.h b/source/blender/freestyle/intern/view_map/SteerableViewMap.h index c70edcc9af2..79321cafefe 100644 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.h +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.h @@ -34,6 +34,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -144,6 +148,11 @@ public: protected: void Clear(); void Build(); + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SteerableViewMap") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h index c1b228c13c6..b036410a9fe 100644 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h @@ -47,6 +47,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -121,6 +125,10 @@ public: { return !(*this == b); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OWXFaceLayer") +#endif }; class WXEdge; @@ -160,6 +168,10 @@ public: { return !(*this == b); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OWXEdge") +#endif }; class WOEdge; @@ -279,6 +291,11 @@ protected: SVertexMap _SVertexMap; SShape *_pCurrentSShape; ViewShape *_pCurrentVShape; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewEdgeXBuilder") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index cd3dd7aafa2..f684f2b919d 100644 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -39,6 +39,10 @@ #include "../system/BaseIterator.h" #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /**********************************/ @@ -231,6 +235,10 @@ public: /* connects a FEdge to the graph trough a SVertex */ //FEdge *Connect(FEdge *ioEdge, SVertex *ioVertex); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMap") +#endif }; /**********************************/ @@ -1584,6 +1592,10 @@ public: /* removes the view vertex iViewVertex in the View Shape. */ void RemoveVertex(ViewVertex *iViewVertex); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewShape") +#endif }; diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h index 2fb98934ea9..05596daa85b 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h @@ -52,6 +52,10 @@ #include "../winged_edge/WEdge.h" #include "../winged_edge/WXEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -247,6 +251,11 @@ protected: void FindOccludee(FEdge *fe, Grid *iGrid, real epsilon, Polygon3r **oaPolygon, unsigned timestamp); void FindOccludee(FEdge *fe, Grid *iGrid, real epsilon, Polygon3r **oaPolygon, unsigned timestamp, Vec3r& u, Vec3r& A, Vec3r& origin, Vec3r& edge, vector<WVertex*>& faceVertices); + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMapBuilder") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h index 7ba8c77a452..d37d0b6e5a5 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h +++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h @@ -39,6 +39,10 @@ #include "../winged_edge/WEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class NodeShape; @@ -98,6 +102,11 @@ private: Nature::EdgeNature _nature; FrsMaterial _FrsMaterial; bool _overloadFrsMaterial; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:ViewMapTesselator") +#endif }; /*! Class to tesselate the 2D projected silhouette */ diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.h b/source/blender/freestyle/intern/winged_edge/Curvature.h index 204610f1f10..5977f12d870 100644 --- a/source/blender/freestyle/intern/winged_edge/Curvature.h +++ b/source/blender/freestyle/intern/winged_edge/Curvature.h @@ -51,6 +51,10 @@ #include "../system/FreestyleConfig.h" #include "../system/Precision.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -100,6 +104,10 @@ public: real Kr; // radial curvature real dKr; // radial curvature Vec3r er; // radial curvature direction + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:CurvatureInfo") +#endif }; class Face_Curvature_Info @@ -119,6 +127,10 @@ public: } vector<CurvatureInfo *> vec_curvature_info; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Face_Curvature_Info") +#endif }; bool LIB_WINGED_EDGE_EXPORT gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &n); diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 6f105afa864..e5020f2a7fa 100644 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -38,6 +38,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -239,6 +243,11 @@ public: //virtual WOEdge **operator->(); protected: virtual void increment(); + +#ifdef WITH_CXX_GUARDEDALLOC + public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WVertex:incoming_edge_iterator") +#endif }; /*! Iterator to iterate over a vertex faces in the CCW order */ @@ -319,6 +328,11 @@ public: { ++_edge_it; } + +#ifdef WITH_CXX_GUARDEDALLOC + public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WVertex:face_iterator") +#endif }; public: @@ -335,6 +349,10 @@ public: { return face_iterator(incoming_edges_end()); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WVertex") +#endif }; @@ -517,6 +535,10 @@ public: { userdata = NULL; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WOEdge") +#endif }; @@ -700,6 +722,10 @@ public: { userdata = NULL; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WEdge") +#endif }; @@ -979,6 +1005,10 @@ public: { userdata = NULL; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WFace") +#endif }; @@ -1250,6 +1280,11 @@ protected: */ virtual WFace *MakeFace(vector<WVertex *>& iVertexList, vector<bool>& iFaceEdgeMarksList, unsigned iMaterialIndex, WFace *face); + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WShape") +#endif }; @@ -1290,6 +1325,11 @@ public: private: vector<WShape *> _wshapes; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WingedEdge") +#endif }; diff --git a/source/blender/freestyle/intern/winged_edge/WFillGrid.h b/source/blender/freestyle/intern/winged_edge/WFillGrid.h index a1b4ef25249..ca52f75847c 100644 --- a/source/blender/freestyle/intern/winged_edge/WFillGrid.h +++ b/source/blender/freestyle/intern/winged_edge/WFillGrid.h @@ -34,6 +34,10 @@ #include "../geometry/Grid.h" #include "../geometry/Polygon.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { class LIB_WINGED_EDGE_EXPORT WFillGrid @@ -78,6 +82,11 @@ private: Grid *_grid; WingedEdge *_winged_edge; unsigned _polygon_id; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WFillGrid") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index 1ed47b53b3d..f696e279ad0 100644 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -32,6 +32,10 @@ #include "Nature.h" #include "WEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { typedef Nature::EdgeNature WXNature; @@ -302,6 +306,10 @@ public: { _config = iConf; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WXSmoothEdge") +#endif }; /* Class to store a value per vertex and a smooth edge. @@ -471,6 +479,10 @@ public: ++_nNullDotP; } } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WXFaceLayer") +#endif }; class WXFace : public WFace |