Remove unused or obsolete classes and files

This commit is contained in:
Vinnie Falco committed 2016-04-20 05:16:32 -04:00
1 parent d60426a19f
commit db8fb177b8
222 files changed
+108 -34423

No files matched your search

+99
View File
@@ -0,0 +1,99 @@
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#ifndef BEAST_UNIT_TEST_CONST_CONTAINER_H_INCLUDED
#define BEAST_UNIT_TEST_CONST_CONTAINER_H_INCLUDED
namespace beast {
/** Adapter to constrain a container interface.
The interface allows for limited read only operations. Derived classes
provide additional behavior.
*/
template <class Container>
class const_container
{
private:
using cont_type = Container;
cont_type m_cont;
protected:
cont_type& cont()
{
return m_cont;
}
cont_type const& cont() const
{
return m_cont;
}
public:
using value_type = typename cont_type::value_type;
using size_type = typename cont_type::size_type;
using difference_type = typename cont_type::difference_type;
using iterator = typename cont_type::const_iterator;
using const_iterator = typename cont_type::const_iterator;
/** Returns `true` if the container is empty. */
bool
empty() const
{
return m_cont.empty();
}
/** Returns the number of items in the container. */
size_type
size() const
{
return m_cont.size();
}
/** Returns forward iterators for traversal. */
/** @{ */
const_iterator
begin() const
{
return m_cont.cbegin();
}
const_iterator
cbegin() const
{
return m_cont.cbegin();
}
const_iterator
end() const
{
return m_cont.cend();
}
const_iterator
cend() const
{
return m_cont.cend();
}
/** @} */
};
} // beast
#endif
+1 -1
View File
@@ -20,7 +20,7 @@
#ifndef BEAST_UNIT_TEST_RESULTS_H_INCLUDED
#define BEAST_UNIT_TEST_RESULTS_H_INCLUDED
#include <beast/container/const_container.h>
#include <beast/unit_test/const_container.h>
#include <string>
#include <vector>
+1 -4
View File
@@ -21,11 +21,8 @@
#define BEAST_UNIT_TEST_SUITE_LIST_H_INCLUDED
#include <beast/unit_test/suite_info.h>
#include <beast/container/const_container.h>
#include <beast/unit_test/const_container.h>
#include <cassert>
//#include <list>
#include <typeindex>
#include <set>
#include <unordered_set>
+83
View File
@@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#ifndef BEAST_UNITTEST_TEMP_DIR_H_INCLUDED
#define BEAST_UNITTEST_TEMP_DIR_H_INCLUDED
#include <boost/filesystem.hpp>
#include <string>
namespace beast {
/** RAII temporary directory.
The directory and all its contents are deleted when
the instance of `temp_dir` is destroyed.
*/
class temp_dir
{
boost::filesystem::path path_;
public:
#if ! GENERATING_DOCS
temp_dir(const temp_dir&) = delete;
temp_dir& operator=(const temp_dir&) = delete;
#endif
/// Construct a temporary directory.
temp_dir()
{
auto const dir =
boost::filesystem::temp_directory_path();
do
{
path_ =
dir / boost::filesystem::unique_path();
}
while(boost::filesystem::exists(path_));
boost::filesystem::create_directory (path_);
}
/// Destroy a temporary directory.
~temp_dir()
{
boost::filesystem::remove_all (path_);
}
/// Get the native path for the temporary directory
std::string
path() const
{
return path_.string();
}
/** Get the native path for the a file.
The file does not need to exist.
*/
std::string
file(std::string const& name) const
{
return (path_ / name).string();
}
};
} // beast
#endif