12 #ifndef __ROP_Verbose__
13 #define __ROP_Verbose__
29 : myStream(s.myStream),
47 bool isValid()
const {
return myStream != NULL; }
57 {
return myStream && level <= myLevel; }
62 myStream = s.myStream;
64 myAlfred = s.myAlfred;
79 std::ostream *
getStream()
const {
return myStream; }
98 if (myStream && myAlfred)
101 pct =
SYSclamp((
int)(percent*100 + 0.5), 0, 100);
102 *myStream <<
"ALF_PROGRESS " << pct <<
"%\n";
115 std::ostream *myStream;
void setAlfred(bool flag=true)
bool isLevel(int level) const
void setStream(std::ostream *s)
void clear()
Clear (i.e. set the stream to null & clear levels.
ROP_Verbose(std::ostream *os=NULL)
void setFrom(const ROP_Verbose *s)
Copy from a source verbose or clear if the source is NULL.
UT_Vector3T< T > SYSclamp(const UT_Vector3T< T > &v, const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
ROP_Verbose & operator=(const ROP_Verbose &s)
Assignment operator.
bool isValid() const
Check to see if the stream is valid.
void showProgress(fpreal percent) const
Print out progress (percent should be 0-1)
std::ostream * getStream() const
ROP_Verbose(const ROP_Verbose &s)
void showProgress(int current, int total) const
Print out progress based on counts.