summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHan-Lin Chen <hanlinchen@chromium.org>2022-04-19 20:42:19 +0800
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-22 00:38:50 +0300
commitc730dc74795d6a603ac9f725c081ff07ed70ee35 (patch)
treed7a71fb20c18575f2bdde6c036972d751038a2a4 /include
parentdd8b1723ac56580600ada71d670d5c01ce9eedf7 (diff)
libcamera: geometry: Add operator<< for classes in geometry
Add operator<< for geometry classes for easier logging. Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/geometry.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h
index 7838b679..d4a144bc 100644
--- a/include/libcamera/geometry.h
+++ b/include/libcamera/geometry.h
@@ -46,6 +46,8 @@ static inline bool operator!=(const Point &lhs, const Point &rhs)
return !(lhs == rhs);
}
+std::ostream &operator<<(std::ostream &out, const Point &p);
+
class Size
{
public:
@@ -192,6 +194,8 @@ static inline bool operator>=(const Size &lhs, const Size &rhs)
return !(lhs < rhs);
}
+std::ostream &operator<<(std::ostream &out, const Size &s);
+
class SizeRange
{
public:
@@ -232,6 +236,8 @@ static inline bool operator!=(const SizeRange &lhs, const SizeRange &rhs)
return !(lhs == rhs);
}
+std::ostream &operator<<(std::ostream &out, const SizeRange &sr);
+
class Rectangle
{
public:
@@ -291,4 +297,6 @@ static inline bool operator!=(const Rectangle &lhs, const Rectangle &rhs)
return !(lhs == rhs);
}
+std::ostream &operator<<(std::ostream &out, const Rectangle &r);
+
} /* namespace libcamera */