mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 16:51:21 -06:00
Initial work for G-code sender and more intensive usage of Boost
This commit is contained in:
parent
43cbad8867
commit
11dd67ab34
1649 changed files with 1860 additions and 1642 deletions
74
xs/include/boost/test/utils/trivial_singleton.hpp
Normal file
74
xs/include/boost/test/utils/trivial_singleton.hpp
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
// (C) Copyright Gennadiy Rozental 2005-2008.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/test for the library home page.
|
||||
//
|
||||
// File : $RCSfile$
|
||||
//
|
||||
// Version : $Revision: 49312 $
|
||||
//
|
||||
// Description : simple helpers for creating cusom output manipulators
|
||||
// ***************************************************************************
|
||||
|
||||
#ifndef BOOST_TEST_TRIVIAL_SIGNLETON_HPP_020505GER
|
||||
#define BOOST_TEST_TRIVIAL_SIGNLETON_HPP_020505GER
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <boost/test/detail/suppress_warnings.hpp>
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace unit_test {
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** singleton ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
template<typename Derived>
|
||||
class singleton : private boost::noncopyable {
|
||||
public:
|
||||
static Derived& instance() { static Derived the_inst; return the_inst; }
|
||||
protected:
|
||||
singleton() {}
|
||||
~singleton() {}
|
||||
};
|
||||
|
||||
} // namespace unit_test
|
||||
|
||||
#define BOOST_TEST_SINGLETON_CONS( type ) \
|
||||
friend class boost::unit_test::singleton<type>; \
|
||||
type() {} \
|
||||
/**/
|
||||
|
||||
#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
|
||||
|
||||
#define BOOST_TEST_SINGLETON_INST( inst ) \
|
||||
template class unit_test::singleton< BOOST_JOIN( inst, _t ) > ; \
|
||||
namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
|
||||
|
||||
#elif defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ < 4
|
||||
#define BOOST_TEST_SINGLETON_INST( inst ) \
|
||||
static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN (inst, _t)::instance();
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_TEST_SINGLETON_INST( inst ) \
|
||||
namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
#include <boost/test/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // BOOST_TEST_TRIVIAL_SIGNLETON_HPP_020505GER
|
||||
Loading…
Add table
Add a link
Reference in a new issue