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>
This commit is contained in:
committed by
Laurent Pinchart
parent
dd8b1723ac
commit
c730dc7479
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user