[mlpack-svn] r10107 - mlpack/trunk/src/mlpack/core/io
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Nov 1 12:51:59 EDT 2011
Author: mamidon
Date: 2011-11-01 12:51:58 -0400 (Tue, 01 Nov 2011)
New Revision: 10107
Modified:
mlpack/trunk/src/mlpack/core/io/cli.hpp
mlpack/trunk/src/mlpack/core/io/cli_impl.hpp
mlpack/trunk/src/mlpack/core/io/cli_test.cpp
mlpack/trunk/src/mlpack/core/io/log.cpp
mlpack/trunk/src/mlpack/core/io/option.hpp
mlpack/trunk/src/mlpack/core/io/option_impl.hpp
mlpack/trunk/src/mlpack/core/io/optionshierarchy.cpp
mlpack/trunk/src/mlpack/core/io/prefixedoutstream.cpp
mlpack/trunk/src/mlpack/core/io/prefixedoutstream.hpp
Log:
Reformatted #includes according to new specifications.
Modified: mlpack/trunk/src/mlpack/core/io/cli.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/cli.hpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/cli.hpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -9,15 +9,16 @@
#ifndef __MLPACK_CORE_IO_CLI_HPP
#define __MLPACK_CORE_IO_CLI_HPP
-#include <boost/program_options.hpp>
-#include <boost/any.hpp>
+#include <list>
#include <iostream>
#include <map>
#include <string>
-#include <list>
+#include <boost/any.hpp>
+#include <boost/program_options.hpp>
+
+#include "cli_deleter.hpp" // To make sure we can delete the singleton.
#include "optionshierarchy.hpp"
-#include "cli_deleter.hpp" // To make sure we can delete the singleton.
/**
* Document an executable and set a default module. Only one
Modified: mlpack/trunk/src/mlpack/core/io/cli_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/cli_impl.hpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/cli_impl.hpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -4,10 +4,14 @@
*
* Implementation of templated functions of the CLI class.
*/
+#ifndef __MLPACK_CORE_IO_CLI_HPP
+#error "Do not include this file directly."
+#endif
+
#ifndef __MLPACK_CORE_IO_CLI_IMPL_HPP
#define __MLPACK_CORE_IO_CLI_IMPL_HPP
-// Include option.hpp here because it requires CLI but is also templated.
+//Include option.hpp here because it requires CLI but is also templated.
#include "option.hpp"
namespace mlpack {
Modified: mlpack/trunk/src/mlpack/core/io/cli_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/cli_test.cpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/cli_test.cpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -4,17 +4,19 @@
*
* Test for the CLI input parameter system.
*/
-#include "optionshierarchy.hpp"
-#include "cli.hpp"
-#include "log.hpp"
-#include <mlpack/core.h>
#include <iostream>
#include <sstream>
#include <sys/time.h>
+#include "optionshierarchy.hpp"
+#include "cli.hpp"
+#include "log.hpp"
+#include <mlpack/core.h>
+
#define DEFAULT_INT 42
+//Include unit tests down here since we just have to
#define BOOST_TEST_MODULE CLI_Test
#include <boost/test/unit_test.hpp>
Modified: mlpack/trunk/src/mlpack/core/io/log.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/log.cpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/log.cpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -4,9 +4,10 @@
*
* Implementation of the Log class.
*/
-#include "log.hpp"
#include <iostream>
+#include "log.hpp"
+
// Color code escape sequences.
#define BASH_RED "\033[0;31m"
#define BASH_GREEN "\033[0;32m"
Modified: mlpack/trunk/src/mlpack/core/io/option.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/option.hpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/option.hpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -10,6 +10,8 @@
#include <string>
+#include "cli.hpp"
+
namespace mlpack {
namespace io {
Modified: mlpack/trunk/src/mlpack/core/io/option_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/option_impl.hpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/option_impl.hpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -4,11 +4,13 @@
*
* Implementation of template functions for the Option class.
*/
+#ifndef __MLPACK_CORE_IO_OPTION_HPP
+#error "Do not include this file directly."
+#endif
+
#ifndef __MLPACK_CORE_IO_OPTION_IMPL_HPP
#define __MLPACK_CORE_IO_OPTION_IMPL_HPP
-#include "cli.hpp"
-
namespace mlpack {
namespace io {
Modified: mlpack/trunk/src/mlpack/core/io/optionshierarchy.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/optionshierarchy.cpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/optionshierarchy.cpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -4,11 +4,12 @@
*
* Implementation of OptionsHierarchy class.
*/
-#include "optionshierarchy.hpp"
+#include <iomanip>
+#include <iostream>
+
#include "cli.hpp"
#include "log.hpp"
-#include <iostream>
-#include <iomanip>
+#include "optionshierarchy.hpp"
using namespace std;
using namespace mlpack::io;
Modified: mlpack/trunk/src/mlpack/core/io/prefixedoutstream.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/prefixedoutstream.cpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/prefixedoutstream.cpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -5,14 +5,14 @@
*
* Implementation of PrefixedOutStream methods.
*/
-#include "prefixedoutstream.hpp"
-
#include <string>
#include <iostream>
#include <streambuf>
#include <string.h>
#include <stdlib.h>
+#include "prefixedoutstream.hpp"
+
using namespace mlpack::io;
/**
Modified: mlpack/trunk/src/mlpack/core/io/prefixedoutstream.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/io/prefixedoutstream.hpp 2011-11-01 16:19:45 UTC (rev 10106)
+++ mlpack/trunk/src/mlpack/core/io/prefixedoutstream.hpp 2011-11-01 16:51:58 UTC (rev 10107)
@@ -12,6 +12,7 @@
#include <iomanip>
#include <string>
#include <streambuf>
+
#include <boost/lexical_cast.hpp>
namespace mlpack {
More information about the mlpack-svn
mailing list