11 #ifndef PRIMATOLOGIST_UTILITY_TRACE_H
12 #define PRIMATOLOGIST_UTILITY_TRACE_H
15 #include <cartobase/type/string_conversion.h>
32 std::ostream &
operator<< ( std::ostream & out,
const std::vector<T> & v )
34 typename std::vector<T>::const_iterator i = v.begin();
35 out <<
"( " << std::flush;
36 for( ; i != v.end(); ++i )
37 out << *i <<
", " << std::flush;
38 out <<
"\b\b )" << std::flush;
48 int lfill = ( 25 -
message.size() ) / 2;
49 if( lfill < 0 ) lfill = 0;
50 std::cout << std::endl;
51 std::cout << std::string( 25,
'-' ) << std::endl;
52 std::cout << std::setw(25)
54 << std::string( lfill,
' ' ) +
message
56 std::cout << std::string( 25,
'-' ) << std::endl;
59 std::cout <<
message << std::endl;
63 void setOutColor(
const std::string & color =
"black",
bool light =
false );
std::ostream & operator<<(std::ostream &out, const std::vector< T > &v)
void message(const std::string &message, bool header, bool doit=true)
void setOutColor(const std::string &color="black", bool light=false)