11 #ifndef OPENVDB_UTIL_FORMATS_HAS_BEEN_INCLUDED
12 #define OPENVDB_UTIL_FORMATS_HAS_BEEN_INCLUDED
66 printTime(std::ostream& os,
double milliseconds,
76 template<
typename IntT>
80 static char sep() {
return ','; }
84 std::ostream&
put(std::ostream& os)
const
87 std::ostringstream ostr;
91 size_t padding = (s.size() % 3) ? 3 - (s.size() % 3) : 0;
96 for (
size_t i = 0,
N = s.size(); i <
N; ) {
99 if (i >= padding && i % 3 == 0 && i < s.size()) {
105 os << s.substr(padding, s.size());
113 template<
typename IntT>
114 std::ostream& operator<<(std::ostream& os, const FormattedInt<IntT>&
n) {
return n.put(os); }
117 template<
typename IntT>
124 #endif // OPENVDB_UTIL_FORMATS_HAS_BEEN_INCLUDED
OPENVDB_API int printTime(std::ostream &os, double milliseconds, const std::string &head="", const std::string &tail="\n", int width=4, int precision=1, int verbose=0)
UT_StringArray JOINTS head
GLsizei const GLchar *const * string
#define OPENVDB_USE_VERSION_NAMESPACE
OPENVDB_API int printNumber(std::ostream &os, uint64_t number, const std::string &head="", const std::string &tail="\n", bool exact=true, int width=8, int precision=3)
GLenum GLint GLint * precision
Library and file format version numbers.
GA_API const UT_StringHolder N
FormattedInt< IntT > formattedInt(IntT n)
OPENVDB_API int printBytes(std::ostream &os, uint64_t bytes, const std::string &head="", const std::string &tail="\n", bool exact=false, int width=8, int precision=3)
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.