Restructure repository to include all source folders

Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 20:17:20 +09:00
parent 5d3cd64a25
commit dd97ddec92
11602 changed files with 1446576 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// This file can be redistributed and/or modified under the terms found
// in "copyright.html"
// This software and its documentation is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_POOL_CT_GCD_LCM_HPP
#define BOOST_POOL_CT_GCD_LCM_HPP
#include <boost/static_assert.hpp>
#include <boost/type_traits/ice.hpp>
namespace boost {
namespace details {
namespace pool {
// Compile-time calculation of greatest common divisor and least common multiple
//
// ct_gcd is a compile-time algorithm that calculates the greatest common
// divisor of two unsigned integers, using Euclid's algorithm.
//
// assumes: A != 0 && B != 0
//
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace details {
template <unsigned A, unsigned B, bool Bis0>
struct ct_gcd_helper;
template <unsigned A, unsigned B>
struct ct_gcd_helper<A, B, false>
{
BOOST_STATIC_CONSTANT(unsigned, A_mod_B_ = A % B);
BOOST_STATIC_CONSTANT(unsigned, value =
(::boost::details::pool::details::ct_gcd_helper<
B, static_cast<unsigned>(A_mod_B_),
::boost::type_traits::ice_eq<A_mod_B_, 0>::value
>::value) );
};
template <unsigned A, unsigned B>
struct ct_gcd_helper<A, B, true>
{
BOOST_STATIC_CONSTANT(unsigned, value = A);
};
} // namespace details
template <unsigned A, unsigned B>
struct ct_gcd
{
BOOST_STATIC_ASSERT(A != 0 && B != 0);
BOOST_STATIC_CONSTANT(unsigned, value =
(::boost::details::pool::details::ct_gcd_helper<A, B, false>::value) );
};
#else
// Thanks to Peter Dimov for providing this workaround!
namespace details {
template<unsigned A> struct ct_gcd2
{
template<unsigned B>
struct helper
{
BOOST_STATIC_CONSTANT(unsigned, value = ct_gcd2<B>::helper<A % B>::value);
};
template<>
struct helper<0>
{
BOOST_STATIC_CONSTANT(unsigned, value = A);
};
};
} // namespace details
template<unsigned A, unsigned B> struct ct_gcd
{
BOOST_STATIC_ASSERT(A != 0 && B != 0);
enum { value = details::ct_gcd2<A>::helper<B>::value };
};
#endif
//
// ct_lcm is a compile-time algorithm that calculates the least common
// multiple of two unsigned integers.
//
// assumes: A != 0 && B != 0
//
template <unsigned A, unsigned B>
struct ct_lcm
{
BOOST_STATIC_CONSTANT(unsigned, value =
(A / ::boost::details::pool::ct_gcd<A, B>::value * B) );
};
} // namespace pool
} // namespace details
} // namespace boost
#endif

View File

@@ -0,0 +1,59 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// This file can be redistributed and/or modified under the terms found
// in "copyright.html"
// This software and its documentation is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_POOL_GCD_LCM_HPP
#define BOOST_POOL_GCD_LCM_HPP
namespace boost {
namespace details {
namespace pool {
// Greatest common divisor and least common multiple
//
// gcd is an algorithm that calculates the greatest common divisor of two
// integers, using Euclid's algorithm.
//
// Pre: A > 0 && B > 0
// Recommended: A > B
template <typename Integer>
Integer gcd(Integer A, Integer B)
{
do
{
const Integer tmp(B);
B = A % B;
A = tmp;
} while (B != 0);
return A;
}
//
// lcm is an algorithm that calculates the least common multiple of two
// integers.
//
// Pre: A > 0 && B > 0
// Recommended: A > B
template <typename Integer>
Integer lcm(const Integer & A, const Integer & B)
{
Integer ret = A;
ret /= gcd(A, B);
ret *= B;
return ret;
}
} // namespace pool
} // namespace details
} // namespace boost
#endif

View File

