Update documentation for functionality change.

This commit is contained in:
ryan
2015-04-09 19:08:02 -04:00
parent 3673579858
commit 2916ec7b36
2 changed files with 14 additions and 12 deletions
+10 -8
View File
@@ -56,8 +56,9 @@ class PrefixedOutStream
*
* @param destination ostream which receives output from this object.
* @param prefix The prefix to prepend to each line.
* @param ignoreInput if true the stream will not be printed
* @param fatal is true program will exit after printing a line
* @param ignoreInput If true, the stream will not be printed.
* @param fatal If true, a std::runtime_error exception is thrown after
* printing a newline.
*/
PrefixedOutStream(std::ostream& destination,
const char* prefix,
@@ -120,14 +121,14 @@ class PrefixedOutStream
private:
HAS_MEM_FUNC(ToString, HasToString)
//! This handles forwarding all primitive types transparently
//! This handles forwarding all primitive types transparently.
template<typename T>
void CallBaseLogic(const T& s,
typename boost::disable_if<
boost::is_class<T>
>::type* = 0);
//! Forward all objects that do not implement a ToString() method
//! Forward all objects that do not implement a ToString() method.
template<typename T>
void CallBaseLogic(const T& s,
typename boost::enable_if<
@@ -137,7 +138,8 @@ class PrefixedOutStream
HasToString<T, std::string(T::*)() const>
>::type* = 0);
//! Call ToString() on all objects that implement ToString() before forwarding
//! Call ToString() on all objects that implement ToString() before
//! forwarding.
template<typename T>
void CallBaseLogic(const T& s,
typename boost::enable_if<
@@ -148,8 +150,8 @@ class PrefixedOutStream
>::type* = 0);
/**
* @brief Conducts the base logic required in all the operator << overloads.
* Mostly just a good idea to reduce copy-pasta.
* Conducts the base logic required in all the operator << overloads. Mostly
* just a good idea to reduce copy-pasta.
*
* @tparam T The type of the data to output.
* @param val The The data to be output.
@@ -169,7 +171,7 @@ class PrefixedOutStream
//! will be necessary.
bool carriageReturned;
//! If true, the application will terminate with an error code when a CR is
//! If true, a std::runtime_error exception will be thrown when a CR is
//! encountered.
bool fatal;
};
@@ -22,7 +22,7 @@ PrefixedOutStream& PrefixedOutStream::operator<<(const T& s)
return *this;
}
//! This handles forwarding all primitive types transparently
//! This handles forwarding all primitive types transparently.
template<typename T>
void PrefixedOutStream::CallBaseLogic(const T& s,
typename boost::disable_if<
@@ -32,7 +32,7 @@ void PrefixedOutStream::CallBaseLogic(const T& s,
BaseLogic<T>(s);
}
// Forward all objects that do not implement a ToString() method transparently
// Forward all objects that do not implement a ToString() method transparently.
template<typename T>
void PrefixedOutStream::CallBaseLogic(const T& s,
typename boost::enable_if<
@@ -45,7 +45,7 @@ void PrefixedOutStream::CallBaseLogic(const T& s,
BaseLogic<T>(s);
}
// Call ToString() on all objects that implement ToString() before forwarding
// Call ToString() on all objects that implement ToString() before forwarding.
template<typename T>
void PrefixedOutStream::CallBaseLogic(const T& s,
typename boost::enable_if<
@@ -128,7 +128,7 @@ void PrefixedOutStream::BaseLogic(const T& val)
}
}
// If we displayed a newline and we need to terminate afterwards, do that.
// If we displayed a newline and we need to throw afterwards, do that.
if (fatal && newlined)
throw std::runtime_error("fatal error; see Log::Fatal output");
}