Initial Commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
subroutine peakdt9(c2,nsps8,nspsd,c3,xdt)
|
||||
|
||||
parameter (NZ2=1512,NZ3=1360)
|
||||
complex c2(0:NZ2-1)
|
||||
complex c3(0:NZ3-1)
|
||||
complex z
|
||||
real p(0:3300)
|
||||
include 'jt9sync.f90'
|
||||
|
||||
p=0.
|
||||
i0=5*nspsd
|
||||
do i=0,NZ2-1
|
||||
z=1.e-3*sum(c2(max(i-(nspsd-1),0):i))
|
||||
p(i0+i)=real(z)**2 + aimag(z)**2 !Integrated symbol power at freq=0
|
||||
enddo
|
||||
|
||||
call getlags(nsps8,lag0,lag1,lag2)
|
||||
tsymbol=nsps8/1500.0
|
||||
dtlag=tsymbol/nspsd
|
||||
smax=0.
|
||||
lagpk=0
|
||||
do lag=lag1,lag2
|
||||
sum0=0.
|
||||
sum1=0.
|
||||
j=-nspsd
|
||||
do i=1,85
|
||||
j=j+nspsd
|
||||
if(isync(i).eq.1) then
|
||||
sum1=sum1+p(j+lag)
|
||||
else
|
||||
sum0=sum0+p(j+lag)
|
||||
endif
|
||||
enddo
|
||||
ss=(sum1/16.0)/(sum0/69.0) - 1.0
|
||||
xdt=(lag-lag0)*dtlag
|
||||
if(ss.gt.smax) then
|
||||
smax=ss
|
||||
lagpk=lag
|
||||
endif
|
||||
enddo
|
||||
|
||||
xdt=(lagpk-lag0)*dtlag
|
||||
|
||||
do i=0,NZ3-1
|
||||
j=i+lagpk-i0-nspsd+1
|
||||
if(j.ge.0 .and. j.lt.NZ2) then
|
||||
c3(i)=c2(j)
|
||||
else
|
||||
c3(i)=0.
|
||||
endif
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine peakdt9
|
||||
@@ -0,0 +1,34 @@
|
||||
<table cellspacing=1>
|
||||
<tr><td><b>F1 </b></td><td>Online User's Guide</td></tr>
|
||||
<tr><td><b>Ctrl+F1 </b></td><td>About WSJT-X</td></tr>
|
||||
<tr><td><b>F2 </b></td><td>Open configuration window</td></tr>
|
||||
<tr><td><b>F3 </b></td><td>Display keyboard shortcuts</td></tr>
|
||||
<tr><td><b>F4 </b></td><td>Clear DX Call, DX Grid, Tx messages 1-5</td></tr>
|
||||
<tr><td><b>Alt+F4 </b></td><td>Exit program</td></tr>
|
||||
<tr><td><b>F5 </b></td><td>Display special mouse commands</td></tr>
|
||||
<tr><td><b>F6 </b></td><td>Open next file in directory</td></tr>
|
||||
<tr><td><b>F7 </b></td><td>Display Message Averaging window</td></tr>
|
||||
<tr><td><b>Shift+F6 </b></td><td>Decode all remaining files in directrory</td></tr>
|
||||
<tr><td><b>F11 </b></td><td>Move Rx frequency down 1 Hz</td></tr>
|
||||
<tr><td><b>Ctrl+F11 </b></td><td>Move Rx and Tx frequencies down 1 Hz</td></tr>
|
||||
<tr><td><b>F12 </b></td><td>Move Rx frequency up 1 Hz</td></tr>
|
||||
<tr><td><b>Ctrl+F12 </b></td><td>Move Rx and Tx frequencies up 1 Hz</td></tr>
|
||||
<tr><td><b>Alt+1-6 </b></td><td>Set now transmission to this number on Tab 1</td></tr>
|
||||
<tr><td><b>Ctl+1-6 </b></td><td>Set next transmission to this number on Tab 1</td></tr>
|
||||
<tr><td><b>Alt+D </b></td><td>Decode again at QSO frequency</td></tr>
|
||||
<tr><td><b>Shift+D </b></td><td>Full decode (both windows)</td></tr>
|
||||
<tr><td><b>Ctrl+E </b></td><td>Turn on TX even/1st</td></tr>
|
||||
<tr><td><b>Shift+E </b></td><td>Turn off TX even/1st</td></tr>
|
||||
<tr><td><b>Alt+E </b></td><td>Erase</td></tr>
|
||||
<tr><td><b>Ctrl+F </b></td><td>Edit the free text message box</td></tr>
|
||||
<tr><td><b>Alt+G </b></td><td>Generate standard messages</td></tr>
|
||||
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
|
||||
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
|
||||
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
|
||||
<tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
|
||||
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
|
||||
<tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>
|
||||
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
|
||||
<tr><td><b>Alt+T </b></td><td>Tune</td></tr>
|
||||
<tr><td><b>Alt+V </b></td><td>Save the most recently completed *.wav file</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,34 @@
|
||||
program rsdtest
|
||||
|
||||
real s3(64,63)
|
||||
character msg*22,arg*12
|
||||
integer param(0:7)
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.2) then
|
||||
print*,'Usage: rsdtest ntrials nfiles'
|
||||
go to 999
|
||||
endif
|
||||
call getarg(1,arg)
|
||||
read(arg,*) ntrials
|
||||
call getarg(2,arg)
|
||||
read(arg,*) nfiles
|
||||
|
||||
open(10,file='s3_1000.bin',access='stream', status='old')
|
||||
open(22,file='kvasd.dat',access='direct',recl=1024,status='unknown')
|
||||
|
||||
nadd=1
|
||||
ifile0=0
|
||||
if(nfiles.lt.0) then
|
||||
ifile0=-nfiles
|
||||
nfiles=99999
|
||||
endif
|
||||
|
||||
do ifile=1,nfiles
|
||||
read(10,end=999) s3
|
||||
if(ifile.lt.ifile0) cycle
|
||||
call extract2(s3,nadd,ntrials,param,msg)
|
||||
if(ifile.eq.ifile0) exit
|
||||
enddo
|
||||
|
||||
999 end program rsdtest
|
||||
@@ -0,0 +1,87 @@
|
||||
#ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED
|
||||
#define BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// boost/detail/lwm_pthreads.hpp
|
||||
//
|
||||
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <pthread.h>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
class lightweight_mutex
|
||||
{
|
||||
private:
|
||||
|
||||
pthread_mutex_t m_;
|
||||
|
||||
lightweight_mutex(lightweight_mutex const &);
|
||||
lightweight_mutex & operator=(lightweight_mutex const &);
|
||||
|
||||
public:
|
||||
|
||||
lightweight_mutex()
|
||||
{
|
||||
|
||||
// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
|
||||
|
||||
#if defined(__hpux) && defined(_DECTHREADS_)
|
||||
BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 );
|
||||
#else
|
||||
BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 );
|
||||
#endif
|
||||
}
|
||||
|
||||
~lightweight_mutex()
|
||||
{
|
||||
BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 );
|
||||
}
|
||||
|
||||
class scoped_lock;
|
||||
friend class scoped_lock;
|
||||
|
||||
class scoped_lock
|
||||
{
|
||||
private:
|
||||
|
||||
pthread_mutex_t & m_;
|
||||
|
||||
scoped_lock(scoped_lock const &);
|
||||
scoped_lock & operator=(scoped_lock const &);
|
||||
|
||||
public:
|
||||
|
||||
scoped_lock(lightweight_mutex & m): m_(m.m_)
|
||||
{
|
||||
BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
|
||||
}
|
||||
|
||||
~scoped_lock()
|
||||
{
|
||||
BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED
|
||||
@@ -0,0 +1,634 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2005-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Thomas Heller
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1, typename Context>
|
||||
struct result<This(A0 , A1, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2, typename Context>
|
||||
struct result<This(A0 , A1 , A2, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const& , A18 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const& , A18 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx) , boost::phoenix::eval(a18, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19, Context)>
|
||||
{
|
||||
typedef
|
||||
typename proto::detail::uncvref<
|
||||
typename proto::result_of::value<A0>::type
|
||||
>::type
|
||||
target_type;
|
||||
typedef typename target_type::type construct_type;
|
||||
typedef typename target_type::type * type;
|
||||
};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, typename Context>
|
||||
typename result<new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const& , A18 const& , A19 const&, Context &)>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18 , A19 const& a19
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
new typename result<
|
||||
new_eval(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const& , A18 const& , A19 const&, Context &)
|
||||
>::construct_type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx) , boost::phoenix::eval(a18, ctx) , boost::phoenix::eval(a19, ctx)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct set_tag;
|
||||
struct set_iterator_tag;
|
||||
template <
|
||||
typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
|
||||
>
|
||||
struct set;
|
||||
}}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to 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)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_format.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Provides formatting output routines for search and replace
|
||||
* operations. Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP
|
||||
#define BOOST_REGEX_V4_REGEX_MERGE_HPP
|
||||
|
||||
|
||||
namespace boost{
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4103)
|
||||
#endif
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
template <class OutputIterator, class Iterator, class traits, class charT>
|
||||
inline OutputIterator regex_merge(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const charT* fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_replace(out, first, last, e, fmt, flags);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class Iterator, class traits, class charT>
|
||||
inline OutputIterator regex_merge(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_merge(out, first, last, e, fmt.c_str(), flags);
|
||||
}
|
||||
|
||||
template <class traits, class charT>
|
||||
inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const charT* fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_replace(s, e, fmt, flags);
|
||||
}
|
||||
|
||||
template <class traits, class charT>
|
||||
inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const basic_regex<charT, traits>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_replace(s, e, fmt, flags);
|
||||
}
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4103)
|
||||
#endif
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_V4_REGEX_MERGE_HPP
|
||||
|
||||
|
||||
@@ -0,0 +1,319 @@
|
||||
//
|
||||
//=======================================================================
|
||||
// Copyright 2009 Trustees of Indiana University
|
||||
// Authors: Jeremiah J. Willcock, Andrew Lumsdaine
|
||||
//
|
||||
// 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)
|
||||
//=======================================================================
|
||||
//
|
||||
#ifndef BOOST_D_ARY_HEAP_HPP
|
||||
#define BOOST_D_ARY_HEAP_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/shared_array.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
|
||||
// WARNING: it is not safe to copy a d_ary_heap_indirect and then modify one of
|
||||
// the copies. The class is required to be copyable so it can be passed around
|
||||
// (without move support from C++11), but it deep-copies the heap contents yet
|
||||
// shallow-copies the index_in_heap_map.
|
||||
|
||||
namespace boost {
|
||||
|
||||
// Swap two elements in a property map without assuming they model
|
||||
// LvaluePropertyMap -- currently not used
|
||||
template <typename PropMap>
|
||||
inline void property_map_swap(
|
||||
PropMap prop_map,
|
||||
const typename boost::property_traits<PropMap>::key_type& ka,
|
||||
const typename boost::property_traits<PropMap>::key_type& kb) {
|
||||
typename boost::property_traits<PropMap>::value_type va = get(prop_map, ka);
|
||||
put(prop_map, ka, get(prop_map, kb));
|
||||
put(prop_map, kb, va);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template <typename Value>
|
||||
class fixed_max_size_vector {
|
||||
boost::shared_array<Value> m_data;
|
||||
std::size_t m_size;
|
||||
|
||||
public:
|
||||
typedef std::size_t size_type;
|
||||
fixed_max_size_vector(std::size_t max_size)
|
||||
: m_data(new Value[max_size]), m_size(0) {}
|
||||
std::size_t size() const {return m_size;}
|
||||
bool empty() const {return m_size == 0;}
|
||||
Value& operator[](std::size_t i) {return m_data[i];}
|
||||
const Value& operator[](std::size_t i) const {return m_data[i];}
|
||||
void push_back(Value v) {m_data[m_size++] = v;}
|
||||
void pop_back() {--m_size;}
|
||||
Value& back() {return m_data[m_size - 1];}
|
||||
const Value& back() const {return m_data[m_size - 1];}
|
||||
};
|
||||
}
|
||||
|
||||
// D-ary heap using an indirect compare operator (use identity_property_map
|
||||
// as DistanceMap to get a direct compare operator). This heap appears to be
|
||||
// commonly used for Dijkstra's algorithm for its good practical performance
|
||||
// on some platforms; asymptotically, it has an O(lg N) decrease-key
|
||||
// operation while that can be done in constant time on a relaxed heap. The
|
||||
// implementation is mostly based on the binary heap page on Wikipedia and
|
||||
// online sources that state that the operations are the same for d-ary
|
||||
// heaps. This code is not based on the old Boost d-ary heap code.
|
||||
//
|
||||
// - d_ary_heap_indirect is a model of UpdatableQueue as is needed for
|
||||
// dijkstra_shortest_paths.
|
||||
//
|
||||
// - Value must model Assignable.
|
||||
// - Arity must be at least 2 (optimal value appears to be 4, both in my and
|
||||
// third-party experiments).
|
||||
// - IndexInHeapMap must be a ReadWritePropertyMap from Value to
|
||||
// Container::size_type (to store the index of each stored value within the
|
||||
// heap for decrease-key aka update).
|
||||
// - DistanceMap must be a ReadablePropertyMap from Value to something
|
||||
// (typedef'ed as distance_type).
|
||||
// - Compare must be a BinaryPredicate used as a less-than operator on
|
||||
// distance_type.
|
||||
// - Container must be a random-access, contiguous container (in practice,
|
||||
// the operations used probably require that it is std::vector<Value>).
|
||||
//
|
||||
template <typename Value,
|
||||
std::size_t Arity,
|
||||
typename IndexInHeapPropertyMap,
|
||||
typename DistanceMap,
|
||||
typename Compare = std::less<Value>,
|
||||
typename Container = std::vector<Value> >
|
||||
class d_ary_heap_indirect {
|
||||
BOOST_STATIC_ASSERT (Arity >= 2);
|
||||
|
||||
public:
|
||||
typedef typename Container::size_type size_type;
|
||||
typedef Value value_type;
|
||||
typedef typename boost::property_traits<DistanceMap>::value_type key_type;
|
||||
typedef DistanceMap key_map;
|
||||
|
||||
d_ary_heap_indirect(DistanceMap distance,
|
||||
IndexInHeapPropertyMap index_in_heap,
|
||||
const Compare& compare = Compare(),
|
||||
const Container& data = Container())
|
||||
: compare(compare), data(data), distance(distance),
|
||||
index_in_heap(index_in_heap) {}
|
||||
/* Implicit copy constructor */
|
||||
/* Implicit assignment operator */
|
||||
|
||||
size_type size() const {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
bool empty() const {
|
||||
return data.empty();
|
||||
}
|
||||
|
||||
void push(const Value& v) {
|
||||
size_type index = data.size();
|
||||
data.push_back(v);
|
||||
put(index_in_heap, v, index);
|
||||
preserve_heap_property_up(index);
|
||||
verify_heap();
|
||||
}
|
||||
|
||||
Value& top() {
|
||||
BOOST_ASSERT (!this->empty());
|
||||
return data[0];
|
||||
}
|
||||
|
||||
const Value& top() const {
|
||||
BOOST_ASSERT (!this->empty());
|
||||
return data[0];
|
||||
}
|
||||
|
||||
void pop() {
|
||||
BOOST_ASSERT (!this->empty());
|
||||
put(index_in_heap, data[0], (size_type)(-1));
|
||||
if (data.size() != 1) {
|
||||
data[0] = data.back();
|
||||
put(index_in_heap, data[0], (size_type)(0));
|
||||
data.pop_back();
|
||||
preserve_heap_property_down();
|
||||
verify_heap();
|
||||
} else {
|
||||
data.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
// This function assumes the key has been updated (using an external write
|
||||
// to the distance map or such)
|
||||
// See http://coding.derkeiler.com/Archive/General/comp.theory/2007-05/msg00043.html
|
||||
void update(const Value& v) { /* decrease-key */
|
||||
size_type index = get(index_in_heap, v);
|
||||
preserve_heap_property_up(index);
|
||||
verify_heap();
|
||||
}
|
||||
|
||||
bool contains(const Value& v) const {
|
||||
size_type index = get(index_in_heap, v);
|
||||
return (index != (size_type)(-1));
|
||||
}
|
||||
|
||||
void push_or_update(const Value& v) { /* insert if not present, else update */
|
||||
size_type index = get(index_in_heap, v);
|
||||
if (index == (size_type)(-1)) {
|
||||
index = data.size();
|
||||
data.push_back(v);
|
||||
put(index_in_heap, v, index);
|
||||
}
|
||||
preserve_heap_property_up(index);
|
||||
verify_heap();
|
||||
}
|
||||
|
||||
DistanceMap keys() const {
|
||||
return distance;
|
||||
}
|
||||
|
||||
private:
|
||||
Compare compare;
|
||||
Container data;
|
||||
DistanceMap distance;
|
||||
IndexInHeapPropertyMap index_in_heap;
|
||||
|
||||
// The distances being compared using compare and that are stored in the
|
||||
// distance map
|
||||
typedef typename boost::property_traits<DistanceMap>::value_type distance_type;
|
||||
|
||||
// Get the parent of a given node in the heap
|
||||
static size_type parent(size_type index) {
|
||||
return (index - 1) / Arity;
|
||||
}
|
||||
|
||||
// Get the child_idx'th child of a given node; 0 <= child_idx < Arity
|
||||
static size_type child(size_type index, std::size_t child_idx) {
|
||||
return index * Arity + child_idx + 1;
|
||||
}
|
||||
|
||||
// Swap two elements in the heap by index, updating index_in_heap
|
||||
void swap_heap_elements(size_type index_a, size_type index_b) {
|
||||
using std::swap;
|
||||
Value value_a = data[index_a];
|
||||
Value value_b = data[index_b];
|
||||
data[index_a] = value_b;
|
||||
data[index_b] = value_a;
|
||||
put(index_in_heap, value_a, index_b);
|
||||
put(index_in_heap, value_b, index_a);
|
||||
}
|
||||
|
||||
// Emulate the indirect_cmp that is now folded into this heap class
|
||||
bool compare_indirect(const Value& a, const Value& b) const {
|
||||
return compare(get(distance, a), get(distance, b));
|
||||
}
|
||||
|
||||
// Verify that the array forms a heap; commented out by default
|
||||
void verify_heap() const {
|
||||
// This is a very expensive test so it should be disabled even when
|
||||
// NDEBUG is not defined
|
||||
#if 0
|
||||
for (size_t i = 1; i < data.size(); ++i) {
|
||||
if (compare_indirect(data[i], data[parent(i)])) {
|
||||
BOOST_ASSERT (!"Element is smaller than its parent");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Starting at a node, move up the tree swapping elements to preserve the
|
||||
// heap property
|
||||
void preserve_heap_property_up(size_type index) {
|
||||
size_type orig_index = index;
|
||||
size_type num_levels_moved = 0;
|
||||
// The first loop just saves swaps that need to be done in order to avoid
|
||||
// aliasing issues in its search; there is a second loop that does the
|
||||
// necessary swap operations
|
||||
if (index == 0) return; // Do nothing on root
|
||||
Value currently_being_moved = data[index];
|
||||
distance_type currently_being_moved_dist =
|
||||
get(distance, currently_being_moved);
|
||||
for (;;) {
|
||||
if (index == 0) break; // Stop at root
|
||||
size_type parent_index = parent(index);
|
||||
Value parent_value = data[parent_index];
|
||||
if (compare(currently_being_moved_dist, get(distance, parent_value))) {
|
||||
++num_levels_moved;
|
||||
index = parent_index;
|
||||
continue;
|
||||
} else {
|
||||
break; // Heap property satisfied
|
||||
}
|
||||
}
|
||||
// Actually do the moves -- move num_levels_moved elements down in the
|
||||
// tree, then put currently_being_moved at the top
|
||||
index = orig_index;
|
||||
for (size_type i = 0; i < num_levels_moved; ++i) {
|
||||
size_type parent_index = parent(index);
|
||||
Value parent_value = data[parent_index];
|
||||
put(index_in_heap, parent_value, index);
|
||||
data[index] = parent_value;
|
||||
index = parent_index;
|
||||
}
|
||||
data[index] = currently_being_moved;
|
||||
put(index_in_heap, currently_being_moved, index);
|
||||
verify_heap();
|
||||
}
|
||||
|
||||
// From the root, swap elements (each one with its smallest child) if there
|
||||
// are any parent-child pairs that violate the heap property
|
||||
void preserve_heap_property_down() {
|
||||
if (data.empty()) return;
|
||||
size_type index = 0;
|
||||
Value currently_being_moved = data[0];
|
||||
distance_type currently_being_moved_dist =
|
||||
get(distance, currently_being_moved);
|
||||
size_type heap_size = data.size();
|
||||
Value* data_ptr = &data[0];
|
||||
for (;;) {
|
||||
size_type first_child_index = child(index, 0);
|
||||
if (first_child_index >= heap_size) break; /* No children */
|
||||
Value* child_base_ptr = data_ptr + first_child_index;
|
||||
size_type smallest_child_index = 0;
|
||||
distance_type smallest_child_dist = get(distance, child_base_ptr[smallest_child_index]);
|
||||
if (first_child_index + Arity <= heap_size) {
|
||||
// Special case for a statically known loop count (common case)
|
||||
for (size_t i = 1; i < Arity; ++i) {
|
||||
Value i_value = child_base_ptr[i];
|
||||
distance_type i_dist = get(distance, i_value);
|
||||
if (compare(i_dist, smallest_child_dist)) {
|
||||
smallest_child_index = i;
|
||||
smallest_child_dist = i_dist;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (size_t i = 1; i < heap_size - first_child_index; ++i) {
|
||||
distance_type i_dist = get(distance, child_base_ptr[i]);
|
||||
if (compare(i_dist, smallest_child_dist)) {
|
||||
smallest_child_index = i;
|
||||
smallest_child_dist = i_dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (compare(smallest_child_dist, currently_being_moved_dist)) {
|
||||
swap_heap_elements(smallest_child_index + first_child_index, index);
|
||||
index = smallest_child_index + first_child_index;
|
||||
continue;
|
||||
} else {
|
||||
break; // Heap property satisfied
|
||||
}
|
||||
}
|
||||
verify_heap();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_D_ARY_HEAP_HPP
|
||||
@@ -0,0 +1,75 @@
|
||||
/* Boost interval/policies.hpp template implementation file
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* 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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_POLICIES_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_POLICIES_HPP
|
||||
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
/*
|
||||
* policies class
|
||||
*/
|
||||
|
||||
template<class Rounding, class Checking>
|
||||
struct policies
|
||||
{
|
||||
typedef Rounding rounding;
|
||||
typedef Checking checking;
|
||||
};
|
||||
|
||||
/*
|
||||
* policies switching classes
|
||||
*/
|
||||
|
||||
template<class OldInterval, class NewRounding>
|
||||
class change_rounding
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::checking checking;
|
||||
public:
|
||||
typedef interval<T, policies<NewRounding, checking> > type;
|
||||
};
|
||||
|
||||
template<class OldInterval, class NewChecking>
|
||||
class change_checking
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding rounding;
|
||||
public:
|
||||
typedef interval<T, policies<rounding, NewChecking> > type;
|
||||
};
|
||||
|
||||
/*
|
||||
* Protect / unprotect: control whether the rounding mode is set/reset
|
||||
* at each operation, rather than once and for all.
|
||||
*/
|
||||
|
||||
template<class OldInterval>
|
||||
class unprotect
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding r;
|
||||
typedef typename r::unprotected_rounding newRounding;
|
||||
public:
|
||||
typedef typename change_rounding<OldInterval, newRounding>::type type;
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_POLICIES_HPP
|
||||
@@ -0,0 +1,80 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2013-2013
|
||||
//
|
||||
// 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/container for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_OPTIONS_HPP
|
||||
#define BOOST_CONTAINER_OPTIONS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/container_fwd.hpp>
|
||||
#include <boost/intrusive/pack_options.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
template<tree_type_enum TreeType, bool OptimizeSize>
|
||||
struct tree_opt
|
||||
{
|
||||
static const boost::container::tree_type_enum tree_type = TreeType;
|
||||
static const bool optimize_size = OptimizeSize;
|
||||
};
|
||||
|
||||
#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
|
||||
//!This option setter specifies the underlying tree type
|
||||
//!(red-black, AVL, Scapegoat or Splay) for ordered associative containers
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(tree_type, tree_type_enum, TreeType, tree_type)
|
||||
|
||||
//!This option setter specifies if node size is optimized
|
||||
//!storing rebalancing data masked into pointers for ordered associative containers
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size)
|
||||
|
||||
//! Helper metafunction to combine options into a single type to be used
|
||||
//! by \c boost::container::set, \c boost::container::multiset
|
||||
//! \c boost::container::map and \c boost::container::multimap.
|
||||
//! Supported options are: \c boost::container::optimize_size and \c boost::container::tree_type
|
||||
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
|
||||
template<class ...Options>
|
||||
#else
|
||||
template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
|
||||
#endif
|
||||
struct tree_assoc_options
|
||||
{
|
||||
/// @cond
|
||||
typedef typename ::boost::intrusive::pack_options
|
||||
< tree_assoc_defaults,
|
||||
#if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type packed_options;
|
||||
typedef tree_opt<packed_options::tree_type, packed_options::optimize_size> implementation_defined;
|
||||
/// @endcond
|
||||
typedef implementation_defined type;
|
||||
};
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_OPTIONS_HPP
|
||||
@@ -0,0 +1,502 @@
|
||||
// Boost string_algo library collection_traits.hpp header file -----------------------//
|
||||
|
||||
// Copyright Pavol Droba 2002-2003. Use, modification and
|
||||
// distribution is subject to 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 for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_RANGE_STRING_DETAIL_COLLECTION_TRAITS_HPP
|
||||
#define BOOST_RANGE_STRING_DETAIL_COLLECTION_TRAITS_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/fold.hpp>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
|
||||
// Container traits implementation ---------------------------------------------------------
|
||||
|
||||
namespace boost {
|
||||
namespace algorithm {
|
||||
namespace detail {
|
||||
|
||||
// Default collection traits -----------------------------------------------------------------
|
||||
|
||||
// Default collection helper
|
||||
/*
|
||||
Wraps std::container compliant containers
|
||||
*/
|
||||
template< typename ContainerT >
|
||||
struct default_container_traits
|
||||
{
|
||||
typedef typename ContainerT::value_type value_type;
|
||||
typedef typename ContainerT::iterator iterator;
|
||||
typedef typename ContainerT::const_iterator const_iterator;
|
||||
typedef typename
|
||||
::boost::mpl::if_< ::boost::is_const<ContainerT>,
|
||||
const_iterator,
|
||||
iterator
|
||||
>::type result_iterator;
|
||||
typedef typename ContainerT::difference_type difference_type;
|
||||
typedef typename ContainerT::size_type size_type;
|
||||
|
||||
// static operations
|
||||
template< typename C >
|
||||
static size_type size( const C& c )
|
||||
{
|
||||
return c.size();
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
static bool empty( const C& c )
|
||||
{
|
||||
return c.empty();
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename C >
|
||||
static iterator begin( C& c )
|
||||
{
|
||||
return c.begin();
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
static const_iterator begin( const C& c )
|
||||
{
|
||||
return c.begin();
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
static iterator end( C& c )
|
||||
{
|
||||
return c.end();
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
static const_iterator end( const C& c )
|
||||
{
|
||||
return c.end();
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename C >
|
||||
static result_iterator begin( C& c )
|
||||
{
|
||||
return c.begin();
|
||||
}
|
||||
|
||||
template< typename C >
|
||||
static result_iterator end( C& c )
|
||||
{
|
||||
return c.end();
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct default_container_traits_selector
|
||||
{
|
||||
typedef default_container_traits<T> type;
|
||||
};
|
||||
|
||||
// Pair container traits ---------------------------------------------------------------------
|
||||
|
||||
typedef double yes_type;
|
||||
typedef char no_type;
|
||||
|
||||
// pair selector
|
||||
template< typename T, typename U >
|
||||
yes_type is_pair_impl( const std::pair<T,U>* );
|
||||
no_type is_pair_impl( ... );
|
||||
|
||||
template<typename T> struct is_pair
|
||||
{
|
||||
private:
|
||||
static T* t;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT( bool, value=
|
||||
sizeof(is_pair_impl(t))==sizeof(yes_type) );
|
||||
};
|
||||
|
||||
// pair helper
|
||||
template< typename PairT >
|
||||
struct pair_container_traits
|
||||
{
|
||||
typedef typename PairT::first_type element_type;
|
||||
|
||||
typedef typename ::boost::detail::
|
||||
iterator_traits<element_type>::value_type value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef typename ::boost::detail::
|
||||
iterator_traits<element_type>::difference_type difference_type;
|
||||
|
||||
typedef element_type iterator;
|
||||
typedef element_type const_iterator;
|
||||
typedef element_type result_iterator;
|
||||
|
||||
// static operations
|
||||
template< typename P >
|
||||
static size_type size( const P& p )
|
||||
{
|
||||
difference_type diff = std::distance( p.first, p.second );
|
||||
if ( diff < 0 )
|
||||
return 0;
|
||||
else
|
||||
return diff;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static bool empty( const P& p )
|
||||
{
|
||||
return p.first==p.second;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static const_iterator begin( const P& p )
|
||||
{
|
||||
return p.first;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static const_iterator end( const P& p )
|
||||
{
|
||||
return p.second;
|
||||
}
|
||||
}; // 'pair_container_helper'
|
||||
|
||||
template<typename T>
|
||||
struct pair_container_traits_selector
|
||||
{
|
||||
typedef pair_container_traits<T> type;
|
||||
};
|
||||
|
||||
// Array container traits ---------------------------------------------------------------
|
||||
|
||||
// array traits ( partial specialization )
|
||||
template< typename T >
|
||||
struct array_traits;
|
||||
|
||||
template< typename T, std::size_t sz >
|
||||
struct array_traits<T[sz]>
|
||||
{
|
||||
// typedef
|
||||
typedef T* iterator;
|
||||
typedef const T* const_iterator;
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
// size of the array ( static );
|
||||
BOOST_STATIC_CONSTANT( size_type, array_size = sz );
|
||||
};
|
||||
|
||||
|
||||
// array length resolving
|
||||
/*
|
||||
Lenght of string contained in a static array could
|
||||
be different from the size of the array.
|
||||
For string processing we need the length without
|
||||
terminating 0.
|
||||
|
||||
Therefore, the length is calculated for char and wchar_t
|
||||
using char_traits, rather then simply returning
|
||||
the array size.
|
||||
*/
|
||||
template< typename T >
|
||||
struct array_length_selector
|
||||
{
|
||||
template< typename TraitsT >
|
||||
struct array_length
|
||||
{
|
||||
typedef typename
|
||||
TraitsT::size_type size_type;
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
size_type,
|
||||
array_size=TraitsT::array_size );
|
||||
|
||||
template< typename A >
|
||||
static size_type length( const A& )
|
||||
{
|
||||
return array_size;
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static bool empty( const A& )
|
||||
{
|
||||
return array_size==0;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// specialization for char
|
||||
template<>
|
||||
struct array_length_selector<char>
|
||||
{
|
||||
template< typename TraitsT >
|
||||
struct array_length
|
||||
{
|
||||
typedef typename
|
||||
TraitsT::size_type size_type;
|
||||
|
||||
template< typename A >
|
||||
static size_type length( const A& a )
|
||||
{
|
||||
if ( a==0 )
|
||||
return 0;
|
||||
else
|
||||
return std::char_traits<char>::length(a);
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static bool empty( const A& a )
|
||||
{
|
||||
return a==0 || a[0]==0;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// specialization for wchar_t
|
||||
template<>
|
||||
struct array_length_selector<wchar_t>
|
||||
{
|
||||
template< typename TraitsT >
|
||||
struct array_length
|
||||
{
|
||||
typedef typename
|
||||
TraitsT::size_type size_type;
|
||||
|
||||
template< typename A >
|
||||
static size_type length( const A& a )
|
||||
{
|
||||
if ( a==0 )
|
||||
return 0;
|
||||
else
|
||||
return std::char_traits<wchar_t>::length(a);
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static bool empty( const A& a )
|
||||
{
|
||||
return a==0 || a[0]==0;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct array_container_traits
|
||||
{
|
||||
private:
|
||||
// resolve array traits
|
||||
typedef array_traits<T> traits_type;
|
||||
|
||||
public:
|
||||
typedef typename
|
||||
traits_type::value_type value_type;
|
||||
typedef typename
|
||||
traits_type::iterator iterator;
|
||||
typedef typename
|
||||
traits_type::const_iterator const_iterator;
|
||||
typedef typename
|
||||
traits_type::size_type size_type;
|
||||
typedef typename
|
||||
traits_type::difference_type difference_type;
|
||||
|
||||
typedef typename
|
||||
::boost::mpl::if_< ::boost::is_const<T>,
|
||||
const_iterator,
|
||||
iterator
|
||||
>::type result_iterator;
|
||||
|
||||
private:
|
||||
// resolve array size
|
||||
typedef typename
|
||||
::boost::remove_cv<value_type>::type char_type;
|
||||
typedef typename
|
||||
array_length_selector<char_type>::
|
||||
BOOST_NESTED_TEMPLATE array_length<traits_type> array_length_type;
|
||||
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT( size_type, array_size = traits_type::array_size );
|
||||
|
||||
// static operations
|
||||
template< typename A >
|
||||
static size_type size( const A& a )
|
||||
{
|
||||
return array_length_type::length(a);
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static bool empty( const A& a )
|
||||
{
|
||||
return array_length_type::empty(a);
|
||||
}
|
||||
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename A >
|
||||
static iterator begin( A& a )
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static const_iterator begin( const A& a )
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static iterator end( A& a )
|
||||
{
|
||||
return a+array_length_type::length(a);
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static const_iterator end( const A& a )
|
||||
{
|
||||
return a+array_length_type::length(a);
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename A >
|
||||
static result_iterator begin( A& a )
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
template< typename A >
|
||||
static result_iterator end( A& a )
|
||||
{
|
||||
return a+array_length_type::length(a);
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct array_container_traits_selector
|
||||
{
|
||||
typedef array_container_traits<T> type;
|
||||
};
|
||||
|
||||
// Pointer container traits ---------------------------------------------------------------
|
||||
|
||||
template<typename T>
|
||||
struct pointer_container_traits
|
||||
{
|
||||
typedef typename
|
||||
::boost::remove_pointer<T>::type value_type;
|
||||
|
||||
typedef typename
|
||||
::boost::remove_cv<value_type>::type char_type;
|
||||
typedef ::std::char_traits<char_type> char_traits;
|
||||
|
||||
typedef value_type* iterator;
|
||||
typedef const value_type* const_iterator;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
typedef typename
|
||||
::boost::mpl::if_< ::boost::is_const<T>,
|
||||
const_iterator,
|
||||
iterator
|
||||
>::type result_iterator;
|
||||
|
||||
// static operations
|
||||
template< typename P >
|
||||
static size_type size( const P& p )
|
||||
{
|
||||
if ( p==0 )
|
||||
return 0;
|
||||
else
|
||||
return char_traits::length(p);
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static bool empty( const P& p )
|
||||
{
|
||||
return p==0 || p[0]==0;
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename P >
|
||||
static iterator begin( P& p )
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static const_iterator begin( const P& p )
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static iterator end( P& p )
|
||||
{
|
||||
if ( p==0 )
|
||||
return p;
|
||||
else
|
||||
return p+char_traits::length(p);
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static const_iterator end( const P& p )
|
||||
{
|
||||
if ( p==0 )
|
||||
return p;
|
||||
else
|
||||
return p+char_traits::length(p);
|
||||
}
|
||||
|
||||
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template< typename P >
|
||||
static result_iterator begin( P& p )
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
template< typename P >
|
||||
static result_iterator end( P& p )
|
||||
{
|
||||
if ( p==0 )
|
||||
return p;
|
||||
else
|
||||
return p+char_traits::length(p);
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct pointer_container_traits_selector
|
||||
{
|
||||
typedef pointer_container_traits<T> type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace algorithm
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_STRING_DETAIL_COLLECTION_HPP
|
||||
@@ -0,0 +1,271 @@
|
||||
#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
|
||||
#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// detail/sp_counted_impl.hpp
|
||||
//
|
||||
// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
|
||||
// Copyright 2004-2005 Peter Dimov
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)
|
||||
# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.
|
||||
#endif
|
||||
|
||||
#include <boost/checked_delete.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_counted_base.hpp>
|
||||
|
||||
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
|
||||
#include <boost/smart_ptr/detail/quick_allocator.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
|
||||
#include <memory> // std::allocator
|
||||
#endif
|
||||
|
||||
#include <cstddef> // std::size_t
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||
|
||||
void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn );
|
||||
void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn );
|
||||
|
||||
#endif
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<class X> class sp_counted_impl_p: public sp_counted_base
|
||||
{
|
||||
private:
|
||||
|
||||
X * px_;
|
||||
|
||||
sp_counted_impl_p( sp_counted_impl_p const & );
|
||||
sp_counted_impl_p & operator= ( sp_counted_impl_p const & );
|
||||
|
||||
typedef sp_counted_impl_p<X> this_type;
|
||||
|
||||
public:
|
||||
|
||||
explicit sp_counted_impl_p( X * px ): px_( px )
|
||||
{
|
||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||
boost::sp_scalar_constructor_hook( px, sizeof(X), this );
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void dispose() // nothrow
|
||||
{
|
||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||
boost::sp_scalar_destructor_hook( px_, sizeof(X), this );
|
||||
#endif
|
||||
boost::checked_delete( px_ );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void * get_untyped_deleter()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
|
||||
|
||||
void * operator new( std::size_t )
|
||||
{
|
||||
return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
|
||||
}
|
||||
|
||||
void operator delete( void * p )
|
||||
{
|
||||
std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
|
||||
|
||||
void * operator new( std::size_t )
|
||||
{
|
||||
return quick_allocator<this_type>::alloc();
|
||||
}
|
||||
|
||||
void operator delete( void * p )
|
||||
{
|
||||
quick_allocator<this_type>::dealloc( p );
|
||||
}
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
//
|
||||
// Borland's Codeguard trips up over the -Vx- option here:
|
||||
//
|
||||
#ifdef __CODEGUARD__
|
||||
# pragma option push -Vx-
|
||||
#endif
|
||||
|
||||
template<class P, class D> class sp_counted_impl_pd: public sp_counted_base
|
||||
{
|
||||
private:
|
||||
|
||||
P ptr; // copy constructor must not throw
|
||||
D del; // copy constructor must not throw
|
||||
|
||||
sp_counted_impl_pd( sp_counted_impl_pd const & );
|
||||
sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
|
||||
|
||||
typedef sp_counted_impl_pd<P, D> this_type;
|
||||
|
||||
public:
|
||||
|
||||
// pre: d(p) must not throw
|
||||
|
||||
sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )
|
||||
{
|
||||
}
|
||||
|
||||
sp_counted_impl_pd( P p ): ptr( p ), del()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void dispose() // nothrow
|
||||
{
|
||||
del( ptr );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti )
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
|
||||
}
|
||||
|
||||
virtual void * get_untyped_deleter()
|
||||
{
|
||||
return &reinterpret_cast<char&>( del );
|
||||
}
|
||||
|
||||
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
|
||||
|
||||
void * operator new( std::size_t )
|
||||
{
|
||||
return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
|
||||
}
|
||||
|
||||
void operator delete( void * p )
|
||||
{
|
||||
std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
|
||||
|
||||
void * operator new( std::size_t )
|
||||
{
|
||||
return quick_allocator<this_type>::alloc();
|
||||
}
|
||||
|
||||
void operator delete( void * p )
|
||||
{
|
||||
quick_allocator<this_type>::dealloc( p );
|
||||
}
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
template<class P, class D, class A> class sp_counted_impl_pda: public sp_counted_base
|
||||
{
|
||||
private:
|
||||
|
||||
P p_; // copy constructor must not throw
|
||||
D d_; // copy constructor must not throw
|
||||
A a_; // copy constructor must not throw
|
||||
|
||||
sp_counted_impl_pda( sp_counted_impl_pda const & );
|
||||
sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & );
|
||||
|
||||
typedef sp_counted_impl_pda<P, D, A> this_type;
|
||||
|
||||
public:
|
||||
|
||||
// pre: d( p ) must not throw
|
||||
|
||||
sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )
|
||||
{
|
||||
}
|
||||
|
||||
sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a )
|
||||
{
|
||||
}
|
||||
|
||||
virtual void dispose() // nothrow
|
||||
{
|
||||
d_( p_ );
|
||||
}
|
||||
|
||||
virtual void destroy() // nothrow
|
||||
{
|
||||
#if !defined( BOOST_NO_CXX11_ALLOCATOR )
|
||||
|
||||
typedef typename std::allocator_traits<A>::template rebind_alloc< this_type > A2;
|
||||
|
||||
#else
|
||||
|
||||
typedef typename A::template rebind< this_type >::other A2;
|
||||
|
||||
#endif
|
||||
|
||||
A2 a2( a_ );
|
||||
|
||||
#if !defined( BOOST_NO_CXX11_ALLOCATOR )
|
||||
|
||||
std::allocator_traits<A2>::destroy( a2, this );
|
||||
|
||||
#else
|
||||
|
||||
this->~this_type();
|
||||
|
||||
#endif
|
||||
|
||||
a2.deallocate( this, 1 );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti )
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
|
||||
}
|
||||
|
||||
virtual void * get_untyped_deleter()
|
||||
{
|
||||
return &reinterpret_cast<char&>( d_ );
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef __CODEGUARD__
|
||||
# pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,32 @@
|
||||
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
|
||||
// unit/quantity manipulation and conversion
|
||||
//
|
||||
// Copyright (C) 2003-2008 Matthias Christian Schabel
|
||||
// Copyright (C) 2008 Steven Watanabe
|
||||
//
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP
|
||||
#define BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP
|
||||
|
||||
#include <boost/units/derived_dimension.hpp>
|
||||
#include <boost/units/physical_dimensions/length.hpp>
|
||||
#include <boost/units/physical_dimensions/mass.hpp>
|
||||
#include <boost/units/physical_dimensions/time.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace units {
|
||||
|
||||
/// derived dimension for action : L^2 M T^-1
|
||||
typedef derived_dimension<length_base_dimension,2,
|
||||
mass_base_dimension,1,
|
||||
time_base_dimension,-1>::type action_dimension;
|
||||
|
||||
} // namespace units
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/erase_key_fwd.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag >
|
||||
struct erase_key_impl
|
||||
{
|
||||
template< typename Sequence, typename Key > struct apply;
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, erase_key_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,184 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
|
||||
//
|
||||
// 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://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ALGORITHM_ACCUMULATE_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_ACCUMULATE_HPP
|
||||
|
||||
#include <boost/preprocessor/seq/for_each.hpp>
|
||||
|
||||
#include <boost/compute/system.hpp>
|
||||
#include <boost/compute/functional.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/algorithm/reduce.hpp>
|
||||
#include <boost/compute/algorithm/detail/serial_accumulate.hpp>
|
||||
#include <boost/compute/container/array.hpp>
|
||||
#include <boost/compute/container/vector.hpp>
|
||||
#include <boost/compute/detail/iterator_range_size.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
template<class InputIterator, class T, class BinaryFunction>
|
||||
inline T generic_accumulate(InputIterator first,
|
||||
InputIterator last,
|
||||
T init,
|
||||
BinaryFunction function,
|
||||
command_queue &queue)
|
||||
{
|
||||
const context &context = queue.get_context();
|
||||
|
||||
size_t size = iterator_range_size(first, last);
|
||||
if(size == 0){
|
||||
return init;
|
||||
}
|
||||
|
||||
// accumulate on device
|
||||
array<T, 1> device_result(context);
|
||||
detail::serial_accumulate(
|
||||
first, last, device_result.begin(), init, function, queue
|
||||
);
|
||||
|
||||
// copy result to host
|
||||
T result;
|
||||
::boost::compute::copy_n(device_result.begin(), 1, &result, queue);
|
||||
return result;
|
||||
}
|
||||
|
||||
// returns true if we can use reduce() instead of accumulate() when
|
||||
// accumulate() this is true when the function is commutative (such as
|
||||
// addition of integers) and the initial value is the identity value
|
||||
// for the operation (zero for addition, one for multiplication).
|
||||
template<class T, class F>
|
||||
inline bool can_accumulate_with_reduce(T init, F function)
|
||||
{
|
||||
(void) init;
|
||||
(void) function;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
#define BOOST_COMPUTE_DETAIL_DECLARE_CAN_ACCUMULATE_WITH_REDUCE(r, data, type) \
|
||||
inline bool can_accumulate_with_reduce(type init, plus<type>) \
|
||||
{ \
|
||||
return init == type(0); \
|
||||
} \
|
||||
inline bool can_accumulate_with_reduce(type init, multiplies<type>) \
|
||||
{ \
|
||||
return init == type(1); \
|
||||
}
|
||||
|
||||
BOOST_PP_SEQ_FOR_EACH(
|
||||
BOOST_COMPUTE_DETAIL_DECLARE_CAN_ACCUMULATE_WITH_REDUCE,
|
||||
_,
|
||||
(char_)(uchar_)(short_)(ushort_)(int_)(uint_)(long_)(ulong_)
|
||||
)
|
||||
|
||||
template<class T>
|
||||
inline bool can_accumulate_with_reduce(T init, min<T>)
|
||||
{
|
||||
return init == (std::numeric_limits<T>::max)();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline bool can_accumulate_with_reduce(T init, max<T>)
|
||||
{
|
||||
return init == (std::numeric_limits<T>::min)();
|
||||
}
|
||||
|
||||
#undef BOOST_COMPUTE_DETAIL_DECLARE_CAN_ACCUMULATE_WITH_REDUCE
|
||||
|
||||
template<class InputIterator, class T, class BinaryFunction>
|
||||
inline T dispatch_accumulate(InputIterator first,
|
||||
InputIterator last,
|
||||
T init,
|
||||
BinaryFunction function,
|
||||
command_queue &queue)
|
||||
{
|
||||
size_t size = iterator_range_size(first, last);
|
||||
if(size == 0){
|
||||
return init;
|
||||
}
|
||||
|
||||
if(can_accumulate_with_reduce(init, function)){
|
||||
T result;
|
||||
reduce(first, last, &result, function, queue);
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
return generic_accumulate(first, last, init, function, queue);
|
||||
}
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// Returns the result of applying \p function to the elements in the
|
||||
/// range [\p first, \p last) and \p init.
|
||||
///
|
||||
/// If no function is specified, \c plus will be used.
|
||||
///
|
||||
/// \param first first element in the input range
|
||||
/// \param last last element in the input range
|
||||
/// \param init initial value
|
||||
/// \param function binary reduction function
|
||||
/// \param queue command queue to perform the operation
|
||||
///
|
||||
/// \return the accumulated result value
|
||||
///
|
||||
/// In specific situations the call to \c accumulate() can be automatically
|
||||
/// optimized to a call to the more efficient \c reduce() algorithm. This
|
||||
/// occurs when the binary reduction function is recognized as associative
|
||||
/// (such as the \c plus<int> function).
|
||||
///
|
||||
/// Note that because floating-point addition is not associative, calling
|
||||
/// \c accumulate() with \c plus<float> results in a less efficient serial
|
||||
/// reduction algorithm being executed. If a slight loss in precision is
|
||||
/// acceptable, the more efficient parallel \c reduce() algorithm should be
|
||||
/// used instead.
|
||||
///
|
||||
/// For example:
|
||||
/// \code
|
||||
/// // with vec = boost::compute::vector<int>
|
||||
/// accumulate(vec.begin(), vec.end(), 0, plus<int>()); // fast
|
||||
/// reduce(vec.begin(), vec.end(), &result, plus<int>()); // fast
|
||||
///
|
||||
/// // with vec = boost::compute::vector<float>
|
||||
/// accumulate(vec.begin(), vec.end(), 0, plus<float>()); // slow
|
||||
/// reduce(vec.begin(), vec.end(), &result, plus<float>()); // fast
|
||||
/// \endcode
|
||||
///
|
||||
/// \see reduce()
|
||||
template<class InputIterator, class T, class BinaryFunction>
|
||||
inline T accumulate(InputIterator first,
|
||||
InputIterator last,
|
||||
T init,
|
||||
BinaryFunction function,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
return detail::dispatch_accumulate(first, last, init, function, queue);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class InputIterator, class T>
|
||||
inline T accumulate(InputIterator first,
|
||||
InputIterator last,
|
||||
T init,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
typedef typename std::iterator_traits<InputIterator>::value_type IT;
|
||||
|
||||
return detail::dispatch_accumulate(first, last, init, plus<IT>(), queue);
|
||||
}
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_ACCUMULATE_HPP
|
||||
@@ -0,0 +1,77 @@
|
||||
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
|
||||
// unit/quantity manipulation and conversion
|
||||
//
|
||||
// Copyright (C) 2003-2008 Matthias Christian Schabel
|
||||
// Copyright (C) 2008 Steven Watanabe
|
||||
//
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_UNITS_SI_HPP
|
||||
#define BOOST_UNITS_SI_HPP
|
||||
|
||||
/// \file
|
||||
/// Includes all the si unit headers
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/units/quantity.hpp>
|
||||
|
||||
#include <boost/units/systems/si/base.hpp>
|
||||
|
||||
#include <boost/units/systems/si/absorbed_dose.hpp>
|
||||
#include <boost/units/systems/si/acceleration.hpp>
|
||||
#include <boost/units/systems/si/action.hpp>
|
||||
#include <boost/units/systems/si/activity.hpp>
|
||||
#include <boost/units/systems/si/amount.hpp>
|
||||
#include <boost/units/systems/si/angular_acceleration.hpp>
|
||||
#include <boost/units/systems/si/angular_momentum.hpp>
|
||||
#include <boost/units/systems/si/angular_velocity.hpp>
|
||||
#include <boost/units/systems/si/area.hpp>
|
||||
#include <boost/units/systems/si/capacitance.hpp>
|
||||
#include <boost/units/systems/si/catalytic_activity.hpp>
|
||||
#include <boost/units/systems/si/conductance.hpp>
|
||||
#include <boost/units/systems/si/conductivity.hpp>
|
||||
#include <boost/units/systems/si/current.hpp>
|
||||
#include <boost/units/systems/si/dimensionless.hpp>
|
||||
#include <boost/units/systems/si/dose_equivalent.hpp>
|
||||
#include <boost/units/systems/si/dynamic_viscosity.hpp>
|
||||
#include <boost/units/systems/si/electric_charge.hpp>
|
||||
#include <boost/units/systems/si/electric_potential.hpp>
|
||||
#include <boost/units/systems/si/energy.hpp>
|
||||
#include <boost/units/systems/si/force.hpp>
|
||||
#include <boost/units/systems/si/frequency.hpp>
|
||||
#include <boost/units/systems/si/illuminance.hpp>
|
||||
#include <boost/units/systems/si/impedance.hpp>
|
||||
#include <boost/units/systems/si/inductance.hpp>
|
||||
#include <boost/units/systems/si/kinematic_viscosity.hpp>
|
||||
#include <boost/units/systems/si/length.hpp>
|
||||
#include <boost/units/systems/si/luminous_flux.hpp>
|
||||
#include <boost/units/systems/si/luminous_intensity.hpp>
|
||||
#include <boost/units/systems/si/magnetic_field_intensity.hpp>
|
||||
#include <boost/units/systems/si/magnetic_flux.hpp>
|
||||
#include <boost/units/systems/si/magnetic_flux_density.hpp>
|
||||
#include <boost/units/systems/si/mass.hpp>
|
||||
#include <boost/units/systems/si/mass_density.hpp>
|
||||
#include <boost/units/systems/si/moment_of_inertia.hpp>
|
||||
#include <boost/units/systems/si/momentum.hpp>
|
||||
#include <boost/units/systems/si/permeability.hpp>
|
||||
#include <boost/units/systems/si/permittivity.hpp>
|
||||
#include <boost/units/systems/si/plane_angle.hpp>
|
||||
#include <boost/units/systems/si/power.hpp>
|
||||
#include <boost/units/systems/si/pressure.hpp>
|
||||
#include <boost/units/systems/si/reluctance.hpp>
|
||||
#include <boost/units/systems/si/resistance.hpp>
|
||||
#include <boost/units/systems/si/resistivity.hpp>
|
||||
#include <boost/units/systems/si/solid_angle.hpp>
|
||||
#include <boost/units/systems/si/surface_density.hpp>
|
||||
#include <boost/units/systems/si/surface_tension.hpp>
|
||||
#include <boost/units/systems/si/temperature.hpp>
|
||||
#include <boost/units/systems/si/time.hpp>
|
||||
#include <boost/units/systems/si/torque.hpp>
|
||||
#include <boost/units/systems/si/velocity.hpp>
|
||||
#include <boost/units/systems/si/volume.hpp>
|
||||
#include <boost/units/systems/si/wavenumber.hpp>
|
||||
|
||||
#endif // BOOST_UNITS_SI_HPP
|
||||
@@ -0,0 +1,50 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2001-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Thomas Heller
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PHOENIX_OBJECT_DELETE_HPP
|
||||
#define BOOST_PHOENIX_OBJECT_DELETE_HPP
|
||||
|
||||
#include <boost/phoenix/core/limits.hpp>
|
||||
#include <boost/phoenix/core/expression.hpp>
|
||||
#include <boost/phoenix/core/meta_grammar.hpp>
|
||||
#include <boost/phoenix/core/call.hpp>
|
||||
|
||||
BOOST_PHOENIX_DEFINE_EXPRESSION(
|
||||
(boost)(phoenix)(delete_)
|
||||
, (meta_grammar)
|
||||
)
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
struct delete_eval
|
||||
{
|
||||
typedef void result_type;
|
||||
|
||||
template <typename P, typename Context>
|
||||
result_type
|
||||
operator()(P const& p, Context const &ctx) const
|
||||
{
|
||||
delete boost::phoenix::eval(p, ctx);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Dummy>
|
||||
struct default_actions::when<rule::delete_, Dummy>
|
||||
: call<delete_eval>
|
||||
{};
|
||||
|
||||
template <typename P>
|
||||
inline
|
||||
typename expression::delete_<P>::type const
|
||||
delete_(P const& p)
|
||||
{
|
||||
return expression::delete_<P>::make(p);
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
// (C) Copyright Tobias Schwinger
|
||||
//
|
||||
// Use modification and distribution are subject to the boost Software License,
|
||||
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifndef BOOST_FT_DETAIL_RETAG_DEFAULT_CC_HPP_INCLUDED
|
||||
#define BOOST_FT_DETAIL_RETAG_DEFAULT_CC_HPP_INCLUDED
|
||||
|
||||
#include <boost/mpl/bitand.hpp>
|
||||
|
||||
#include <boost/function_types/components.hpp>
|
||||
|
||||
#if defined(BOOST_FT_PREPROCESSING_MODE)
|
||||
# include <boost/function_types/detail/pp_retag_default_cc/master.hpp>
|
||||
#else
|
||||
# include <boost/function_types/detail/pp_retag_default_cc/preprocessed.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef YearMonthDayBase_HPP__
|
||||
#define YearMonthDayBase_HPP__
|
||||
|
||||
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
|
||||
* Use, modification and distribution is subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
||||
* Author: Jeff Garland
|
||||
* $Date$
|
||||
*/
|
||||
|
||||
namespace boost {
|
||||
namespace date_time {
|
||||
|
||||
//! Allow rapid creation of ymd triples of different types
|
||||
template<typename YearType, typename MonthType, typename DayType>
|
||||
struct year_month_day_base {
|
||||
year_month_day_base(YearType year,
|
||||
MonthType month,
|
||||
DayType day);
|
||||
YearType year;
|
||||
MonthType month;
|
||||
DayType day;
|
||||
typedef YearType year_type;
|
||||
typedef MonthType month_type;
|
||||
typedef DayType day_type;
|
||||
};
|
||||
|
||||
|
||||
//! A basic constructor
|
||||
template<typename YearType, typename MonthType, typename DayType>
|
||||
inline
|
||||
year_month_day_base<YearType,MonthType,DayType>::year_month_day_base(YearType y,
|
||||
MonthType m,
|
||||
DayType d) :
|
||||
year(y),
|
||||
month(m),
|
||||
day(d)
|
||||
{}
|
||||
|
||||
} }//namespace date_time
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,191 @@
|
||||
#include "PollingTransceiver.hpp"
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
|
||||
#include "moc_PollingTransceiver.cpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
unsigned const polls_to_stabilize {3};
|
||||
}
|
||||
|
||||
PollingTransceiver::PollingTransceiver (int poll_interval, QObject * parent)
|
||||
: TransceiverBase {parent}
|
||||
, interval_ {poll_interval * 1000}
|
||||
, poll_timer_ {nullptr}
|
||||
, retries_ {0}
|
||||
{
|
||||
}
|
||||
|
||||
void PollingTransceiver::start_timer ()
|
||||
{
|
||||
if (interval_)
|
||||
{
|
||||
if (!poll_timer_)
|
||||
{
|
||||
poll_timer_ = new QTimer {this}; // pass ownership to
|
||||
// QObject which handles
|
||||
// destruction for us
|
||||
|
||||
connect (poll_timer_, &QTimer::timeout, this,
|
||||
&PollingTransceiver::handle_timeout);
|
||||
}
|
||||
poll_timer_->start (interval_);
|
||||
}
|
||||
else
|
||||
{
|
||||
stop_timer ();
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::stop_timer ()
|
||||
{
|
||||
if (poll_timer_)
|
||||
{
|
||||
poll_timer_->stop ();
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_post_start ()
|
||||
{
|
||||
start_timer ();
|
||||
if (!next_state_.online ())
|
||||
{
|
||||
// remember that we are expecting to go online
|
||||
next_state_.online (true);
|
||||
retries_ = polls_to_stabilize;
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_post_stop ()
|
||||
{
|
||||
// not much point waiting for rig to go offline since we are ceasing
|
||||
// polls
|
||||
stop_timer ();
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_post_frequency (Frequency f, MODE m)
|
||||
{
|
||||
// take care not to set the expected next mode to unknown since some
|
||||
// callers use mode == unknown to signify that they do not know the
|
||||
// mode and don't care
|
||||
if (next_state_.frequency () != f || (m != UNK && next_state_.mode () != m))
|
||||
{
|
||||
// update expected state with new frequency and set poll count
|
||||
next_state_.frequency (f);
|
||||
if (m != UNK)
|
||||
{
|
||||
next_state_.mode (m);
|
||||
}
|
||||
retries_ = polls_to_stabilize;
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_post_tx_frequency (Frequency f, MODE)
|
||||
{
|
||||
if (next_state_.tx_frequency () != f)
|
||||
{
|
||||
// update expected state with new TX frequency and set poll
|
||||
// count
|
||||
next_state_.tx_frequency (f);
|
||||
next_state_.split (f); // setting non-zero TX frequency means split
|
||||
retries_ = polls_to_stabilize;
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_post_mode (MODE m)
|
||||
{
|
||||
// we don't ever expect mode to goto to unknown
|
||||
if (m != UNK && next_state_.mode () != m)
|
||||
{
|
||||
// update expected state with new mode and set poll count
|
||||
next_state_.mode (m);
|
||||
retries_ = polls_to_stabilize;
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_post_ptt (bool p)
|
||||
{
|
||||
if (next_state_.ptt () != p)
|
||||
{
|
||||
// update expected state with new PTT and set poll count
|
||||
next_state_.ptt (p);
|
||||
retries_ = polls_to_stabilize;
|
||||
//retries_ = 0; // fast feedback on PTT
|
||||
}
|
||||
}
|
||||
|
||||
bool PollingTransceiver::do_pre_update ()
|
||||
{
|
||||
// if we are holding off a change then withhold the signal
|
||||
if (retries_ && state () != next_state_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void PollingTransceiver::do_sync (bool force_signal, bool no_poll)
|
||||
{
|
||||
if (!no_poll) poll (); // tell sub-classes to update our state
|
||||
|
||||
// Signal new state if it is directly requested or, what we expected
|
||||
// or, hasn't become what we expected after polls_to_stabilize
|
||||
// polls. Unsolicited changes will be signalled immediately unless
|
||||
// they intervene in a expected sequence where they will be delayed.
|
||||
if (retries_)
|
||||
{
|
||||
--retries_;
|
||||
if (force_signal || state () == next_state_ || !retries_)
|
||||
{
|
||||
// our client wants a signal regardless
|
||||
// or the expected state has arrived
|
||||
// or there are no more retries
|
||||
force_signal = true;
|
||||
}
|
||||
}
|
||||
else if (force_signal || state () != last_signalled_state_)
|
||||
{
|
||||
// here is the normal passive polling path either our client has
|
||||
// requested a state update regardless of change or state has
|
||||
// changed asynchronously
|
||||
force_signal = true;
|
||||
}
|
||||
|
||||
if (force_signal)
|
||||
{
|
||||
// reset everything, record and signal the current state
|
||||
retries_ = 0;
|
||||
next_state_ = state ();
|
||||
last_signalled_state_ = state ();
|
||||
update_complete (true);
|
||||
}
|
||||
}
|
||||
|
||||
void PollingTransceiver::handle_timeout ()
|
||||
{
|
||||
QString message;
|
||||
|
||||
// we must catch all exceptions here since we are called by Qt and
|
||||
// inform our parent of the failure via the offline() message
|
||||
try
|
||||
{
|
||||
do_sync ();
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
message = e.what ();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
message = tr ("Unexpected rig error");
|
||||
}
|
||||
if (!message.isEmpty ())
|
||||
{
|
||||
offline (message);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
@@ -0,0 +1,63 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// 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)
|
||||
#ifndef OPERATOR_ID_DWA2002531_HPP
|
||||
# define OPERATOR_ID_DWA2002531_HPP
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
enum operator_id
|
||||
{
|
||||
op_add,
|
||||
op_sub,
|
||||
op_mul,
|
||||
op_div,
|
||||
op_mod,
|
||||
op_divmod,
|
||||
op_pow,
|
||||
op_lshift,
|
||||
op_rshift,
|
||||
op_and,
|
||||
op_xor,
|
||||
op_or,
|
||||
op_neg,
|
||||
op_pos,
|
||||
op_abs,
|
||||
op_invert,
|
||||
op_int,
|
||||
op_long,
|
||||
op_float,
|
||||
op_str,
|
||||
op_cmp,
|
||||
op_gt,
|
||||
op_ge,
|
||||
op_lt,
|
||||
op_le,
|
||||
op_eq,
|
||||
op_ne,
|
||||
op_iadd,
|
||||
op_isub,
|
||||
op_imul,
|
||||
op_idiv,
|
||||
op_imod,
|
||||
op_ilshift,
|
||||
op_irshift,
|
||||
op_iand,
|
||||
op_ixor,
|
||||
op_ior,
|
||||
op_complex,
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
op_bool,
|
||||
#else
|
||||
op_nonzero,
|
||||
#endif
|
||||
op_repr
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
,op_truediv
|
||||
#endif
|
||||
};
|
||||
|
||||
}}} // namespace boost::python::detail
|
||||
|
||||
#endif // OPERATOR_ID_DWA2002531_HPP
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Windows
|
||||
#
|
||||
inkscape -z -e /tmp/image-0.png wsjt_globe_128x128.svg
|
||||
inkscape -z -e /tmp/image-1.png wsjtx_globe_1024x1024.svg
|
||||
convert '/tmp/image-%d.png[0-1]' -background transparent \
|
||||
\( -clone 0 -resize 16 -colors 256 -compress none \) \
|
||||
\( -clone 0 -resize 20 -colors 256 -compress none \) \
|
||||
\( -clone 0 -resize 24 -colors 256 -compress none \) \
|
||||
\( -clone 0 -resize 32 -colors 256 -compress none \) \
|
||||
\( -clone 0 -resize 40 -colors 256 -compress none \) \
|
||||
\( -clone 1 -resize 48 -colors 256 -compress none \) \
|
||||
\( -clone 1 -resize 96 -colors 256 -compress none \) \
|
||||
\( -clone 1 -resize 128 -colors 256 -compress none \) \
|
||||
\( -clone 0 -resize 16 -compress none \) \
|
||||
\( -clone 0 -resize 20 -compress none \) \
|
||||
\( -clone 0 -resize 24 -compress none \) \
|
||||
\( -clone 0 -resize 32 -compress none \) \
|
||||
\( -clone 0 -resize 40 -compress none \) \
|
||||
\( -clone 1 -resize 48 -compress none \) \
|
||||
\( -clone 1 -resize 64 -compress none \) \
|
||||
\( -clone 1 -resize 96 -compress none \) \
|
||||
\( -clone 1 -resize 128 -compress none \) \
|
||||
\( -clone 1 -resize 256 -compress Zip \) \
|
||||
-delete 1 -delete 0 \
|
||||
-alpha remove ../icons/windows-icons/wsjtx.ico
|
||||
rm /tmp/image-0.png /tmp/image-1.png
|
||||
identify -format '%f %p/%n %m %C/%Q %r %G %A %z\n' ../icons/windows-icons/wsjtx.ico
|
||||
#
|
||||
inkscape -z -e /dev/stdout -w 150 -h 57 -b white installer_logo.svg | tail -n +4 | \
|
||||
convert png:- -resize 150x57 +matte BMP3:../icons/windows-icons/installer_logo.bmp
|
||||
identify -format '%f %p/%n %m %C/%Q %r %G %A %z\n' ../icons/windows-icons/installer_logo.bmp
|
||||
|
||||
#
|
||||
# Mac
|
||||
#
|
||||
mkdir -p ../icons/Darwin/wsjtx.iconset
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_16x16.png -w 16 -h 16 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_16x16@2x.png -w 32 -h 32 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_32x32.png -w 32 -h 32 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_32x32@2x.png -w 64 -h 64 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_128x128.png -w 128 -h 128 wsjtx_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_128x128@2x.png -w 256 -h 256 wsjtx_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_256x256.png -w 256 -h 256 wsjtx_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_256x256@2x.png -w 512 -h 512 wsjtx_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_512x512.png -w 512 -h 512 wsjtx_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjtx.iconset/icon_512x512@2x.png -w 1024 -h 1024 wsjtx_globe_1024x1024.svg
|
||||
identify -format '%f %p/%n %m %C/%Q %r %G %A %z\n' ../icons/Darwin/wsjtx.iconset/*
|
||||
# generic globe iconset for utilities
|
||||
mkdir -p ../icons/Darwin/wsjt.iconset
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_16x16.png -w 16 -h 16 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_16x16@2x.png -w 32 -h 32 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_32x32.png -w 32 -h 32 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_32x32@2x.png -w 64 -h 64 wsjt_globe_128x128.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_128x128.png -w 128 -h 128 wsjt_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_128x128@2x.png -w 256 -h 256 wsjt_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_256x256.png -w 256 -h 256 wsjt_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_256x256@2x.png -w 512 -h 512 wsjt_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_512x512.png -w 512 -h 512 wsjt_globe_1024x1024.svg
|
||||
inkscape -z -e ../icons/Darwin/wsjt.iconset/icon_512x512@2x.png -w 1024 -h 1024 wsjt_globe_1024x1024.svg
|
||||
identify -format '%f %p/%n %m %C/%Q %r %G %A %z\n' ../icons/Darwin/wsjt.iconset/*
|
||||
#
|
||||
inkscape -z -e "../icons/Darwin/DragNDrop Background.png" -w 640 -h 480 -b white "DragNDrop Background.svg"
|
||||
identify -format '%f %p/%n %m %C/%Q %r %G %A %z\n' "../icons/Darwin/DragNDrop Background.png"
|
||||
|
||||
#
|
||||
# KDE & Gnome
|
||||
#
|
||||
inkscape -z -e ../icons/Unix/wsjtx_icon.png -w 128 -h 128 wsjtx_globe_1024x1024.svg
|
||||
identify -format '%f %p/%n %m %C/%Q %r %G %A %z\n' ../icons/Unix/wsjtx_icon.png
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// (C) Copyright Eric Friedman 2002-2003.
|
||||
// (C) Copyright Antony Polukhin 2013.
|
||||
// Use, modification and distribution are subject to 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/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR
|
||||
|
||||
#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
|
||||
#include <boost/type_traits/is_pod.hpp>
|
||||
#include <boost/type_traits/is_volatile.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang)
|
||||
#include <boost/type_traits/is_constructible.hpp>
|
||||
#include <boost/type_traits/is_volatile.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <typename T> struct has_trivial_move_constructor : public integral_constant<bool, BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)>{};
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
#include <boost/type_traits/is_constructible.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#if __cplusplus >= 201103
|
||||
#define SOLARIS_EXTRA_CHECK && is_constructible<typename remove_const<T>::type, typename remove_const<T>::type&&>::value
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SOLARIS_EXTRA_CHECK
|
||||
#define SOLARIS_EXTRA_CHECK
|
||||
#endif
|
||||
|
||||
#include <boost/type_traits/is_pod.hpp>
|
||||
#include <boost/type_traits/is_volatile.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <typename T> struct has_trivial_move_constructor
|
||||
: public integral_constant<bool, ::boost::is_pod<T>::value && !::boost::is_volatile<T>::value SOLARIS_EXTRA_CHECK>{};
|
||||
|
||||
#undef SOLARIS_EXTRA_CHECK
|
||||
|
||||
#endif
|
||||
|
||||
template <> struct has_trivial_move_constructor<void> : public false_type{};
|
||||
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
template <> struct has_trivial_move_constructor<void const> : public false_type{};
|
||||
template <> struct has_trivial_move_constructor<void volatile> : public false_type{};
|
||||
template <> struct has_trivial_move_constructor<void const volatile> : public false_type{};
|
||||
#endif
|
||||
// What should we do with reference types??? The standard seems to suggest these are trivial, even if the thing they reference is not:
|
||||
template <class T> struct has_trivial_move_constructor<T&> : public true_type{};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T> struct has_trivial_move_constructor<T&&> : public true_type{};
|
||||
#endif
|
||||
// Arrays can not be explicitly copied:
|
||||
template <class T, std::size_t N> struct has_trivial_move_constructor<T[N]> : public false_type{};
|
||||
template <class T> struct has_trivial_move_constructor<T[]> : public false_type{};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
|
||||
Reference in New Issue
Block a user