@@ -0,0 +1,41 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// This file can be redistributed and/or modified under the terms found
// in "copyright.html"
// This software and its documentation is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_POOL_GUARD_HPP
#define BOOST_POOL_GUARD_HPP
// Extremely Light-Weight guard glass
namespace boost {
namespace details {
namespace pool {
template <typename Mutex>
class guard
{
private:
Mutex & mtx;
guard(const guard &);
void operator=(const guard &);
public:
explicit guard(Mutex & nmtx)
:mtx(nmtx) { mtx.lock(); }
~guard() { mtx.unlock(); }
};
} // namespace pool
} // namespace details
} // namespace boost
#endif

View File

@@ -0,0 +1,141 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// This file can be redistributed and/or modified under the terms found
// in "copyright.html"
// This software and its documentation is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_POOL_MUTEX_HPP
#define BOOST_POOL_MUTEX_HPP
// Extremely Light-Weight wrapper classes for OS thread synchronization
// Configuration: for now, we just choose between pthread or Win32 mutexes or none
#define BOOST_MUTEX_HELPER_NONE 0
#define BOOST_MUTEX_HELPER_WIN32 1
#define BOOST_MUTEX_HELPER_PTHREAD 2
#ifdef WIN32
#ifndef __WIN32__
#define __WIN32__
#endif
#endif
#ifdef BOOST_NO_MT
// No multithreading -> make locks into no-ops
#define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_NONE
#else
#ifdef __WIN32__
#define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_WIN32
#else
#include <unistd.h>
#ifdef _POSIX_THREADS
#define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_PTHREAD
#endif
#endif
#endif
#ifndef BOOST_MUTEX_HELPER
#error Unable to determine platform mutex type; define BOOST_NO_MT to assume single-threaded
#endif
#ifdef __WIN32__
#include <windows.h>
#endif
#ifdef _POSIX_THREADS
#include <pthread.h>
#endif
namespace boost {
namespace details {
namespace pool {
#ifdef __WIN32__
class win32_mutex
{
private:
CRITICAL_SECTION mtx;
win32_mutex(const win32_mutex &);
void operator=(const win32_mutex &);
public:
win32_mutex()
{ InitializeCriticalSection(&mtx); }
~win32_mutex()
{ DeleteCriticalSection(&mtx); }
void lock()
{ EnterCriticalSection(&mtx); }
void unlock()
{ LeaveCriticalSection(&mtx); }
};
#endif // defined(__WIN32__)
#ifdef _POSIX_THREADS
class pthread_mutex
{
private:
pthread_mutex_t mtx;
pthread_mutex(const pthread_mutex &);
void operator=(const pthread_mutex &);
public:
pthread_mutex()
{ pthread_mutex_init(&mtx, 0); }
~pthread_mutex()
{ pthread_mutex_destroy(&mtx); }
void lock()
{ pthread_mutex_lock(&mtx); }
void unlock()
{ pthread_mutex_unlock(&mtx); }
};
#endif // defined(_POSIX_THREADS)
class null_mutex
{
private:
null_mutex(const null_mutex &);
void operator=(const null_mutex &);
public:
null_mutex() { }
static void lock() { }
static void unlock() { }
};
#if BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_NONE
typedef null_mutex default_mutex;
#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_WIN32
typedef win32_mutex default_mutex;
#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_PTHREAD
typedef pthread_mutex default_mutex;
#endif
} // namespace pool
} // namespace details
} // namespace boost
#undef BOOST_MUTEX_HELPER_WIN32
#undef BOOST_MUTEX_HELPER_PTHREAD
#undef BOOST_MUTEX_HELPER_NONE
#undef BOOST_MUTEX_HELPER
#endif

View File

