From 67fa7e61c3e520326833078849e75bd488daec8d Mon Sep 17 00:00:00 2001 From: frank Date: Thu, 27 Jul 2023 23:21:14 -0400 Subject: [PATCH] docstring example for outputting attributes to stream --- src/Attributes.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Attributes.cpp b/src/Attributes.cpp index 4d6592f..5a14074 100644 --- a/src/Attributes.cpp +++ b/src/Attributes.cpp @@ -249,6 +249,19 @@ void sb::Attributes::extend(const Attributes& other, std::size_t count) } } +/*! + * Add string representation of attributes to output stream, truncated to at most 8 vertices. + * + * sb::Attributes attr {{0, 0}, {5, 0}, {5, 5}, {0, 5}}; + * std::cout << attr << std::endl; + * sb::Attributes attr2 {{0, 0}, {5, 0}, {5, 5}, {0, 5}, {0, 0}, {5, 0}, {5, 5}, {0, 5}}; + * std::cout << attr2 << std::endl; + * sb::Attributes attr3 {{0, 0}, {5, 0}, {5, 5}, {0, 5}, {0, 0}, {5, 0}, {5, 5}, {0, 5}, {-5, -5}}; + * std::cout << attr3 << std::endl; + * // + * // + * // + */ std::ostream& sb::operator<<(std::ostream& out, const sb::Attributes& attributes) { out << "