Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/freestyle/intern/stroke/Predicates0D.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Predicates0D.h')
-rw-r--r--source/blender/freestyle/intern/stroke/Predicates0D.h202
1 files changed, 102 insertions, 100 deletions
diff --git a/source/blender/freestyle/intern/stroke/Predicates0D.h b/source/blender/freestyle/intern/stroke/Predicates0D.h
index 4309c942218..f511c0ceade 100644
--- a/source/blender/freestyle/intern/stroke/Predicates0D.h
+++ b/source/blender/freestyle/intern/stroke/Predicates0D.h
@@ -25,7 +25,7 @@
#include "../view_map/Functions0D.h"
#ifdef WITH_CXX_GUARDEDALLOC
-#include "MEM_guardedalloc.h"
+# include "MEM_guardedalloc.h"
#endif
namespace Freestyle {
@@ -41,40 +41,40 @@ namespace Freestyle {
* The UnaryPredicate0D is used by calling its () operator.
* Any inherited class must overload the () operator.
*/
-class UnaryPredicate0D
-{
-public:
- bool result;
- void *py_up0D;
-
- /*! Default constructor. */
- UnaryPredicate0D()
- {
- py_up0D = 0;
- }
-
- /*! Destructor. */
- virtual ~UnaryPredicate0D() {}
-
- /*! Returns the string of the name of the UnaryPredicate0D. */
- virtual string getName() const
- {
- return "UnaryPredicate0D";
- }
-
- /*! The () operator. Must be overload by inherited classes.
- * \param it:
- * The Interface0DIterator pointing onto the Interface0D at which we wish to evaluate the predicate.
- * \return true if the condition is satisfied, false otherwise.
- */
- virtual int operator()(Interface0DIterator& it);
+class UnaryPredicate0D {
+ public:
+ bool result;
+ void *py_up0D;
+
+ /*! Default constructor. */
+ UnaryPredicate0D()
+ {
+ py_up0D = 0;
+ }
+
+ /*! Destructor. */
+ virtual ~UnaryPredicate0D()
+ {
+ }
+
+ /*! Returns the string of the name of the UnaryPredicate0D. */
+ virtual string getName() const
+ {
+ return "UnaryPredicate0D";
+ }
+
+ /*! The () operator. Must be overload by inherited classes.
+ * \param it:
+ * The Interface0DIterator pointing onto the Interface0D at which we wish to evaluate the predicate.
+ * \return true if the condition is satisfied, false otherwise.
+ */
+ virtual int operator()(Interface0DIterator &it);
#ifdef WITH_CXX_GUARDEDALLOC
- MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryPredicate0D")
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:UnaryPredicate0D")
#endif
};
-
//
// BinaryPredicate0D (base class for predicates in 0D)
//
@@ -85,43 +85,43 @@ public:
* It evaluates a relation between 2 Interface0D and returns true or false.
* It is used by calling the () operator.
*/
-class BinaryPredicate0D
-{
-public:
- bool result;
- void *py_bp0D;
-
- /*! Default constructor. */
- BinaryPredicate0D()
- {
- py_bp0D = 0;
- }
-
- /*! Destructor. */
- virtual ~BinaryPredicate0D() {}
-
- /*! Returns the string of the name of the binary predicate. */
- virtual string getName() const
- {
- return "BinaryPredicate0D";
- }
-
- /*! The () operator. Must be overload by inherited classes.
- * It evaluates a relation between 2 Interface0D.
- * \param inter1:
- * The first Interface0D.
- * \param inter2:
- * The second Interface0D.
- * \return true or false.
- */
- virtual int operator()(Interface0D& inter1, Interface0D& inter2);
+class BinaryPredicate0D {
+ public:
+ bool result;
+ void *py_bp0D;
+
+ /*! Default constructor. */
+ BinaryPredicate0D()
+ {
+ py_bp0D = 0;
+ }
+
+ /*! Destructor. */
+ virtual ~BinaryPredicate0D()
+ {
+ }
+
+ /*! Returns the string of the name of the binary predicate. */
+ virtual string getName() const
+ {
+ return "BinaryPredicate0D";
+ }
+
+ /*! The () operator. Must be overload by inherited classes.
+ * It evaluates a relation between 2 Interface0D.
+ * \param inter1:
+ * The first Interface0D.
+ * \param inter2:
+ * The second Interface0D.
+ * \return true or false.
+ */
+ virtual int operator()(Interface0D &inter1, Interface0D &inter2);
#ifdef WITH_CXX_GUARDEDALLOC
- MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BinaryPredicate0D")
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BinaryPredicate0D")
#endif
};
-
//
// Predicates definitions
//
@@ -131,50 +131,52 @@ namespace Predicates0D {
// TrueUP0D
/*! Returns true any time */
-class TrueUP0D : public UnaryPredicate0D
-{
-public:
- /*! Default constructor. */
- TrueUP0D() {}
-
- /*! Returns the string "TrueUP0D"*/
- string getName() const
- {
- return "TrueUP0D";
- }
-
- /*! The () operator. */
- int operator()(Interface0DIterator&)
- {
- result = true;
- return 0;
- }
+class TrueUP0D : public UnaryPredicate0D {
+ public:
+ /*! Default constructor. */
+ TrueUP0D()
+ {
+ }
+
+ /*! Returns the string "TrueUP0D"*/
+ string getName() const
+ {
+ return "TrueUP0D";
+ }
+
+ /*! The () operator. */
+ int operator()(Interface0DIterator &)
+ {
+ result = true;
+ return 0;
+ }
};
// FalseUP0D
/*! Returns false any time */
-class FalseUP0D : public UnaryPredicate0D
-{
-public:
- /*! Default constructor. */
- FalseUP0D() {}
-
- /*! Returns the string "FalseUP0D"*/
- string getName() const
- {
- return "FalseUP0D";
- }
-
- /*! The () operator. */
- int operator()(Interface0DIterator&)
- {
- result = false;
- return 0;
- }
+class FalseUP0D : public UnaryPredicate0D {
+ public:
+ /*! Default constructor. */
+ FalseUP0D()
+ {
+ }
+
+ /*! Returns the string "FalseUP0D"*/
+ string getName() const
+ {
+ return "FalseUP0D";
+ }
+
+ /*! The () operator. */
+ int operator()(Interface0DIterator &)
+ {
+ result = false;
+ return 0;
+ }
};
-} // end of namespace Predicates0D
+} // end of namespace Predicates0D
} /* namespace Freestyle */
-#endif // __FREESTYLE_PREDICATES_0D_H__
+#endif // __FREESTYLE_PREDICATES_0D_H__