[mlpack-git] master: Update documentation for functionality change. (2916ec7)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Apr 9 19:08:10 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/367357985828e5a007b3b9ccf6c279e983cd7fad...a7fecec54b8437ccf34e0f9d5ec13ebbd943bca1
>---------------------------------------------------------------
commit 2916ec7b366eebb906ba26be00bfce1515d5e632
Author: ryan <ryan at ratml.org>
Date: Thu Apr 9 19:02:22 2015 -0400
Update documentation for functionality change.
>---------------------------------------------------------------
2916ec7b366eebb906ba26be00bfce1515d5e632
src/mlpack/core/util/prefixedoutstream.hpp | 18 ++++++++++--------
src/mlpack/core/util/prefixedoutstream_impl.hpp | 8 ++++----
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/mlpack/core/util/prefixedoutstream.hpp b/src/mlpack/core/util/prefixedoutstream.hpp
index 49a6f53..9f50bf9 100644
--- a/src/mlpack/core/util/prefixedoutstream.hpp
+++ b/src/mlpack/core/util/prefixedoutstream.hpp
@@ -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;
};
diff --git a/src/mlpack/core/util/prefixedoutstream_impl.hpp b/src/mlpack/core/util/prefixedoutstream_impl.hpp
index e90d766..855caa2 100644
--- a/src/mlpack/core/util/prefixedoutstream_impl.hpp
+++ b/src/mlpack/core/util/prefixedoutstream_impl.hpp
@@ -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");
}
More information about the mlpack-git
mailing list