@@ -0,0 +1,858 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// Permission to copy, use, and distribute this software is granted, provided
// that this copyright notice appears in all copies.
// Permission to modify the code and to distribute modified code is granted,
// provided that this copyright notice appears in all copies, and a notice
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty, and
// with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
// This file was AUTOMATICALLY GENERATED from "pool_c~1.m4"
// Do NOT include directly!
// Do NOT edit!
template <typename T0>
element_type * construct(T0 & a0)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0>
element_type * construct(const T0 & a0)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0>
element_type * construct(volatile T0 & a0)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0>
element_type * construct(const volatile T0 & a0)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(T0 & a0, T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const T0 & a0, T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(volatile T0 & a0, T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const volatile T0 & a0, T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(T0 & a0, const T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const T0 & a0, const T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(volatile T0 & a0, const T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const volatile T0 & a0, const T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(T0 & a0, volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const T0 & a0, volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(volatile T0 & a0, volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const volatile T0 & a0, volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(T0 & a0, const volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const T0 & a0, const volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(volatile T0 & a0, const volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const volatile T0 & a0, const volatile T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const volatile T1 & a1, T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const volatile T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const volatile T1 & a1, volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(volatile T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const volatile T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}

View File

@@ -0,0 +1,44 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// This file can be redistributed and/or modified under the terms found
// in "copyright.html"
// This software and its documentation is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
// This file was AUTOMATICALLY GENERATED from "stdin"
// Do NOT include directly!
// Do NOT edit!
template <typename T0>
element_type * construct(const T0 & a0)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1>
element_type * construct(const T0 & a0, const T1 & a1)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1); }
catch (...) { free(ret); throw; }
return ret;
}
template <typename T0, typename T1, typename T2>
element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2)
{
element_type * const ret = malloc();
if (ret == 0)
return ret;
try { new (ret) element_type(a0, a1, a2); }
catch (...) { free(ret); throw; }
return ret;
}

View File

@@ -0,0 +1,108 @@
// Copyright (C) 2000 Stephen Cleary (shammah@voyager.net)
//
// This file can be redistributed and/or modified under the terms found
// in "copyright.html"
// This software and its documentation is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_POOL_SINGLETON_HPP
#define BOOST_POOL_SINGLETON_HPP
// The following code might be put into some Boost.Config header in a later revision
#ifdef __BORLANDC__
# pragma option push -w-inl
#endif
//
// The following helper classes are placeholders for a generic "singleton"
// class. The classes below support usage of singletons, including use in
// program startup/shutdown code, AS LONG AS there is only one thread
// running before main() begins, and only one thread running after main()
// exits.
//
// This class is also limited in that it can only provide singleton usage for
// classes with default constructors.
//
// The design of this class is somewhat twisted, but can be followed by the
// calling inheritance. Let us assume that there is some user code that
// calls "singleton_default<T>::instance()". The following (convoluted)
// sequence ensures that the same function will be called before main():
// instance() contains a call to create_object.do_nothing()
// Thus, object_creator is implicitly instantiated, and create_object
// must exist.
// Since create_object is a static member, its constructor must be
// called before main().
// The constructor contains a call to instance(), thus ensuring that
// instance() will be called before main().
// The first time instance() is called (i.e., before main()) is the
// latest point in program execution where the object of type T
// can be created.
// Thus, any call to instance() will auto-magically result in a call to
// instance() before main(), unless already present.
// Furthermore, since the instance() function contains the object, instead
// of the singleton_default class containing a static instance of the
// object, that object is guaranteed to be constructed (at the latest) in
// the first call to instance(). This permits calls to instance() from
// static code, even if that code is called before the file-scope objects
// in this file have been initialized.
namespace boost {
namespace details {
namespace pool {
// T must be: no-throw default constructible and no-throw destructible
template <typename T>
struct singleton_default
{
private:
struct object_creator
{
// This constructor does nothing more than ensure that instance()
// is called before main() begins, thus creating the static
// T object before multithreading race issues can come up.
object_creator() { singleton_default<T>::instance(); }
inline void do_nothing() const { }
};
static object_creator create_object;
singleton_default();
public:
typedef T object_type;
// If, at any point (in user code), singleton_default<T>::instance()
// is called, then the following function is instantiated.
static object_type & instance()
{
// This is the object that we return a reference to.
// It is guaranteed to be created before main() begins because of
// the next line.
static object_type obj;
// The following line does nothing else than force the instantiation
// of singleton_default<T>::create_object, whose constructor is
// called before main() begins.
create_object.do_nothing();
return obj;
}
};
template <typename T>
typename singleton_default<T>::object_creator
singleton_default<T>::create_object;
} // namespace pool
} // namespace details
} // namespace boost
// The following code might be put into some Boost.Config header in a later revision
#ifdef __BORLANDC__
# pragma option pop
#endif
#endif