From 6fc0d8f608d7cfe0ef325cf6e91e7f70059e2eb4 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 1 Sep 2013 13:15:04 -0400 Subject: [PATCH] Moved python C++ utility headers into dlib/python and updated #include statements to reflect this move. --HG-- rename : tools/python/src/boost_python_utils.h => dlib/python/boost_python_utils.h rename : tools/python/src/pyassert.h => dlib/python/pyassert.h rename : tools/python/src/serialize_pickle.h => dlib/python/serialize_pickle.h --- dlib/python.h | 12 ++++++++++++ .../python/src => dlib/python}/boost_python_utils.h | 2 ++ {tools/python/src => dlib/python}/pyassert.h | 0 {tools/python/src => dlib/python}/serialize_pickle.h | 0 tools/python/src/basic.cpp | 4 +--- tools/python/src/cca.cpp | 3 +-- tools/python/src/decision_functions.cpp | 3 +-- tools/python/src/matrix.cpp | 4 +--- tools/python/src/other.cpp | 5 ++--- tools/python/src/sequence_segmenter.cpp | 4 +--- tools/python/src/svm_c_trainer.cpp | 4 +--- tools/python/src/svm_rank_trainer.cpp | 4 +--- tools/python/src/svm_struct.cpp | 4 +--- tools/python/src/vector.cpp | 3 +-- 14 files changed, 25 insertions(+), 27 deletions(-) create mode 100644 dlib/python.h rename {tools/python/src => dlib/python}/boost_python_utils.h (97%) rename {tools/python/src => dlib/python}/pyassert.h (100%) rename {tools/python/src => dlib/python}/serialize_pickle.h (100%) diff --git a/dlib/python.h b/dlib/python.h new file mode 100644 index 000000000..1f0c0bf8e --- /dev/null +++ b/dlib/python.h @@ -0,0 +1,12 @@ +// Copyright (C) 2013 Davis E. King (davis@dlib.net) +// License: Boost Software License See LICENSE.txt for the full license. +#ifndef DLIB_PYTHoN_TOP_ +#define DLIB_PYTHoN_TOP_ + +#include "python/boost_python_utils.h" +#include "python/pyassert.h" +#include "python/serialize_pickle.h" + +#endif // DLIB_PYTHoN_TOP_ + + diff --git a/tools/python/src/boost_python_utils.h b/dlib/python/boost_python_utils.h similarity index 97% rename from tools/python/src/boost_python_utils.h rename to dlib/python/boost_python_utils.h index 70691e036..33989ddb7 100644 --- a/tools/python/src/boost_python_utils.h +++ b/dlib/python/boost_python_utils.h @@ -4,6 +4,8 @@ #define DLIB_BOOST_PYTHON_UtILS_H__ #include +#include +#include inline bool hasattr( boost::python::object obj, diff --git a/tools/python/src/pyassert.h b/dlib/python/pyassert.h similarity index 100% rename from tools/python/src/pyassert.h rename to dlib/python/pyassert.h diff --git a/tools/python/src/serialize_pickle.h b/dlib/python/serialize_pickle.h similarity index 100% rename from tools/python/src/serialize_pickle.h rename to dlib/python/serialize_pickle.h diff --git a/tools/python/src/basic.cpp b/tools/python/src/basic.cpp index 786355b6c..3511f93a8 100644 --- a/tools/python/src/basic.cpp +++ b/tools/python/src/basic.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include #include @@ -10,8 +10,6 @@ #include #include -#include "serialize_pickle.h" -#include "pyassert.h" using namespace std; using namespace dlib; diff --git a/tools/python/src/cca.cpp b/tools/python/src/cca.cpp index 6d83e7838..a56472a89 100644 --- a/tools/python/src/cca.cpp +++ b/tools/python/src/cca.cpp @@ -1,10 +1,9 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include -#include "pyassert.h" #include using namespace dlib; diff --git a/tools/python/src/decision_functions.cpp b/tools/python/src/decision_functions.cpp index a0a33121e..2a37beafb 100644 --- a/tools/python/src/decision_functions.cpp +++ b/tools/python/src/decision_functions.cpp @@ -1,10 +1,9 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. +#include #include "testing_results.h" -#include #include -#include "serialize_pickle.h" #include #include diff --git a/tools/python/src/matrix.cpp b/tools/python/src/matrix.cpp index 9fbbb0f29..d0b699398 100644 --- a/tools/python/src/matrix.cpp +++ b/tools/python/src/matrix.cpp @@ -1,13 +1,11 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include #include -#include "serialize_pickle.h" #include -#include "pyassert.h" using namespace dlib; using namespace boost::python; diff --git a/tools/python/src/other.cpp b/tools/python/src/other.cpp index b4bfa2bc3..c722aa18d 100644 --- a/tools/python/src/other.cpp +++ b/tools/python/src/other.cpp @@ -1,14 +1,13 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include + +#include #include #include #include #include #include -#include "pyassert.h" #include -#include "boost_python_utils.h" using namespace dlib; using namespace std; diff --git a/tools/python/src/sequence_segmenter.cpp b/tools/python/src/sequence_segmenter.cpp index 1b6b166e4..598cc7260 100644 --- a/tools/python/src/sequence_segmenter.cpp +++ b/tools/python/src/sequence_segmenter.cpp @@ -1,12 +1,10 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include -#include "serialize_pickle.h" #include -#include "pyassert.h" #include #include diff --git a/tools/python/src/svm_c_trainer.cpp b/tools/python/src/svm_c_trainer.cpp index 32166287a..19348a4e8 100644 --- a/tools/python/src/svm_c_trainer.cpp +++ b/tools/python/src/svm_c_trainer.cpp @@ -1,13 +1,11 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. +#include #include "testing_results.h" -#include #include #include -#include "serialize_pickle.h" #include -#include "pyassert.h" #include using namespace dlib; diff --git a/tools/python/src/svm_rank_trainer.cpp b/tools/python/src/svm_rank_trainer.cpp index 479f2e27b..936dd7b10 100644 --- a/tools/python/src/svm_rank_trainer.cpp +++ b/tools/python/src/svm_rank_trainer.cpp @@ -1,12 +1,10 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include -#include "serialize_pickle.h" #include -#include "pyassert.h" #include #include "testing_results.h" #include diff --git a/tools/python/src/svm_struct.cpp b/tools/python/src/svm_struct.cpp index ae44d7687..1e502711f 100644 --- a/tools/python/src/svm_struct.cpp +++ b/tools/python/src/svm_struct.cpp @@ -1,11 +1,9 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include -#include "pyassert.h" -#include "boost_python_utils.h" #include diff --git a/tools/python/src/vector.cpp b/tools/python/src/vector.cpp index 067934399..15a3d271b 100644 --- a/tools/python/src/vector.cpp +++ b/tools/python/src/vector.cpp @@ -1,10 +1,9 @@ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. -#include +#include #include #include -#include "serialize_pickle.h" #include