summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2012-12-25 22:47:32 -0600
committerGlenn Rice <glennricster@gmail.com>2012-12-25 22:47:32 -0600
commit5ecdb97be8bd04778c267116b59fe79967288bed (patch)
tree677b3ccc4bb6f6e8cc06937bfb43f19958b5b502
parentfa503a0754fc40c03634d7f580096eef53fa994e (diff)
Make comparison operators private and undeclared to avoid invalid
conversions to pointers.
-rw-r--r--poppler-glib/src/action.hg42
-rw-r--r--poppler-glib/src/annot_callout_line.hg21
-rw-r--r--poppler-glib/src/color.hg21
-rw-r--r--poppler-glib/src/fonts_iter.hg21
-rw-r--r--poppler-glib/src/index_iter.hg21
-rw-r--r--poppler-glib/src/layers_iter.hg21
-rw-r--r--poppler-glib/src/page_transition.hg21
7 files changed, 168 insertions, 0 deletions
diff --git a/poppler-glib/src/action.hg b/poppler-glib/src/action.hg
index b38f2a3..e9a7dd9 100644
--- a/poppler-glib/src/action.hg
+++ b/poppler-glib/src/action.hg
@@ -78,6 +78,27 @@ class Dest
* @return <tt>true</tt>, if the Dest is valid
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const Dest& src) const;
+
+ /// See operator<().
+ bool operator<=(const Dest& src) const;
+
+ /// See operator<().
+ bool operator>(const Dest& src) const;
+
+ /// See operator<().
+ bool operator>=(const Dest& src) const;
+
+ /// See operator<().
+ bool operator==(const Dest& src) const;
+
+ /// See operator<().
+ bool operator!=(const Dest& src) const;
};
/** Poppler::ActionLayer - Layer actions
@@ -174,6 +195,27 @@ class Action
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const Action& src) const;
+
+ /// See operator<().
+ bool operator<=(const Action& src) const;
+
+ /// See operator<().
+ bool operator>(const Action& src) const;
+
+ /// See operator<().
+ bool operator>=(const Action& src) const;
+
+ /// See operator<().
+ bool operator==(const Action& src) const;
+
+ /// See operator<().
+ bool operator!=(const Action& src) const;
};
} // namespace Poppler
diff --git a/poppler-glib/src/annot_callout_line.hg b/poppler-glib/src/annot_callout_line.hg
index d4655b8..9c332c8 100644
--- a/poppler-glib/src/annot_callout_line.hg
+++ b/poppler-glib/src/annot_callout_line.hg
@@ -57,6 +57,27 @@ class AnnotCalloutLine
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const AnnotCalloutLine& src) const;
+
+ /// See operator<().
+ bool operator<=(const AnnotCalloutLine& src) const;
+
+ /// See operator<().
+ bool operator>(const AnnotCalloutLine& src) const;
+
+ /// See operator<().
+ bool operator>=(const AnnotCalloutLine& src) const;
+
+ /// See operator<().
+ bool operator==(const AnnotCalloutLine& src) const;
+
+ /// See operator<().
+ bool operator!=(const AnnotCalloutLine& src) const;
};
} // namespace Poppler
diff --git a/poppler-glib/src/color.hg b/poppler-glib/src/color.hg
index e27de17..0aba995 100644
--- a/poppler-glib/src/color.hg
+++ b/poppler-glib/src/color.hg
@@ -52,6 +52,27 @@ class Color
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const Color& src) const;
+
+ /// See operator<().
+ bool operator<=(const Color& src) const;
+
+ /// See operator<().
+ bool operator>(const Color& src) const;
+
+ /// See operator<().
+ bool operator>=(const Color& src) const;
+
+ /// See operator<().
+ bool operator==(const Color& src) const;
+
+ /// See operator<().
+ bool operator!=(const Color& src) const;
};
} // namespace Poppler
diff --git a/poppler-glib/src/fonts_iter.hg b/poppler-glib/src/fonts_iter.hg
index 7ca44e4..124ef17 100644
--- a/poppler-glib/src/fonts_iter.hg
+++ b/poppler-glib/src/fonts_iter.hg
@@ -54,6 +54,27 @@ class FontsIter
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const FontsIter& src) const;
+
+ /// See operator<().
+ bool operator<=(const FontsIter& src) const;
+
+ /// See operator<().
+ bool operator>(const FontsIter& src) const;
+
+ /// See operator<().
+ bool operator>=(const FontsIter& src) const;
+
+ /// See operator<().
+ bool operator==(const FontsIter& src) const;
+
+ /// See operator<().
+ bool operator!=(const FontsIter& src) const;
};
} // namespace Poppler
diff --git a/poppler-glib/src/index_iter.hg b/poppler-glib/src/index_iter.hg
index c513d5b..086c805 100644
--- a/poppler-glib/src/index_iter.hg
+++ b/poppler-glib/src/index_iter.hg
@@ -74,6 +74,27 @@ class IndexIter
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const IndexIter& src) const;
+
+ /// See operator<().
+ bool operator<=(const IndexIter& src) const;
+
+ /// See operator<().
+ bool operator>(const IndexIter& src) const;
+
+ /// See operator<().
+ bool operator>=(const IndexIter& src) const;
+
+ /// See operator<().
+ bool operator==(const IndexIter& src) const;
+
+ /// See operator<().
+ bool operator!=(const IndexIter& src) const;
};
} // namespace Poppler
diff --git a/poppler-glib/src/layers_iter.hg b/poppler-glib/src/layers_iter.hg
index 64df78f..bc44be0 100644
--- a/poppler-glib/src/layers_iter.hg
+++ b/poppler-glib/src/layers_iter.hg
@@ -48,6 +48,27 @@ class LayersIter
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const LayersIter& src) const;
+
+ /// See operator<().
+ bool operator<=(const LayersIter& src) const;
+
+ /// See operator<().
+ bool operator>(const LayersIter& src) const;
+
+ /// See operator<().
+ bool operator>=(const LayersIter& src) const;
+
+ /// See operator<().
+ bool operator==(const LayersIter& src) const;
+
+ /// See operator<().
+ bool operator!=(const LayersIter& src) const;
};
} // namespace Poppler
diff --git a/poppler-glib/src/page_transition.hg b/poppler-glib/src/page_transition.hg
index a0ea852..5d62d32 100644
--- a/poppler-glib/src/page_transition.hg
+++ b/poppler-glib/src/page_transition.hg
@@ -62,6 +62,27 @@ class PageTransition
* @endcode
*/
inline operator BoolExpr() const { return gobj() ? GINT_TO_POINTER(1) : 0; }
+
+ private:
+ /** Relational operators are deleted to prevent invalid conversion
+ * to const void*.
+ */
+ bool operator<(const PageTransition& src) const;
+
+ /// See operator<().
+ bool operator<=(const PageTransition& src) const;
+
+ /// See operator<().
+ bool operator>(const PageTransition& src) const;
+
+ /// See operator<().
+ bool operator>=(const PageTransition& src) const;
+
+ /// See operator<().
+ bool operator==(const PageTransition& src) const;
+
+ /// See operator<().
+ bool operator!=(const PageTransition& src) const;
};
} // namespace Poppler