@@ -67,7 +67,9 @@ static inline bool operator>=(const Size &lhs, const Size &rhs)
return !(lhs < rhs);
}
-struct SizeRange {
+class SizeRange
+{
+public:
SizeRange()
{
}
@@ -90,6 +92,8 @@ struct SizeRange {
{
}
+ std::string toString() const;
+
Size min;
Size max;
unsigned int hStep;
@@ -266,6 +266,20 @@ bool operator<(const Size &lhs, const Size &rhs)
* \brief The vertical step
*/
+/**
+ * \brief Assemble and return a string describing the size range
+ * \return A string describing the SizeRange
+ */
+std::string SizeRange::toString() const
+{
+ std::stringstream ss;
+
+ ss << "(" << min.toString() << ")-(" << max.toString() << ")/(+"
+ << hStep << ",+" << vStep << ")";
+
+ return ss.str();
+}
+
/**
* \brief Compare size ranges for equality
* \return True if the two size ranges are equal, false otherwise