11#ifndef OPENVDB_UTIL_FORMATS_HAS_BEEN_INCLUDED 
   12#define OPENVDB_UTIL_FORMATS_HAS_BEEN_INCLUDED 
   17#include <openvdb/version.h> 
   37    const std::string& head = 
"",
 
   38    const std::string& tail = 
"\n",
 
   39    bool exact = 
false, 
int width = 8, 
int precision = 3);
 
   52    const std::string& head = 
"",
 
   53    const std::string& tail = 
"\n",
 
   54    bool exact = 
true, 
int width = 8, 
int precision = 3);
 
   67    const std::string& head = 
"",
 
   68    const std::string& tail = 
"\n",
 
   69    int width = 4, 
int precision = 1, 
int verbose = 0);
 
   76template<
typename IntT>
 
   80    static char sep() { 
return ','; }
 
   84    std::ostream& 
put(std::ostream& os)
 const 
   87        std::ostringstream ostr;
 
   89        std::string s = ostr.str();
 
   91        size_t padding = (s.size() % 3) ? 3 - (s.size() % 3) : 0;
 
   92        s = std::string(padding, 
' ') + s;
 
   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());
 
 
 
  113template<
typename IntT>
 
  117template<
typename IntT>
 
OPENVDB_API std::ostream & operator<<(std::ostream &os, half h)
Output h to os, formatted as a float.
FormattedInt< IntT > formattedInt(IntT n)
Definition Formats.h:118
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)
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)
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)
Definition Exceptions.h:13
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:218