mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Merge branch 'release-2.2.0'
This commit is contained in:
commit
83b8caacd3
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3,3 +3,4 @@
|
||||
/lib/fsk4hf export-ignore
|
||||
/lib/fsk4hf export-ignore
|
||||
/robots export-ignore
|
||||
/plots export-ignore
|
||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -7,4 +7,7 @@ jnq*
|
||||
*.exe
|
||||
*.o
|
||||
*.mod
|
||||
*.pro.user
|
||||
*.pro.user
|
||||
*.txt
|
||||
cmake-build-debug
|
||||
cmake-build-release
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "AudioDevice.hpp"
|
||||
|
||||
bool AudioDevice::initialize (OpenMode mode, Channel channel)
|
||||
{
|
||||
m_channel = channel;
|
||||
|
||||
// open and ensure we are unbuffered if possible
|
||||
return QIODevice::open (mode | QIODevice::Unbuffered);
|
||||
}
|
||||
|
||||
#include "AudioDevice.hpp"
|
||||
|
||||
bool AudioDevice::initialize (OpenMode mode, Channel channel)
|
||||
{
|
||||
m_channel = channel;
|
||||
|
||||
// open and ensure we are unbuffered if possible
|
||||
return QIODevice::open (mode | QIODevice::Unbuffered);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace
|
||||
{
|
||||
auto end = reinterpret_cast<char const *> (::memchr (id, '\0', 4u));
|
||||
auto len = end ? end - id : 4u;
|
||||
memcpy (id_.data (), id, len);
|
||||
::memcpy (id_.data (), id, len);
|
||||
if (len < 4u)
|
||||
{
|
||||
memset (id_.data () + len, ' ', 4u - len);
|
||||
@ -46,7 +46,7 @@ namespace
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy (id_.data (), "JUNK", 4u);
|
||||
::memcpy (id_.data (), "JUNK", 4u);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,12 +86,12 @@ namespace
|
||||
{
|
||||
// set some sensible defaults for the "bext" fields
|
||||
auto now = QDateTime::currentDateTimeUtc ();
|
||||
std::strncpy (origination_date_,
|
||||
now.date ().toString ("yyyy-MM-dd").toLocal8Bit ().constData (),
|
||||
sizeof origination_date_);
|
||||
std::strncpy (origination_time_,
|
||||
now.time ().toString ("hh-mm-ss").toLocal8Bit ().constData (),
|
||||
sizeof origination_time_);
|
||||
::memcpy (origination_date_,
|
||||
now.date ().toString ("yyyy-MM-dd").toLocal8Bit ().constData (),
|
||||
sizeof origination_date_);
|
||||
::memcpy (origination_time_,
|
||||
now.time ().toString ("hh-mm-ss").toLocal8Bit ().constData (),
|
||||
sizeof origination_time_);
|
||||
auto uuid = QUuid::createUuid ().toRfc4122 ();
|
||||
std::copy (uuid.cbegin (), uuid.cend (), umid_.data () + 16);
|
||||
}
|
||||
@ -354,6 +354,7 @@ bool BWFFile::impl::update_header ()
|
||||
{
|
||||
case BextVersion::v_0:
|
||||
data->version_ = qToBigEndian<quint32> (data->version_);
|
||||
// fall through
|
||||
default:
|
||||
data->loudness_value_ = qToBigEndian<quint16> (data->loudness_value_);
|
||||
data->loudness_range_ = qToBigEndian<quint16> (data->loudness_range_);
|
||||
@ -370,6 +371,7 @@ bool BWFFile::impl::update_header ()
|
||||
{
|
||||
case BextVersion::v_0:
|
||||
data->version_ = qToLittleEndian<quint32> (data->version_);
|
||||
// fall through
|
||||
default:
|
||||
data->loudness_value_ = qToLittleEndian<quint16> (data->loudness_value_);
|
||||
data->loudness_range_ = qToLittleEndian<quint16> (data->loudness_range_);
|
||||
@ -686,7 +688,7 @@ QByteArray BWFFile::bext_description () const
|
||||
void BWFFile::bext_description (QByteArray const& description)
|
||||
{
|
||||
m_->header_dirty_ = true;
|
||||
std::strncpy (m_->bext ()->description_, description.constData (), sizeof (BroadcastAudioExtension::description_));
|
||||
::memcpy (m_->bext ()->description_, description.constData (), sizeof BroadcastAudioExtension::description_);
|
||||
}
|
||||
|
||||
QByteArray BWFFile::bext_originator () const
|
||||
@ -698,7 +700,7 @@ QByteArray BWFFile::bext_originator () const
|
||||
void BWFFile::bext_originator (QByteArray const& originator)
|
||||
{
|
||||
m_->header_dirty_ = true;
|
||||
std::strncpy (m_->bext ()->originator_, originator.constData (), sizeof (BroadcastAudioExtension::originator_));
|
||||
::memcpy (m_->bext ()->originator_, originator.constData (), sizeof BroadcastAudioExtension::originator_);
|
||||
}
|
||||
|
||||
QByteArray BWFFile::bext_originator_reference () const
|
||||
@ -710,7 +712,7 @@ QByteArray BWFFile::bext_originator_reference () const
|
||||
void BWFFile::bext_originator_reference (QByteArray const& reference)
|
||||
{
|
||||
m_->header_dirty_ = true;
|
||||
std::strncpy (m_->bext ()->originator_reference_, reference.constData (), sizeof (BroadcastAudioExtension::originator_reference_));
|
||||
::memcpy (m_->bext ()->originator_reference_, reference.constData (), sizeof BroadcastAudioExtension::originator_reference_);
|
||||
}
|
||||
|
||||
QDateTime BWFFile::bext_origination_date_time () const
|
||||
@ -723,12 +725,12 @@ QDateTime BWFFile::bext_origination_date_time () const
|
||||
void BWFFile::bext_origination_date_time (QDateTime const& dt)
|
||||
{
|
||||
m_->header_dirty_ = true;
|
||||
std::strncpy (m_->bext ()->origination_date_,
|
||||
dt.date ().toString ("yyyy-MM-dd").toLocal8Bit ().constData (),
|
||||
sizeof (BroadcastAudioExtension::origination_date_));
|
||||
std::strncpy (m_->bext ()->origination_time_,
|
||||
dt.time ().toString ("hh-mm-ss").toLocal8Bit ().constData (),
|
||||
sizeof (BroadcastAudioExtension::origination_time_));
|
||||
::memcpy (m_->bext ()->origination_date_,
|
||||
dt.date ().toString ("yyyy-MM-dd").toLocal8Bit ().constData (),
|
||||
sizeof BroadcastAudioExtension::origination_date_);
|
||||
::memcpy (m_->bext ()->origination_time_,
|
||||
dt.time ().toString ("hh-mm-ss").toLocal8Bit ().constData (),
|
||||
sizeof BroadcastAudioExtension::origination_time_);
|
||||
}
|
||||
|
||||
quint64 BWFFile::bext_time_reference () const
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <QPointer>
|
||||
#include <QAudioInput>
|
||||
|
||||
#include "AudioDevice.hpp"
|
||||
#include "Audio/AudioDevice.hpp"
|
||||
|
||||
class QAudioDeviceInfo;
|
||||
class QAudioInput;
|
111
CMakeLists.txt
111
CMakeLists.txt
@ -10,15 +10,15 @@ if (APPLE)
|
||||
#
|
||||
# otool -l <binary> | grep -A3 LC_VERSION_MIN_MACOSX
|
||||
#
|
||||
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.10
|
||||
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.13
|
||||
CACHE STRING "Earliest version of OS X supported
|
||||
|
||||
Earliest version we can support with Qt 5.8, C++11 & libc++ is 10.10.
|
||||
Earliest version we can support with Qt 5.14, C++11 & libc++ is 10.13.
|
||||
Do not override this if you intend to build an official deployable installer.")
|
||||
set (CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
|
||||
CACHE STRING "Mac OS X SDK to build with
|
||||
|
||||
Change this to the newest SDK available that you can install on your system (10.11 preferred).
|
||||
Change this to the newest SDK available that you can install on your system (10.14 preferred).
|
||||
Do not override this if you intend to build an official deployable installer.")
|
||||
endif (APPLE)
|
||||
|
||||
@ -224,9 +224,10 @@ set (WSJT_QT_CONF_DESTINATION ${QT_CONF_DESTINATION} CACHE PATH "Path for the qt
|
||||
#
|
||||
set (wsjt_qt_CXXSRCS
|
||||
qt_helpers.cpp
|
||||
lib/shmem.cpp
|
||||
widgets/MessageBox.cpp
|
||||
MetaDataRegistry.cpp
|
||||
NetworkServerLookup.cpp
|
||||
Network/NetworkServerLookup.cpp
|
||||
revision_utils.cpp
|
||||
WFPalette.cpp
|
||||
Radio.cpp
|
||||
@ -243,17 +244,17 @@ set (wsjt_qt_CXXSRCS
|
||||
validators/LiveFrequencyValidator.cpp
|
||||
GetUserId.cpp
|
||||
TraceFile.cpp
|
||||
AudioDevice.cpp
|
||||
Transceiver.cpp
|
||||
TransceiverBase.cpp
|
||||
EmulateSplitTransceiver.cpp
|
||||
TransceiverFactory.cpp
|
||||
PollingTransceiver.cpp
|
||||
HamlibTransceiver.cpp
|
||||
HRDTransceiver.cpp
|
||||
DXLabSuiteCommanderTransceiver.cpp
|
||||
NetworkMessage.cpp
|
||||
MessageClient.cpp
|
||||
Audio/AudioDevice.cpp
|
||||
Transceiver/Transceiver.cpp
|
||||
Transceiver/TransceiverBase.cpp
|
||||
Transceiver/EmulateSplitTransceiver.cpp
|
||||
Transceiver/TransceiverFactory.cpp
|
||||
Transceiver/PollingTransceiver.cpp
|
||||
Transceiver/HamlibTransceiver.cpp
|
||||
Transceiver/HRDTransceiver.cpp
|
||||
Transceiver/DXLabSuiteCommanderTransceiver.cpp
|
||||
Network/NetworkMessage.cpp
|
||||
Network/MessageClient.cpp
|
||||
widgets/LettersSpinBox.cpp
|
||||
widgets/HintedSpinBox.cpp
|
||||
widgets/RestrictedSpinBox.cpp
|
||||
@ -271,7 +272,7 @@ set (wsjt_qt_CXXSRCS
|
||||
EqualizationToolsDialog.cpp
|
||||
widgets/DoubleClickablePushButton.cpp
|
||||
widgets/DoubleClickableRadioButton.cpp
|
||||
LotWUsers.cpp
|
||||
Network/LotWUsers.cpp
|
||||
models/DecodeHighlightingModel.cpp
|
||||
widgets/DecodeHighlightingListView.cpp
|
||||
models/FoxLog.cpp
|
||||
@ -282,6 +283,7 @@ set (wsjt_qt_CXXSRCS
|
||||
item_delegates/MaidenheadLocatorDelegate.cpp
|
||||
item_delegates/FrequencyDelegate.cpp
|
||||
item_delegates/FrequencyDeltaDelegate.cpp
|
||||
item_delegates/SQLiteDateTimeDelegate.cpp
|
||||
models/CabrilloLog.cpp
|
||||
logbook/AD1CCty.cpp
|
||||
logbook/WorkedBefore.cpp
|
||||
@ -297,21 +299,17 @@ set (jt9_FSRCS
|
||||
lib/jt9a.f90
|
||||
)
|
||||
|
||||
set (jt9_CXXSRCS
|
||||
lib/ipcomm.cpp
|
||||
)
|
||||
|
||||
set (wsjtx_CXXSRCS
|
||||
logbook/logbook.cpp
|
||||
psk_reporter.cpp
|
||||
Modulator.cpp
|
||||
Detector.cpp
|
||||
Network/psk_reporter.cpp
|
||||
Modulator/Modulator.cpp
|
||||
Detector/Detector.cpp
|
||||
widgets/logqso.cpp
|
||||
widgets/displaytext.cpp
|
||||
decodedtext.cpp
|
||||
Decoder/decodedtext.cpp
|
||||
getfile.cpp
|
||||
soundout.cpp
|
||||
soundin.cpp
|
||||
Audio/soundout.cpp
|
||||
Audio/soundin.cpp
|
||||
widgets/meterwidget.cpp
|
||||
widgets/signalmeter.cpp
|
||||
widgets/plotter.cpp
|
||||
@ -324,12 +322,12 @@ set (wsjtx_CXXSRCS
|
||||
widgets/astro.cpp
|
||||
widgets/messageaveraging.cpp
|
||||
widgets/colorhighlighting.cpp
|
||||
WsprTxScheduler.cpp
|
||||
WSPR/WsprTxScheduler.cpp
|
||||
widgets/mainwindow.cpp
|
||||
Configuration.cpp
|
||||
main.cpp
|
||||
wsprnet.cpp
|
||||
WSPRBandHopping.cpp
|
||||
Network/wsprnet.cpp
|
||||
WSPR/WSPRBandHopping.cpp
|
||||
widgets/ExportCabrillo.cpp
|
||||
)
|
||||
|
||||
@ -353,12 +351,13 @@ if (WIN32)
|
||||
|
||||
set (wsjt_qt_CXXSRCS
|
||||
${wsjt_qt_CXXSRCS}
|
||||
OmniRigTransceiver.cpp
|
||||
Transceiver/OmniRigTransceiver.cpp
|
||||
)
|
||||
endif (WIN32)
|
||||
|
||||
set (wsjt_FSRCS
|
||||
# put module sources first in the hope that they get rebuilt before use
|
||||
lib/shmem.f90
|
||||
lib/crc.f90
|
||||
lib/fftw3mod.f90
|
||||
lib/hashing.f90
|
||||
@ -416,6 +415,7 @@ set (wsjt_FSRCS
|
||||
lib/decode65a.f90
|
||||
lib/decode65b.f90
|
||||
lib/decode9w.f90
|
||||
lib/ft8/decode174_91.f90
|
||||
lib/decoder.f90
|
||||
lib/deep4.f90
|
||||
lib/deg2grid.f90
|
||||
@ -427,15 +427,13 @@ set (wsjt_FSRCS
|
||||
lib/encode4.f90
|
||||
lib/encode_msk40.f90
|
||||
lib/encode_128_90.f90
|
||||
lib/ft8/encode174.f90
|
||||
lib/ft8/encode174_91.f90
|
||||
lib/ft8/encode174_91_nocrc.f90
|
||||
lib/entail.f90
|
||||
lib/ephem.f90
|
||||
lib/extract.f90
|
||||
lib/extract4.f90
|
||||
lib/extractmessage77.f90
|
||||
lib/ft8/extractmessage174.f90
|
||||
lib/ft8/extractmessage174_91.f90
|
||||
lib/fano232.f90
|
||||
lib/fast9.f90
|
||||
lib/fast_decode.f90
|
||||
@ -461,16 +459,12 @@ set (wsjt_FSRCS
|
||||
lib/ft8/foxfilt.f90
|
||||
lib/ft8/foxgen.f90
|
||||
lib/ft8/foxgen_wrap.f90
|
||||
lib/fqso_first.f90
|
||||
lib/freqcal.f90
|
||||
lib/ft8/ft8apset.f90
|
||||
lib/ft8/ft8b.f90
|
||||
lib/ft8/ft8code.f90
|
||||
lib/ft8/ft8_downsample.f90
|
||||
lib/ft8.f90
|
||||
lib/ft8dec.f90
|
||||
lib/ft8/ft8sim.f90
|
||||
lib/ft8/ft8sim_gfsk.f90
|
||||
lib/gen4.f90
|
||||
lib/gen65.f90
|
||||
lib/gen9.f90
|
||||
@ -478,6 +472,7 @@ set (wsjt_FSRCS
|
||||
lib/ft8/genft8.f90
|
||||
lib/genmsk_128_90.f90
|
||||
lib/genmsk40.f90
|
||||
lib/ft4/ft4code.f90
|
||||
lib/ft4/genft4.f90
|
||||
lib/ft4/gen_ft4wave.f90
|
||||
lib/ft8/gen_ft8wave.f90
|
||||
@ -485,8 +480,10 @@ set (wsjt_FSRCS
|
||||
lib/ft8/genft8refsig.f90
|
||||
lib/genwspr.f90
|
||||
lib/geodist.f90
|
||||
lib/ft8/get_crc14.f90
|
||||
lib/getlags.f90
|
||||
lib/getmet4.f90
|
||||
lib/ft8/get_spectrum_baseline.f90
|
||||
lib/ft2/gfsk_pulse.f90
|
||||
lib/graycode.f90
|
||||
lib/graycode65.f90
|
||||
@ -533,6 +530,7 @@ set (wsjt_FSRCS
|
||||
lib/77bit/my_hash.f90
|
||||
lib/wsprd/osdwspr.f90
|
||||
lib/ft8/osd174_91.f90
|
||||
lib/osd128_90.f90
|
||||
lib/pctile.f90
|
||||
lib/peakdt9.f90
|
||||
lib/peakup.f90
|
||||
@ -682,13 +680,13 @@ set (wsjtx_UISRCS
|
||||
set (UDP_library_CXXSRCS
|
||||
Radio.cpp
|
||||
RadioMetaType.cpp
|
||||
NetworkMessage.cpp
|
||||
MessageServer.cpp
|
||||
Network/NetworkMessage.cpp
|
||||
UDPExamples/MessageServer.cpp
|
||||
)
|
||||
|
||||
set (UDP_library_HEADERS
|
||||
Radio.hpp
|
||||
MessageServer.hpp
|
||||
UDPExamples/MessageServer.hpp
|
||||
${PROJECT_BINARY_DIR}/udp_export.h
|
||||
)
|
||||
|
||||
@ -713,7 +711,6 @@ set (all_CXXSRCS
|
||||
${wsjt_CXXSRCS}
|
||||
${wsjt_qt_CXXSRCS}
|
||||
${wsjt_qtmm_CXXSRCS}
|
||||
${jt9_CXXSRCS}
|
||||
${wsjtx_CXXSRCS}
|
||||
${qcp_CXXSRCS}
|
||||
)
|
||||
@ -790,6 +787,10 @@ endif (APPLE)
|
||||
|
||||
set_source_files_properties (${WSJTX_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
|
||||
# suppress intransigent compiler diagnostics
|
||||
set_source_files_properties (lib/decoder.f90 PROPERTIES COMPILE_FLAGS "-Wno-unused-dummy-argument")
|
||||
set_source_files_properties (lib/filbig.f90 PROPERTIES COMPILE_FLAGS "-Wno-aliasing")
|
||||
|
||||
if (WSJT_QDEBUG_IN_RELEASE)
|
||||
# context info in Qt message handler in release configuration
|
||||
set_property (DIRECTORY APPEND PROPERTY
|
||||
@ -919,7 +920,7 @@ set (CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
||||
#
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
|
||||
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fexceptions -frtti")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -fexceptions -frtti")
|
||||
|
||||
if (NOT APPLE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas")
|
||||
@ -1099,7 +1100,7 @@ set (LANGUAGES
|
||||
foreach (lang_ ${LANGUAGES})
|
||||
file (TO_NATIVE_PATH translations/wsjtx_${lang_}.ts ts_)
|
||||
list (APPEND TS_FILES ${ts_})
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
if (UPDATE_TRANSLATIONS)
|
||||
message (STATUS "UPDATE_TRANSLATIONS option is set.")
|
||||
qt5_create_translation (
|
||||
@ -1219,7 +1220,7 @@ add_executable (fcal lib/fcal.f90 wsjtx.rc)
|
||||
|
||||
add_executable (fmeasure lib/fmeasure.f90 wsjtx.rc)
|
||||
|
||||
add_executable (jt9 ${jt9_FSRCS} ${jt9_CXXSRCS} wsjtx.rc)
|
||||
add_executable (jt9 ${jt9_FSRCS} wsjtx.rc)
|
||||
if (${OPENMP_FOUND} OR APPLE)
|
||||
if (APPLE)
|
||||
# On Mac we don't have working OpenMP support in the C/C++
|
||||
@ -1248,11 +1249,11 @@ if (${OPENMP_FOUND} OR APPLE)
|
||||
)
|
||||
endif (APPLE)
|
||||
if (WIN32)
|
||||
# set_target_properties (jt9 PROPERTIES
|
||||
# LINK_FLAGS -Wl,--stack,16777216
|
||||
# )
|
||||
set_target_properties (jt9 PROPERTIES
|
||||
LINK_FLAGS -Wl,--stack,16777216
|
||||
)
|
||||
endif ()
|
||||
target_link_libraries (jt9 wsjt_fort_omp wsjt_cxx Qt5::Core)
|
||||
target_link_libraries (jt9 wsjt_fort_omp wsjt_cxx wsjt_qt)
|
||||
else (${OPENMP_FOUND} OR APPLE)
|
||||
target_link_libraries (jt9 wsjt_fort wsjt_cxx Qt5::Core)
|
||||
endif (${OPENMP_FOUND} OR APPLE)
|
||||
@ -1264,6 +1265,9 @@ target_link_libraries (jt4sim wsjt_fort wsjt_cxx)
|
||||
add_executable (jt65sim lib/jt65sim.f90 wsjtx.rc)
|
||||
target_link_libraries (jt65sim wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (sumsim lib/sumsim.f90 wsjtx.rc)
|
||||
target_link_libraries (sumsim wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (qra64sim lib/qra/qra64/qra64sim.f90 wsjtx.rc)
|
||||
target_link_libraries (qra64sim wsjt_fort wsjt_cxx)
|
||||
|
||||
@ -1288,6 +1292,9 @@ target_link_libraries (jt9code wsjt_fort wsjt_cxx)
|
||||
add_executable (wsprcode lib/wsprcode/wsprcode.f90 lib/wsprcode/nhash.c
|
||||
wsjtx.rc)
|
||||
target_link_libraries (wsprcode wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (encode77 lib/77bit/encode77.f90 wsjtx.rc)
|
||||
target_link_libraries (encode77 wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (wsprsim ${wsprsim_CSRCS})
|
||||
|
||||
@ -1303,15 +1310,12 @@ target_link_libraries (jt65 wsjt_fort wsjt_cxx)
|
||||
add_executable (ft8code lib/ft8/ft8code.f90 wsjtx.rc)
|
||||
target_link_libraries (ft8code wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (ft8 lib/ft8.f90 wsjtx.rc)
|
||||
target_link_libraries (ft8 wsjt_fort wsjt_cxx)
|
||||
add_executable (ft4code lib/ft4/ft4code.f90 wsjtx.rc)
|
||||
target_link_libraries (ft4code wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (ft8sim lib/ft8/ft8sim.f90 wsjtx.rc)
|
||||
target_link_libraries (ft8sim wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (ft8sim_gfsk lib/ft8/ft8sim_gfsk.f90 wsjtx.rc)
|
||||
target_link_libraries (ft8sim_gfsk wsjt_fort wsjt_cxx)
|
||||
|
||||
add_executable (msk144sim lib/msk144sim.f90 wsjtx.rc)
|
||||
target_link_libraries (msk144sim wsjt_fort wsjt_cxx)
|
||||
|
||||
@ -1628,6 +1632,7 @@ if (NOT is_debug_build)
|
||||
PATTERN "*minimal*${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
|
||||
PATTERN "*offscreen*${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
|
||||
PATTERN "*quick*${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
|
||||
PATTERN "*webgl*${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
|
||||
PATTERN "*_debug${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
|
||||
)
|
||||
install (
|
||||
|
@ -172,18 +172,18 @@
|
||||
#include "item_delegates/ForeignKeyDelegate.hpp"
|
||||
#include "item_delegates/FrequencyDelegate.hpp"
|
||||
#include "item_delegates/FrequencyDeltaDelegate.hpp"
|
||||
#include "TransceiverFactory.hpp"
|
||||
#include "Transceiver.hpp"
|
||||
#include "Transceiver/TransceiverFactory.hpp"
|
||||
#include "Transceiver/Transceiver.hpp"
|
||||
#include "models/Bands.hpp"
|
||||
#include "models/IARURegions.hpp"
|
||||
#include "models/Modes.hpp"
|
||||
#include "models/FrequencyList.hpp"
|
||||
#include "models/StationList.hpp"
|
||||
#include "NetworkServerLookup.hpp"
|
||||
#include "Network/NetworkServerLookup.hpp"
|
||||
#include "widgets/MessageBox.hpp"
|
||||
#include "validators/MaidenheadLocatorValidator.hpp"
|
||||
#include "validators/CallsignValidator.hpp"
|
||||
#include "LotWUsers.hpp"
|
||||
#include "Network/LotWUsers.hpp"
|
||||
#include "models/DecodeHighlightingModel.hpp"
|
||||
#include "logbook/logbook.h"
|
||||
|
||||
@ -1084,6 +1084,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network
|
||||
ui_->special_op_activity_button_group->setId (ui_->rbEU_VHF_Contest, static_cast<int> (SpecialOperatingActivity::EU_VHF));
|
||||
ui_->special_op_activity_button_group->setId (ui_->rbField_Day, static_cast<int> (SpecialOperatingActivity::FIELD_DAY));
|
||||
ui_->special_op_activity_button_group->setId (ui_->rbRTTY_Roundup, static_cast<int> (SpecialOperatingActivity::RTTY));
|
||||
ui_->special_op_activity_button_group->setId (ui_->rbWW_DIGI, static_cast<int> (SpecialOperatingActivity::WW_DIGI));
|
||||
ui_->special_op_activity_button_group->setId (ui_->rbFox, static_cast<int> (SpecialOperatingActivity::FOX));
|
||||
ui_->special_op_activity_button_group->setId (ui_->rbHound, static_cast<int> (SpecialOperatingActivity::HOUND));
|
||||
|
||||
@ -1383,8 +1384,8 @@ void Configuration::impl::read_settings ()
|
||||
txDelay_ = settings_->value ("TxDelay",0.2).toDouble();
|
||||
aggressive_ = settings_->value ("Aggressive", 0).toInt ();
|
||||
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
||||
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
||||
azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ();
|
||||
save_directory_.setPath (settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ());
|
||||
azel_directory_.setPath (settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ());
|
||||
|
||||
{
|
||||
//
|
||||
@ -2069,8 +2070,8 @@ void Configuration::impl::accept ()
|
||||
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||
bLowSidelobes_ = ui_->rbLowSidelobes->isChecked();
|
||||
save_directory_ = ui_->save_path_display_label->text ();
|
||||
azel_directory_ = ui_->azel_path_display_label->text ();
|
||||
save_directory_.setPath (ui_->save_path_display_label->text ());
|
||||
azel_directory_.setPath (ui_->azel_path_display_label->text ());
|
||||
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
||||
decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked ();
|
||||
single_decode_ = ui_->single_decode_check_box->isChecked ();
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include "Radio.hpp"
|
||||
#include "models/IARURegions.hpp"
|
||||
#include "AudioDevice.hpp"
|
||||
#include "Transceiver.hpp"
|
||||
#include "Audio/AudioDevice.hpp"
|
||||
#include "Transceiver/Transceiver.hpp"
|
||||
|
||||
#include "pimpl_h.hpp"
|
||||
|
||||
@ -180,7 +180,7 @@ public:
|
||||
bool highlight_only_fields () const;
|
||||
bool include_WAE_entities () const;
|
||||
|
||||
enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, FOX, HOUND};
|
||||
enum class SpecialOperatingActivity {NONE, NA_VHF, EU_VHF, FIELD_DAY, RTTY, WW_DIGI, FOX, HOUND};
|
||||
SpecialOperatingActivity special_op_id () const;
|
||||
|
||||
struct CalibrationParams
|
||||
|
118
Configuration.ui
118
Configuration.ui
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>554</width>
|
||||
<height>563</height>
|
||||
<width>670</width>
|
||||
<height>617</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -559,7 +559,7 @@ quiet period when decoding is done.</string>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<property name="currentText" stdset="0">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="insertPolicy">
|
||||
@ -951,7 +951,7 @@ a few, particularly some Kenwood rigs, require it).</string>
|
||||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="PTT_DTR_radio_button">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Use the RS-232 DTR control line to toggle your radio's PTT, requires hardware to inteface the line.</p><p>Some commercial interface units also use this method.</p><p>The DTR control line of the CAT serial port may be used for this or a DTR control line on a different serial port may be used.</p></body></html></string>
|
||||
<string><html><head/><body><p>Use the RS-232 DTR control line to toggle your radio's PTT, requires hardware to interface the line.</p><p>Some commercial interface units also use this method.</p><p>The DTR control line of the CAT serial port may be used for this or a DTR control line on a different serial port may be used.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&DTR</string>
|
||||
@ -982,7 +982,7 @@ other hardware interface for PTT.</string>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="PTT_RTS_radio_button">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Use the RS-232 RTS control line to toggle your radio's PTT, requires hardware to inteface the line.</p><p>Some commercial interface units also use this method.</p><p>The RTS control line of the CAT serial port may be used for this or a RTS control line on a different serial port may be used. Note that this option is not available on the CAT serial port when hardware flow control is used.</p></body></html></string>
|
||||
<string><html><head/><body><p>Use the RS-232 RTS control line to toggle your radio's PTT, requires hardware to interface the line.</p><p>Some commercial interface units also use this method.</p><p>The RTS control line of the CAT serial port may be used for this or a RTS control line on a different serial port may be used. Note that this option is not available on the CAT serial port when hardware flow control is used.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>R&TS</string>
|
||||
@ -1021,7 +1021,7 @@ other hardware interface for PTT.</string>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<property name="currentText" stdset="0">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
@ -1080,7 +1080,7 @@ or bandwidth is selected).</string>
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="mode_data_radio_button">
|
||||
<property name="toolTip">
|
||||
<string>If this is availabe then it is usually the correct mode for this program.</string>
|
||||
<string>If this is available then it is usually the correct mode for this program.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Data/P&kt</string>
|
||||
@ -2261,9 +2261,6 @@ Right click for insert and delete options.</string>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enable or disable using the check boxes and right-click an item to change or unset the foreground color, background color, or reset the item to default values. Drag and drop the items to change their priority, higher in the list is higher in priority.</p><p>Note that each foreground or background color may be either set or unset, unset means that it is not allocated for that item's type and lower priority items may apply.</p></body></html></string>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@ -2572,6 +2569,19 @@ Right click for insert and delete options.</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="3">
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_18" stretch="2,1,1">
|
||||
<item>
|
||||
@ -2635,19 +2645,6 @@ Right click for insert and delete options.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="3">
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_17" stretch="2,1,1">
|
||||
<item>
|
||||
@ -2711,6 +2708,25 @@ Right click for insert and delete options.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QRadioButton" name="rbWW_DIGI">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>World-Wide Digi-mode contest</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>WW Digi Contest</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">special_op_activity_button_group</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -2856,35 +2872,25 @@ Right click for insert and delete options.</string>
|
||||
<property name="title">
|
||||
<string>Waterfall spectra</string>
|
||||
</property>
|
||||
<widget class="QRadioButton" name="rbLowSidelobes">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Low sidelobes</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QRadioButton" name="rbMaxSensitivity">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>20</y>
|
||||
<width>92</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Most sensitive</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbLowSidelobes">
|
||||
<property name="text">
|
||||
<string>Low sidelobes</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbMaxSensitivity">
|
||||
<property name="text">
|
||||
<string>Most sensitive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -3103,12 +3109,12 @@ Right click for insert and delete options.</string>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="special_op_activity_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
@ -177,15 +177,6 @@ unsigned DecodedText::timeInSeconds() const
|
||||
+ (padding_ ? string_.mid (column_time + 2 + padding_, 2).toUInt () : 0U);
|
||||
}
|
||||
|
||||
/*
|
||||
2343 -11 0.8 1259 # YV6BFE F6GUU R-08
|
||||
2343 -19 0.3 718 # VE6WQ SQ2NIJ -14
|
||||
2343 -7 0.3 815 # KK4DSD W7VP -16
|
||||
2343 -13 0.1 3627 @ CT1FBK IK5YZT R+02
|
||||
|
||||
0605 Tx 1259 # CQ VK3ACF QF22
|
||||
*/
|
||||
|
||||
QString DecodedText::report() const // returns a string of the SNR field with a leading + or - followed by two digits
|
||||
{
|
||||
int sr = snr();
|
||||
@ -196,7 +187,7 @@ QString DecodedText::report() const // returns a string of the SNR field with a
|
||||
sr = 49;
|
||||
|
||||
QString rpt;
|
||||
rpt.sprintf("%d",abs(sr));
|
||||
rpt = rpt.asprintf("%d",abs(sr));
|
||||
if (sr > 9)
|
||||
rpt = "+" + rpt;
|
||||
else
|
@ -77,7 +77,6 @@ private:
|
||||
|
||||
QString string_;
|
||||
int padding_;
|
||||
bool contest_mode_;
|
||||
QString message_;
|
||||
QString message0_;
|
||||
bool is_standard_;
|
@ -11,6 +11,8 @@ extern "C" {
|
||||
void fil4_(qint16*, qint32*, qint16*, qint32*);
|
||||
}
|
||||
|
||||
extern dec_data_t dec_data;
|
||||
|
||||
Detector::Detector (unsigned frameRate, double periodLengthInSeconds,
|
||||
unsigned downSampleFactor, QObject * parent)
|
||||
: AudioDevice (parent)
|
||||
@ -18,7 +20,6 @@ Detector::Detector (unsigned frameRate, double periodLengthInSeconds,
|
||||
, m_period (periodLengthInSeconds)
|
||||
, m_downSampleFactor (downSampleFactor)
|
||||
, m_samplesPerFFT {max_buffer_size}
|
||||
, m_ns (999)
|
||||
, m_buffer ((downSampleFactor > 1) ?
|
||||
new short [max_buffer_size * downSampleFactor] : nullptr)
|
||||
, m_bufferPos (0)
|
@ -1,6 +1,6 @@
|
||||
#ifndef DETECTOR_HPP__
|
||||
#define DETECTOR_HPP__
|
||||
#include "AudioDevice.hpp"
|
||||
#include "Audio/AudioDevice.hpp"
|
||||
#include <QScopedArrayPointer>
|
||||
|
||||
//
|
||||
@ -46,7 +46,6 @@ private:
|
||||
double m_period;
|
||||
unsigned m_downSampleFactor;
|
||||
qint32 m_samplesPerFFT; // after any down sampling
|
||||
qint32 m_ns;
|
||||
static size_t const max_buffer_size {7 * 512};
|
||||
QScopedArrayPointer<short> m_buffer; // de-interleaved sample buffer
|
||||
// big enough for all the
|
@ -6,11 +6,11 @@
|
||||
|
||||
#include "Radio.hpp"
|
||||
#include "models/FrequencyList.hpp"
|
||||
#include "AudioDevice.hpp"
|
||||
#include "Audio/AudioDevice.hpp"
|
||||
#include "Configuration.hpp"
|
||||
#include "models/StationList.hpp"
|
||||
#include "Transceiver.hpp"
|
||||
#include "TransceiverFactory.hpp"
|
||||
#include "Transceiver/Transceiver.hpp"
|
||||
#include "Transceiver/TransceiverFactory.hpp"
|
||||
#include "WFPalette.hpp"
|
||||
#include "models/IARURegions.hpp"
|
||||
#include "models/DecodeHighlightingModel.hpp"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include "widgets/mainwindow.h" // TODO: G4WJS - break this dependency
|
||||
#include "soundout.h"
|
||||
#include "Audio/soundout.h"
|
||||
#include "commons.h"
|
||||
|
||||
#include "moc_Modulator.cpp"
|
@ -4,7 +4,7 @@
|
||||
#include <QAudio>
|
||||
#include <QPointer>
|
||||
|
||||
#include "AudioDevice.hpp"
|
||||
#include "Audio/AudioDevice.hpp"
|
||||
|
||||
class SoundOutput;
|
||||
|
92
NEWS
92
NEWS
@ -13,6 +13,98 @@
|
||||
Copyright 2001 - 2019 by Joe Taylor, K1JT.
|
||||
|
||||
|
||||
Release: WSJT-X 2.2.0-rc1
|
||||
May 10, 2020
|
||||
-------------------------
|
||||
|
||||
WSJT-X 2.2.0-rc1 is a beta-quality release candidate for a program
|
||||
upgrade that provides a number of new features and capabilities. These
|
||||
include:
|
||||
|
||||
- Improvements to the decoders for five modes:
|
||||
|
||||
FT4: Corrected bugs that prevented AP decoding and/or multi-pass
|
||||
decoding in some circumstances. The algorithm for AP
|
||||
decoding has been improved and extended.
|
||||
|
||||
FT8: Decoding is now spread over three intervals. The first
|
||||
starts at t = 11.8 s into an Rx sequence and typically yields
|
||||
around 85% of the possible decodes for the sequence. You
|
||||
therefore see most decodes much earlier than before. A second
|
||||
processing step starts at 13.5 s, and the final one at 14.7 s.
|
||||
Overall decoding yield on crowded bands is improved by 10% or
|
||||
more. (Systems with receive latency greater than 0.2 s will see
|
||||
smaller improvements, but will still see many decodes earlier
|
||||
than before.)
|
||||
|
||||
JT4: Formatting and display of Averaged and Deep Search decodes
|
||||
has been cleaned up and made consistent with other modes.
|
||||
Together with JT65 and QRA64, JT4 remains one of the digital
|
||||
modes widely for EME and other extreme weak-signal work on
|
||||
microwave bands.
|
||||
|
||||
JT65: Many improvements for Averaged and Deep Search decodes and
|
||||
their display to the user. These improvements are particularly
|
||||
important for EME on VHF and UHF bands.
|
||||
|
||||
WSPR: Significant improvements have been made to the WSPR
|
||||
decoder's sensitivity, its ability to cope with many signals in
|
||||
a crowded sub-band, and its rate of undetected false decodes.
|
||||
We now use up to three decoding passes. Passes 1 and 2 use
|
||||
noncoherent demodulation of single symbols and allow for
|
||||
frequency drifts up to ±4 Hz in a transmission. Pass 3 assumes
|
||||
no drift and does coherent block detection of up to three
|
||||
symbols. It also applies bit-by-bit normalization of the
|
||||
single-symbol bit metrics, a technique that has proven helpful
|
||||
for signals corrupted by artifacts of the subtraction of
|
||||
stronger signals and also for LF/MF signals heavily contaminated
|
||||
by lightning transients. With these improvements the number of
|
||||
decodes in a crowded WSPR sub-band typically increases by 10 to
|
||||
15%.
|
||||
|
||||
- New format for "EU VHF Contest" Tx2 and Tx3 messages
|
||||
|
||||
When "EU VHF Contest" is selected, the Tx2 and Tx3 messages
|
||||
(those conveying signal report, serial number, and 6-character
|
||||
locator) now use hashcodes for both callsigns. This change is
|
||||
NOT backward compatible with earlier versions of _WSJT-X_, so
|
||||
all users of EU VHF Contest messages should be sure to upgrade
|
||||
to versiion 2.2.0.
|
||||
|
||||
- Accessibility
|
||||
|
||||
Keyboard shortcuts have been added as an aid to accessibility:
|
||||
Alt+R sets Tx4 message to RR73, Ctrl+R sets it to RRR.
|
||||
|
||||
As an aid for partial color-blindness, the "inverted goal posts"
|
||||
marking Rx frequency on the Wide Graph's frequency scale are now
|
||||
rendered in a darker shade of green.
|
||||
|
||||
- Minor enhancements and bug fixes
|
||||
|
||||
"Save None" now writes no .wav files to disk, even temporarily.
|
||||
|
||||
An explicit entry for "WW Digi Contest" has been added to
|
||||
"Special operating activities" on the "Settings | Advanced" tab.
|
||||
|
||||
Contest mode FT4 now always uses RR73 for the Tx4 message.
|
||||
|
||||
The Status bar now displays the number of decodes found in the
|
||||
most recent Rx sequence.
|
||||
|
||||
Release candidate WSJT-X 2.2.0-rc1 will be available for beta-testing
|
||||
for one month starting on May 10, 2020. We currently plan a General
|
||||
Availability (GA) release of WSJT-X 2.2.0 on June 1, 2020.
|
||||
|
||||
For those looking even farther ahead: We are well along in the
|
||||
development of two new modes designed for the LF and MF bands. One
|
||||
mode is for WSPR-like activity and one for making 2-way QSOs. Both
|
||||
use Low-density Parity Check (LDPC) codes, 4-GFSK modulation, and
|
||||
two-minute T/R sequences. The QSO mode reaches threshold SNR
|
||||
sensitivity around -31 dB on the AWGN channel, and the WSPR-like mode
|
||||
better than -32 dB.
|
||||
|
||||
|
||||
Release: WSJT-X 2.1.1
|
||||
November 25, 2019
|
||||
---------------------
|
||||
|
@ -66,8 +66,7 @@ network_server_lookup (QString query
|
||||
{
|
||||
break;
|
||||
}
|
||||
// drop through
|
||||
|
||||
// fall through
|
||||
case QAbstractSocket::AnyIPProtocol:
|
||||
found = true;
|
||||
break;
|
@ -8,7 +8,7 @@
|
||||
#include <QHostInfo>
|
||||
#include <QTimer>
|
||||
|
||||
#include "MessageClient.hpp"
|
||||
#include "Network/MessageClient.hpp"
|
||||
|
||||
#include "moc_psk_reporter.cpp"
|
||||
|
@ -10,7 +10,100 @@
|
||||
|
||||
|
||||
|
||||
Copyright 2001 - 2019 by Joe Taylor, K1JT.
|
||||
Copyright 2001 - 2020 by Joe Taylor, K1JT.
|
||||
|
||||
|
||||
Release: WSJT-X 2.2.0-rc1
|
||||
May 10, 2020
|
||||
-------------------------
|
||||
|
||||
WSJT-X 2.2.0-rc1 is a beta-quality release candidate for a program
|
||||
upgrade that provides a number of new features and capabilities. These
|
||||
include:
|
||||
|
||||
- Improvements to the decoders for five modes:
|
||||
|
||||
FT4: Corrected bugs that prevented AP decoding and/or multi-pass
|
||||
decoding in some circumstances. The algorithm for AP
|
||||
decoding has been improved and extended.
|
||||
|
||||
FT8: Decoding is now spread over three intervals. The first
|
||||
starts at t = 11.8 s into an Rx sequence and typically yields
|
||||
around 85% of the possible decodes for the sequence. You
|
||||
therefore see most decodes much earlier than before. A second
|
||||
processing step starts at 13.5 s, and the final one at 14.7 s.
|
||||
Overall decoding yield on crowded bands is improved by 10% or
|
||||
more. (Systems with receive latency greater than 0.2 s will see
|
||||
smaller improvements, but will still see many decodes earlier
|
||||
than before.)
|
||||
|
||||
JT4: Formatting and display of Averaged and Deep Search decodes
|
||||
has been cleaned up and made consistent with other modes.
|
||||
Together with JT65 and QRA64, JT4 remains one of the digital
|
||||
modes widely for EME and other extreme weak-signal work on
|
||||
microwave bands.
|
||||
|
||||
JT65: Many improvements for Averaged and Deep Search decodes and
|
||||
their display to the user. These improvements are particularly
|
||||
important for EME on VHF and UHF bands.
|
||||
|
||||
WSPR: Significant improvements have been made to the WSPR
|
||||
decoder's sensitivity, its ability to cope with many signals in
|
||||
a crowded sub-band, and its rate of undetected false decodes.
|
||||
We now use up to three decoding passes. Passes 1 and 2 use
|
||||
noncoherent demodulation of single symbols and allow for
|
||||
frequency drifts up to ±4 Hz in a transmission. Pass 3 assumes
|
||||
no drift and does coherent block detection of up to three
|
||||
symbols. It also applies bit-by-bit normalization of the
|
||||
single-symbol bit metrics, a technique that has proven helpful
|
||||
for signals corrupted by artifacts of the subtraction of
|
||||
stronger signals and also for LF/MF signals heavily contaminated
|
||||
by lightning transients. With these improvements the number of
|
||||
decodes in a crowded WSPR sub-band typically increases by 10 to
|
||||
15%.
|
||||
|
||||
- New format for "EU VHF Contest" Tx2 and Tx3 messages
|
||||
|
||||
When "EU VHF Contest" is selected, the Tx2 and Tx3 messages
|
||||
(those conveying signal report, serial number, and 6-character
|
||||
locator) now use hashcodes for both callsigns. This change is
|
||||
NOT backward compatible with earlier versions of _WSJT-X_, so
|
||||
all users of EU VHF Contest messages should be sure to upgrade
|
||||
to versiion 2.2.0.
|
||||
|
||||
- Accessibility
|
||||
|
||||
Keyboard shortcuts have been added as an aid to accessibility:
|
||||
Alt+R sets Tx4 message to RR73, Ctrl+R sets it to RRR.
|
||||
|
||||
As an aid for partial color-blindness, the "inverted goal posts"
|
||||
marking Rx frequency on the Wide Graph's frequency scale are now
|
||||
rendered in a darker shade of green.
|
||||
|
||||
- Minor enhancements and bug fixes
|
||||
|
||||
"Save None" now writes no .wav files to disk, even temporarily.
|
||||
|
||||
An explicit entry for "WW Digi Contest" has been added to
|
||||
"Special operating activities" on the "Settings | Advanced" tab.
|
||||
|
||||
Contest mode FT4 now always uses RR73 for the Tx4 message.
|
||||
|
||||
The Status bar now displays the number of decodes found in the
|
||||
most recent Rx sequence.
|
||||
|
||||
Release candidate WSJT-X 2.2.0-rc1 will be available for beta-testing
|
||||
for one month starting on May 10, 2020. We currently plan a General
|
||||
Availability (GA) release of WSJT-X 2.2.0 on June 1, 2020.
|
||||
|
||||
For those looking even farther ahead: We are well along in the
|
||||
development of two new modes designed for the LF and MF bands. One
|
||||
mode is for WSPR-like activity and one for making 2-way QSOs. Both
|
||||
use Low-density Parity Check (LDPC) codes, 4-GFSK modulation, and
|
||||
two-minute T/R sequences. The QSO mode reaches threshold SNR
|
||||
sensitivity around -31 dB on the AWGN channel, and the WSPR-like mode
|
||||
better than -32 dB.
|
||||
|
||||
|
||||
Release: WSJT-X 2.1.1
|
||||
November 25, 2019
|
||||
@ -836,5 +929,5 @@ activated in v1.8.0.
|
||||
We haven't yet finalized what the three extra bits in the message
|
||||
payload will be used for. Suggestions are welcome!
|
||||
|
||||
-- Joe, K1JT, for the WSJT Development Team
|
||||
++++++ -- Joe, K1JT, for the WSJT Development Team
|
||||
|
||||
|
@ -54,7 +54,7 @@ Directory::Directory (Configuration const * configuration
|
||||
|
||||
connect (network_manager_, &QNetworkAccessManager::authenticationRequired
|
||||
, this, &Directory::authentication);
|
||||
connect (this, &Directory::itemChanged, [this] (QTreeWidgetItem * item) {
|
||||
connect (this, &Directory::itemChanged, [] (QTreeWidgetItem * item) {
|
||||
switch (item->type ())
|
||||
{
|
||||
case FileNode::Type:
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QThread>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "NetworkServerLookup.hpp"
|
||||
#include "Network/NetworkServerLookup.hpp"
|
||||
|
||||
#include "moc_DXLabSuiteCommanderTransceiver.cpp"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "HRDTransceiver.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <QHostAddress>
|
||||
#include <QByteArray>
|
||||
#include <QRegExp>
|
||||
@ -8,7 +9,7 @@
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
|
||||
#include "NetworkServerLookup.hpp"
|
||||
#include "Network/NetworkServerLookup.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -36,7 +37,7 @@ struct HRDMessage
|
||||
HRDMessage * storage (reinterpret_cast<HRDMessage *> (new char[size]));
|
||||
storage->size_ = size ;
|
||||
ushort const * pl (payload.utf16 ());
|
||||
qCopy (pl, pl + payload.size () + 1, storage->payload_); // copy terminator too
|
||||
std::copy (pl, pl + payload.size () + 1, storage->payload_); // copy terminator too
|
||||
storage->magic_1_ = magic_1_value_;
|
||||
storage->magic_2_ = magic_2_value_;
|
||||
storage->checksum_ = 0;
|
||||
@ -1024,7 +1025,7 @@ QString HRDTransceiver::send_command (QString const& cmd, bool no_debug, bool pr
|
||||
{
|
||||
auto radio_name = send_command ("get radio", true, current_radio_, true);
|
||||
qDebug () << "HRDTransceiver::send_command: radio_name:" << radio_name;
|
||||
auto radio_iter = std::find_if (radios_.begin (), radios_.end (), [this, &radio_name] (RadioMap::value_type const& radio)
|
||||
auto radio_iter = std::find_if (radios_.begin (), radios_.end (), [&radio_name] (RadioMap::value_type const& radio)
|
||||
{
|
||||
return std::get<1> (radio) == radio_name;
|
||||
});
|
@ -35,7 +35,7 @@ namespace
|
||||
{
|
||||
QString message;
|
||||
static char constexpr fmt[] = "Hamlib: %s";
|
||||
message = message.vsprintf (format, ap).trimmed ();
|
||||
message = message.vasprintf (format, ap).trimmed ();
|
||||
|
||||
switch (level)
|
||||
{
|
@ -10,13 +10,6 @@
|
||||
#include "TransceiverFactory.hpp"
|
||||
#include "PollingTransceiver.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
typedef struct rig RIG;
|
||||
struct rig_caps;
|
||||
typedef int vfo_t;
|
||||
}
|
||||
|
||||
// hamlib transceiver and PTT mostly delegated directly to hamlib Rig class
|
||||
class HamlibTransceiver final
|
||||
: public PollingTransceiver
|
@ -5,7 +5,7 @@
|
||||
#include <QThread>
|
||||
#include <QEventLoop>
|
||||
|
||||
#include "qt_helpers.hpP"
|
||||
#include "qt_helpers.hpp"
|
||||
|
||||
#include "moc_OmniRigTransceiver.cpp"
|
||||
|
||||
@ -107,6 +107,12 @@ OmniRigTransceiver::OmniRigTransceiver (std::unique_ptr<TransceiverBase> wrapped
|
||||
, send_update_signal_ {false}
|
||||
, reversed_ {false}
|
||||
{
|
||||
CoInitializeEx (nullptr, 0 /*COINIT_APARTMENTTHREADED*/); // required because Qt only does this for GUI thread
|
||||
}
|
||||
|
||||
OmniRigTransceiver::~OmniRigTransceiver ()
|
||||
{
|
||||
CoUninitialize ();
|
||||
}
|
||||
|
||||
// returns false on time out
|
||||
@ -121,9 +127,8 @@ bool OmniRigTransceiver::await_notification_with_timeout (int timeout)
|
||||
int OmniRigTransceiver::do_start ()
|
||||
{
|
||||
TRACE_CAT ("OmniRigTransceiver", "starting");
|
||||
if (wrapped_) wrapped_->start (0);
|
||||
|
||||
CoInitializeEx (nullptr, 0 /*COINIT_APARTMENTTHREADED*/); // required because Qt only does this for GUI thread
|
||||
if (wrapped_) wrapped_->start (0);
|
||||
|
||||
omni_rig_.reset (new OmniRig::OmniRigX {this});
|
||||
if (omni_rig_->isNull ())
|
||||
@ -315,18 +320,19 @@ void OmniRigTransceiver::do_stop ()
|
||||
port_->clear ();
|
||||
port_.reset ();
|
||||
}
|
||||
if (omni_rig_)
|
||||
if (omni_rig_ && !omni_rig_->isNull ())
|
||||
{
|
||||
if (rig_)
|
||||
if (rig_ && !rig_->isNull ())
|
||||
{
|
||||
rig_->clear ();
|
||||
rig_.reset ();
|
||||
}
|
||||
omni_rig_->clear ();
|
||||
omni_rig_.reset ();
|
||||
CoUninitialize ();
|
||||
}
|
||||
|
||||
if (wrapped_) wrapped_->stop ();
|
||||
|
||||
TRACE_CAT ("OmniRigTransceiver", "stopped");
|
||||
}
|
||||
|
||||
@ -344,7 +350,6 @@ void OmniRigTransceiver::handle_visible_change ()
|
||||
|
||||
void OmniRigTransceiver::handle_rig_type_change (int rig_number)
|
||||
{
|
||||
if (!omni_rig_ || omni_rig_->isNull ()) return;
|
||||
TRACE_CAT ("OmniRigTransceiver", "rig type change: rig =" << rig_number);
|
||||
if (rig_number_ == rig_number)
|
||||
{
|
||||
@ -361,7 +366,6 @@ void OmniRigTransceiver::handle_rig_type_change (int rig_number)
|
||||
|
||||
void OmniRigTransceiver::handle_status_change (int rig_number)
|
||||
{
|
||||
if (!omni_rig_ || omni_rig_->isNull ()) return;
|
||||
TRACE_CAT ("OmniRigTransceiver", QString {"status change for rig %1"}.arg (rig_number).toLocal8Bit ());
|
||||
if (rig_number_ == rig_number)
|
||||
{
|
||||
@ -394,7 +398,6 @@ void OmniRigTransceiver::handle_status_change (int rig_number)
|
||||
|
||||
void OmniRigTransceiver::handle_params_change (int rig_number, int params)
|
||||
{
|
||||
if (!omni_rig_ || omni_rig_->isNull ()) return;
|
||||
TRACE_CAT ("OmniRigTransceiver", QString {"params change: params = 0x%1 for rig %2"}
|
||||
.arg (params, 8, 16, QChar ('0'))
|
||||
.arg (rig_number).toLocal8Bit ()
|
||||
@ -647,7 +650,6 @@ void OmniRigTransceiver::handle_custom_reply (int rig_number, QVariant const& co
|
||||
(void)command;
|
||||
(void)reply;
|
||||
|
||||
if (!omni_rig_ || omni_rig_->isNull ()) return;
|
||||
if (rig_number_ == rig_number)
|
||||
{
|
||||
if (!rig_ || rig_->isNull ()) return;
|
||||
@ -664,11 +666,14 @@ void OmniRigTransceiver::do_ptt (bool on)
|
||||
if (use_for_ptt_ && TransceiverFactory::PTT_method_CAT == ptt_type_)
|
||||
{
|
||||
TRACE_CAT ("OmniRigTransceiver", "set PTT");
|
||||
rig_->SetTx (on ? OmniRig::PM_TX : OmniRig::PM_RX);
|
||||
if (rig_ && !rig_->isNull ())
|
||||
{
|
||||
rig_->SetTx (on ? OmniRig::PM_TX : OmniRig::PM_RX);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (port_)
|
||||
if (port_ && !port_->isNull ())
|
||||
{
|
||||
if (TransceiverFactory::PTT_method_RTS == ptt_type_)
|
||||
{
|
||||
@ -695,6 +700,7 @@ void OmniRigTransceiver::do_ptt (bool on)
|
||||
void OmniRigTransceiver::do_frequency (Frequency f, MODE m, bool /*no_ignore*/)
|
||||
{
|
||||
TRACE_CAT ("OmniRigTransceiver", f << state ());
|
||||
if (!rig_ || rig_->isNull ()) return;
|
||||
if (UNK != m)
|
||||
{
|
||||
do_mode (m);
|
||||
@ -723,6 +729,7 @@ void OmniRigTransceiver::do_frequency (Frequency f, MODE m, bool /*no_ignore*/)
|
||||
void OmniRigTransceiver::do_tx_frequency (Frequency tx, MODE m, bool /*no_ignore*/)
|
||||
{
|
||||
TRACE_CAT ("OmniRigTransceiver", tx << state ());
|
||||
if (!rig_ || rig_->isNull ()) return;
|
||||
bool split {tx != 0};
|
||||
if (split)
|
||||
{
|
||||
@ -787,6 +794,7 @@ void OmniRigTransceiver::do_tx_frequency (Frequency tx, MODE m, bool /*no_ignore
|
||||
void OmniRigTransceiver::do_mode (MODE mode)
|
||||
{
|
||||
TRACE_CAT ("OmniRigTransceiver", mode << state ());
|
||||
if (!rig_ || rig_->isNull ()) return;
|
||||
// TODO: G4WJS OmniRig doesn't seem to have any capability of tracking/setting VFO B mode
|
||||
auto mapped = map_mode (mode);
|
||||
if (mapped & writable_params_)
|
@ -32,6 +32,7 @@ public:
|
||||
|
||||
// takes ownership of wrapped Transceiver
|
||||
explicit OmniRigTransceiver (std::unique_ptr<TransceiverBase> wrapped, RigNumber, TransceiverFactory::PTTMethod ptt_type, QString const& ptt_port, QObject * parent = nullptr);
|
||||
~OmniRigTransceiver ();
|
||||
|
||||
int do_start () override;
|
||||
void do_stop () override;
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "TransceiverBase.hpp"
|
||||
#include "Transceiver/TransceiverBase.hpp"
|
||||
|
||||
class QTimer;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <QHash>
|
||||
|
||||
#include "Radio.hpp"
|
||||
#include "NetworkMessage.hpp"
|
||||
#include "Network/NetworkMessage.hpp"
|
||||
#include "qt_helpers.hpp"
|
||||
|
||||
#include "pimpl_impl.hpp"
|
@ -147,7 +147,7 @@ public:
|
||||
: server_ {new MessageServer {this}}
|
||||
{
|
||||
// connect up server
|
||||
connect (server_, &MessageServer::error, [this] (QString const& message) {
|
||||
connect (server_, &MessageServer::error, [] (QString const& message) {
|
||||
std::cerr << tr ("Network Error: %1").arg ( message).toStdString () << std::endl;
|
||||
});
|
||||
connect (server_, &MessageServer::client_opened, this, &Server::add_client);
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Version number components
|
||||
set (WSJTX_VERSION_MAJOR 2)
|
||||
set (WSJTX_VERSION_MINOR 1)
|
||||
set (WSJTX_VERSION_PATCH 2)
|
||||
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
|
||||
set (WSJTX_VERSION_IS_RELEASE 1) # set to 1 for final release build
|
||||
set (WSJTX_VERSION_MINOR 2)
|
||||
set (WSJTX_VERSION_PATCH 0)
|
||||
set (WSJTX_RC 1) # release candidate number, comment out or zero for development versions
|
||||
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
|
||||
|
@ -274,10 +274,10 @@ WSPRBandHopping::WSPRBandHopping (QSettings * settings, Configuration const * co
|
||||
: m_ {settings, configuration, parent_widget}
|
||||
{
|
||||
// detect changes to the working frequencies model
|
||||
m_->WSPR_bands_ = m_->configuration_->frequencies ()->all_bands (m_->configuration_->region (), Modes::WSPR).toList ();
|
||||
m_->WSPR_bands_ = m_->configuration_->frequencies ()->all_bands (m_->configuration_->region (), Modes::WSPR).values ();
|
||||
connect (m_->configuration_->frequencies (), &QAbstractItemModel::layoutChanged
|
||||
, [this] () {
|
||||
m_->WSPR_bands_ = m_->configuration_->frequencies ()->all_bands (m_->configuration_->region (), Modes::WSPR).toList ();
|
||||
m_->WSPR_bands_ = m_->configuration_->frequencies ()->all_bands (m_->configuration_->region (), Modes::WSPR).values ();
|
||||
});
|
||||
|
||||
// load settings
|
||||
@ -379,7 +379,11 @@ auto WSPRBandHopping::next_hop (bool tx_enabled) -> Hop
|
||||
if (frequencies_index < 0)
|
||||
{
|
||||
// build sets of available rx and tx bands
|
||||
#if QT_VERSION < QT_VERSION_CHECK (5, 14, 0)
|
||||
auto target_rx_bands = m_->WSPR_bands_.toSet ();
|
||||
#else
|
||||
QSet<QString> target_rx_bands {m_->WSPR_bands_.begin (), m_->WSPR_bands_.end ()};
|
||||
#endif
|
||||
auto target_tx_bands = target_rx_bands;
|
||||
for (auto i = 0; i < m_->bands_[period_index].size (); ++i)
|
||||
{
|
||||
@ -403,16 +407,23 @@ auto WSPRBandHopping::next_hop (bool tx_enabled) -> Hop
|
||||
// if we have some bands to permute
|
||||
if (target_rx_bands.size () + target_tx_bands.size ())
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK (5, 14, 0)
|
||||
auto rx_permutations = m_->rx_permutation_.toSet ();
|
||||
auto tx_permutations = m_->tx_permutation_.toSet ();
|
||||
#else
|
||||
QSet<QString> rx_permutations {m_->rx_permutation_.begin (), m_->rx_permutation_.end ()};
|
||||
QSet<QString> tx_permutations {m_->tx_permutation_.begin (), m_->tx_permutation_.end ()};
|
||||
#endif
|
||||
if (!(m_->rx_permutation_.size () + m_->tx_permutation_.size ()) // all used up
|
||||
// or rx list contains a band no longer scheduled
|
||||
|| !target_rx_bands.contains (m_->rx_permutation_.toSet ())
|
||||
|| !target_rx_bands.contains (rx_permutations)
|
||||
// or tx list contains a band no longer scheduled for tx
|
||||
|| !target_tx_bands.contains (m_->tx_permutation_.toSet ()))
|
||||
|| !target_tx_bands.contains (tx_permutations))
|
||||
{
|
||||
// build new random permutations
|
||||
m_->rx_permutation_ = target_rx_bands.toList ();
|
||||
m_->rx_permutation_ = target_rx_bands.values ();
|
||||
std::random_shuffle (std::begin (m_->rx_permutation_), std::end (m_->rx_permutation_));
|
||||
m_->tx_permutation_ = target_tx_bands.toList ();
|
||||
m_->tx_permutation_ = target_tx_bands.values ();
|
||||
std::random_shuffle (std::begin (m_->tx_permutation_), std::end (m_->tx_permutation_));
|
||||
// qDebug () << "New random Rx permutation:" << m_->rx_permutation_
|
||||
// << "random Tx permutation:" << m_->tx_permutation_;
|
125
all2cab.py
Normal file
125
all2cab.py
Normal file
@ -0,0 +1,125 @@
|
||||
import sys
|
||||
from datetime import datetime
|
||||
mycall="K1JT"
|
||||
mygrid="FN20"
|
||||
|
||||
# Keyed with hiscall:
|
||||
Freq={}
|
||||
T0={}
|
||||
RcvdExch={}
|
||||
Grid={}
|
||||
|
||||
# Keyed with hiscall_band:
|
||||
Staged={}
|
||||
TimeLogged={}
|
||||
QSOinProgress={}
|
||||
# QSOinProgress bit values:
|
||||
# 1 He called me
|
||||
# 2 I called him
|
||||
# 4 Received his exchange
|
||||
# 8 Received his Roger
|
||||
# 16 Sent Roger
|
||||
# 32 Staged for logging
|
||||
|
||||
def isGrid(g):
|
||||
"""Return True if g is a valid grid4 and not RR73"""
|
||||
if len(g)!=4 or g=="RR73": return False
|
||||
if ord(g[0:1])<ord('A') or ord(g[0:1])>ord('R'): return False
|
||||
if ord(g[1:2])<ord('A') or ord(g[1:2])>ord('R'): return False
|
||||
if ord(g[2:3])<ord('0') or ord(g[2:3])>ord('9'): return False
|
||||
if ord(g[3:4])<ord('0') or ord(g[3:4])>ord('9'): return False
|
||||
return True
|
||||
|
||||
if len(sys.argv)!=4:
|
||||
print "Usage: python all2cab.py <mycall> <mygrid> <infile>"
|
||||
print "Example: python all2cab.py K1JT FN20 all_wwdigi_2019.txt"
|
||||
exit()
|
||||
|
||||
f=open(sys.argv[3],mode='r')
|
||||
ss=f.readlines()
|
||||
f.close
|
||||
dt0=datetime.strptime(ss[0][0:13],"%y%m%d_%H%M%S")
|
||||
iz=len(ss)
|
||||
nqso=0
|
||||
hiscall_band=""
|
||||
|
||||
for i in range(iz):
|
||||
s=ss[i][0:80].strip()
|
||||
dt=datetime.strptime(s[0:13],"%y%m%d_%H%M%S")
|
||||
tx=" Tx " in s #True if this is my transmission
|
||||
w=s.split()
|
||||
if len(w)<10: continue
|
||||
if w[7]=="CQ":
|
||||
cq=True
|
||||
if w[8].isalpha():
|
||||
s=s.replace(" CQ "," CQ_")
|
||||
w=s.split()
|
||||
if len(w)<10: continue
|
||||
c1=w[7]
|
||||
c2=w[8]
|
||||
c3=w[9]
|
||||
roger = c3=="R"
|
||||
if roger: c3=w[10]
|
||||
cq = (c1=="CQ" or c1[0:3]=="CQ_")
|
||||
if cq:
|
||||
Grid[c2]=c3
|
||||
|
||||
hiscall=""
|
||||
if tx and not cq:
|
||||
hiscall=c1
|
||||
if c1==mycall:
|
||||
freq=int(1000.0*float(s[13:23])) + int((int(s[42:47]))/1000)
|
||||
hiscall=c2
|
||||
Freq[hiscall]=freq
|
||||
MHz="%3d" % int(float(s[13:23]))
|
||||
hiscall_band=hiscall+MHz
|
||||
n=QSOinProgress.get(hiscall_band,0)
|
||||
n = n | 1 #He called me
|
||||
if roger or c3=="RR73" or c3=="RRR" or c3=="73":
|
||||
n = n | 8 # Rcvd Roger
|
||||
if isGrid(c3):
|
||||
hisgrid=c3
|
||||
RcvdExch[hiscall]=hisgrid
|
||||
n = n | 4 #Received his exchange
|
||||
else:
|
||||
g=Grid.get(hiscall,"")
|
||||
if isGrid(g):
|
||||
RcvdExch[hiscall]=g
|
||||
n = n | 4 #Received his exchange
|
||||
QSOinProgress[hiscall_band]=n
|
||||
|
||||
if len(hiscall)>=3:
|
||||
MHz="%3d" % int(float(s[13:23]))
|
||||
hiscall_band=hiscall+MHz
|
||||
if tx:
|
||||
n=QSOinProgress.get(hiscall_band,0)
|
||||
n = n | 2 #I called him
|
||||
if roger or c3=="RR73" or c3=="RRR" or c3=="73":
|
||||
n = n | 4 | 16 #Rcvd Exch, Sent Roger
|
||||
if c3=="RR73" or c3=="RRR" or c3=="73":
|
||||
n = n | 8 #Rcvd Exch, Sent Roger
|
||||
QSOinProgress[hiscall_band]=n
|
||||
T0[hiscall]=dt
|
||||
|
||||
if len(hiscall_band)<5 or len(hiscall)<3: continue
|
||||
|
||||
if QSOinProgress.get(hiscall_band,0)>=31:
|
||||
n=QSOinProgress.get(hiscall_band,0)
|
||||
n = n | 32
|
||||
QSOinProgress[hiscall_band]=n
|
||||
t=str(T0[hiscall])[0:16]
|
||||
t=t[0:13] + t[14:16]
|
||||
buf="QSO: %5d DG %s %-10s %s %-10s %s" % (Freq[hiscall],t,\
|
||||
mycall,mygrid,hiscall,RcvdExch.get(hiscall," "))
|
||||
MHz="%3d" % int(float(s[13:23]))
|
||||
hiscall_band=hiscall+MHz
|
||||
t=Staged.get(hiscall_band,"")
|
||||
time_diff=-1
|
||||
if TimeLogged.get(hiscall_band,0)!=0:
|
||||
time_diff=(T0[hiscall] - TimeLogged[hiscall_band]).total_seconds()
|
||||
if time_diff == -1 or time_diff > 180: #Log only once within 3 min
|
||||
Staged[hiscall_band]=buf #Staged for logging
|
||||
nqso=nqso+1
|
||||
TimeLogged[hiscall_band]=T0[hiscall]
|
||||
print buf #For now, log anything staged
|
||||
del QSOinProgress[hiscall_band]
|
@ -1,8 +0,0 @@
|
||||
See ./index.html for information about this release. The "Getting Started"
|
||||
section is a useful starting place.
|
||||
|
||||
---------------------------
|
||||
Copyright Beman Dawes, 2008
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
See ./LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
|
312
boost/Jamroot
312
boost/Jamroot
@ -1,312 +0,0 @@
|
||||
# Copyright Vladimir Prus 2002-2006.
|
||||
# Copyright Dave Abrahams 2005-2006.
|
||||
# Copyright Rene Rivera 2005-2007.
|
||||
# Copyright Douglas Gregor 2005.
|
||||
#
|
||||
# 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)
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# b2 [options] [properties] [install|stage]
|
||||
#
|
||||
# Builds and installs Boost.
|
||||
#
|
||||
# Targets and Related Options:
|
||||
#
|
||||
# install Install headers and compiled library files to the
|
||||
# ======= configured locations (below).
|
||||
#
|
||||
# --prefix=<PREFIX> Install architecture independent files here.
|
||||
# Default; C:\Boost on Win32
|
||||
# Default; /usr/local on Unix. Linux, etc.
|
||||
#
|
||||
# --exec-prefix=<EPREFIX> Install architecture dependent files here.
|
||||
# Default; <PREFIX>
|
||||
#
|
||||
# --libdir=<DIR> Install library files here.
|
||||
# Default; <EPREFIX>/lib
|
||||
#
|
||||
# --includedir=<HDRDIR> Install header files here.
|
||||
# Default; <PREFIX>/include
|
||||
#
|
||||
# stage Build and install only compiled library files to the
|
||||
# ===== stage directory.
|
||||
#
|
||||
# --stagedir=<STAGEDIR> Install library files here
|
||||
# Default; ./stage
|
||||
#
|
||||
# Other Options:
|
||||
#
|
||||
# --build-type=<type> Build the specified pre-defined set of variations of
|
||||
# the libraries. Note, that which variants get built
|
||||
# depends on what each library supports.
|
||||
#
|
||||
# -- minimal -- (default) Builds a minimal set of
|
||||
# variants. On Windows, these are static
|
||||
# multithreaded libraries in debug and release
|
||||
# modes, using shared runtime. On Linux, these are
|
||||
# static and shared multithreaded libraries in
|
||||
# release mode.
|
||||
#
|
||||
# -- complete -- Build all possible variations.
|
||||
#
|
||||
# --build-dir=DIR Build in this location instead of building within
|
||||
# the distribution tree. Recommended!
|
||||
#
|
||||
# --show-libraries Display the list of Boost libraries that require
|
||||
# build and installation steps, and then exit.
|
||||
#
|
||||
# --layout=<layout> Determine whether to choose library names and header
|
||||
# locations such that multiple versions of Boost or
|
||||
# multiple compilers can be used on the same system.
|
||||
#
|
||||
# -- versioned -- Names of boost binaries include
|
||||
# the Boost version number, name and version of
|
||||
# the compiler and encoded build properties. Boost
|
||||
# headers are installed in a subdirectory of
|
||||
# <HDRDIR> whose name contains the Boost version
|
||||
# number.
|
||||
#
|
||||
# -- tagged -- Names of boost binaries include the
|
||||
# encoded build properties such as variant and
|
||||
# threading, but do not including compiler name
|
||||
# and version, or Boost version. This option is
|
||||
# useful if you build several variants of Boost,
|
||||
# using the same compiler.
|
||||
#
|
||||
# -- system -- Binaries names do not include the
|
||||
# Boost version number or the name and version
|
||||
# number of the compiler. Boost headers are
|
||||
# installed directly into <HDRDIR>. This option is
|
||||
# intended for system integrators building
|
||||
# distribution packages.
|
||||
#
|
||||
# The default value is 'versioned' on Windows, and
|
||||
# 'system' on Unix.
|
||||
#
|
||||
# --buildid=ID Add the specified ID to the name of built libraries.
|
||||
# The default is to not add anything.
|
||||
#
|
||||
# --python-buildid=ID Add the specified ID to the name of built libraries
|
||||
# that depend on Python. The default is to not add
|
||||
# anything. This ID is added in addition to --buildid.
|
||||
#
|
||||
# --help This message.
|
||||
#
|
||||
# --with-<library> Build and install the specified <library>. If this
|
||||
# option is used, only libraries specified using this
|
||||
# option will be built.
|
||||
#
|
||||
# --without-<library> Do not build, stage, or install the specified
|
||||
# <library>. By default, all libraries are built.
|
||||
#
|
||||
# Properties:
|
||||
#
|
||||
# toolset=toolset Indicate the toolset to build with.
|
||||
#
|
||||
# variant=debug|release Select the build variant
|
||||
#
|
||||
# link=static|shared Whether to build static or shared libraries
|
||||
#
|
||||
# threading=single|multi Whether to build single or multithreaded binaries
|
||||
#
|
||||
# runtime-link=static|shared
|
||||
# Whether to link to static or shared C and C++
|
||||
# runtime.
|
||||
#
|
||||
|
||||
# TODO:
|
||||
# - handle boost version
|
||||
# - handle python options such as pydebug
|
||||
|
||||
import boostcpp ;
|
||||
import package ;
|
||||
|
||||
import sequence ;
|
||||
import xsltproc ;
|
||||
import set ;
|
||||
import path ;
|
||||
import link ;
|
||||
|
||||
path-constant BOOST_ROOT : . ;
|
||||
constant BOOST_VERSION : 1.63.0 ;
|
||||
constant BOOST_JAMROOT_MODULE : $(__name__) ;
|
||||
|
||||
boostcpp.set-version $(BOOST_VERSION) ;
|
||||
|
||||
use-project /boost/architecture : libs/config/checks/architecture ;
|
||||
|
||||
local all-headers =
|
||||
[ MATCH .*libs/(.*)/include/boost : [ glob libs/*/include/boost libs/*/*/include/boost ] ] ;
|
||||
|
||||
for dir in $(all-headers)
|
||||
{
|
||||
link-directory $(dir)-headers : libs/$(dir)/include/boost : <location>. ;
|
||||
explicit $(dir)-headers ;
|
||||
}
|
||||
|
||||
if $(all-headers)
|
||||
{
|
||||
constant BOOST_MODULARLAYOUT : $(all-headers) ;
|
||||
}
|
||||
|
||||
project boost
|
||||
: requirements <include>.
|
||||
|
||||
[ boostcpp.architecture ]
|
||||
[ boostcpp.address-model ]
|
||||
|
||||
# Disable auto-linking for all targets here, primarily because it caused
|
||||
# troubles with V2.
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
# Used to encode variant in target name. See the 'tag' rule below.
|
||||
<tag>@$(__name__).tag
|
||||
<conditional>@handle-static-runtime
|
||||
# Comeau does not support shared lib
|
||||
<toolset>como:<link>static
|
||||
<toolset>como-linux:<define>_GNU_SOURCE=1
|
||||
# When building docs within Boost, we want the standard Boost style
|
||||
<xsl:param>boost.defaults=Boost
|
||||
: usage-requirements <include>.
|
||||
: build-dir bin.v2
|
||||
;
|
||||
|
||||
# This rule is called by Boost.Build to determine the name of target. We use it
|
||||
# to encode the build variant, compiler name and boost version in the target
|
||||
# name.
|
||||
#
|
||||
rule tag ( name : type ? : property-set )
|
||||
{
|
||||
return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ;
|
||||
}
|
||||
|
||||
rule python-tag ( name : type ? : property-set )
|
||||
{
|
||||
return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ;
|
||||
}
|
||||
|
||||
rule handle-static-runtime ( properties * )
|
||||
{
|
||||
# Using static runtime with shared libraries is impossible on Linux, and
|
||||
# dangerous on Windows. Therefore, we disallow it. This might be drastic,
|
||||
# but it was disabled for a while without anybody complaining.
|
||||
|
||||
# For CW, static runtime is needed so that std::locale works.
|
||||
if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
|
||||
! ( <toolset>cw in $(properties) )
|
||||
{
|
||||
ECHO "error: link=shared together with runtime-link=static is not allowed" ;
|
||||
ECHO "error: such property combination is either impossible " ;
|
||||
ECHO "error: or too dangerious to be of any use" ;
|
||||
EXIT ;
|
||||
}
|
||||
}
|
||||
|
||||
all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ]
|
||||
[ glob libs/*/build/Jamfile ] ] ;
|
||||
|
||||
all-libraries = [ sequence.unique $(all-libraries) ] ;
|
||||
# The function_types library has a Jamfile, but it's used for maintenance
|
||||
# purposes, there's no library to build and install.
|
||||
all-libraries = [ set.difference $(all-libraries) : function_types ] ;
|
||||
|
||||
# Setup convenient aliases for all libraries.
|
||||
|
||||
local rule explicit-alias ( id : targets + )
|
||||
{
|
||||
alias $(id) : $(targets) ;
|
||||
explicit $(id) ;
|
||||
}
|
||||
|
||||
# First, the complicated libraries: where the target name in Jamfile is
|
||||
# different from its directory name.
|
||||
explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ;
|
||||
explicit-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ;
|
||||
explicit-alias unit_test_framework : libs/test/build//boost_unit_test_framework ;
|
||||
explicit-alias bgl-vis : libs/graps/build//bgl-vis ;
|
||||
explicit-alias serialization : libs/serialization/build//boost_serialization ;
|
||||
explicit-alias wserialization : libs/serialization/build//boost_wserialization ;
|
||||
for local l in $(all-libraries)
|
||||
{
|
||||
if ! $(l) in test graph serialization
|
||||
{
|
||||
explicit-alias $(l) : libs/$(l)/build//boost_$(l) ;
|
||||
}
|
||||
}
|
||||
|
||||
# Log has an additional target
|
||||
explicit-alias log_setup : libs/log/build//boost_log_setup ;
|
||||
|
||||
alias headers : $(all-headers)-headers : : : <include>. ;
|
||||
explicit headers ;
|
||||
|
||||
# Make project ids of all libraries known.
|
||||
for local l in $(all-libraries)
|
||||
{
|
||||
use-project /boost/$(l) : libs/$(l)/build ;
|
||||
}
|
||||
|
||||
if [ path.exists $(BOOST_ROOT)/tools/inspect ]
|
||||
{
|
||||
use-project /boost/tools/inspect : tools/inspect/build ;
|
||||
}
|
||||
|
||||
if [ path.exists $(BOOST_ROOT)/libs/wave/tool ]
|
||||
{
|
||||
use-project /boost/libs/wave/tool : libs/wave/tool/build ;
|
||||
}
|
||||
|
||||
# This rule should be called from libraries' Jamfiles and will create two
|
||||
# targets, "install" and "stage", that will install or stage that library. The
|
||||
# --prefix option is respected, but --with and --without options, naturally, are
|
||||
# ignored.
|
||||
#
|
||||
# - libraries -- list of library targets to install.
|
||||
#
|
||||
rule boost-install ( libraries * )
|
||||
{
|
||||
package.install install
|
||||
: <dependency>/boost//install-proper-headers $(install-requirements)
|
||||
: # No binaries
|
||||
: $(libraries)
|
||||
: # No headers, it is handled by the dependency.
|
||||
;
|
||||
|
||||
install stage : $(libraries) : <location>$(BOOST_STAGE_LOCATE) ;
|
||||
|
||||
module [ CALLER_MODULE ]
|
||||
{
|
||||
explicit stage ;
|
||||
explicit install ;
|
||||
}
|
||||
}
|
||||
|
||||
# Creates a library target, adding autolink support and also creates
|
||||
# stage and install targets via boost-install, above.
|
||||
rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * )
|
||||
{
|
||||
name = boost_$(name) ;
|
||||
autolink = <link>shared:<define>BOOST_$(name:U)_DYN_LINK=1 ;
|
||||
lib $(name)
|
||||
: $(sources)
|
||||
: $(requirements) $(autolink)
|
||||
: $(default-build)
|
||||
: $(usage-requirements) $(autolink)
|
||||
;
|
||||
boost-install $(name) ;
|
||||
}
|
||||
|
||||
|
||||
headers =
|
||||
# The .SUNWCCh files are present in tr1 include directory and have to be
|
||||
# installed (see http://lists.boost.org/Archives/boost/2007/05/121430.php).
|
||||
[ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc *.SUNWCCh : CVS .svn ]
|
||||
[ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* : CVS .svn ]
|
||||
[ path.glob boost/tr1/tr1 : * : bcc32 sun CVS .svn ]
|
||||
;
|
||||
|
||||
# Declare special top-level targets that build and install the desired variants
|
||||
# of the libraries.
|
||||
boostcpp.declare-targets $(all-libraries) : $(headers) ;
|
@ -1,23 +0,0 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
@ -7,11 +7,18 @@ upstream and master. To upgrade the content do the following:
|
||||
|
||||
```bash
|
||||
git checkout upstream
|
||||
mv README.md /tmp
|
||||
rm -r *
|
||||
# use the bcp tool to populate with the new Boost libraries
|
||||
# use git add to stage any new files and directories
|
||||
git commit -a -m "Updated Boost v1.63 libraries including ..."
|
||||
git tag boost_1_63
|
||||
mv /tmp/README.md .
|
||||
# use the bcp tool to populate with the new Boost libraries from a clean boost install.
|
||||
# Something like:
|
||||
#
|
||||
# bcp --boost=../boost_1_70_0 --unix-lines iterator range math numeric crc circular_buffer multi_index intrusive .
|
||||
#
|
||||
# Clean out any unwanted files and directories (e.g. libs and docs for a header only subset).
|
||||
# Use git add to stage any new files and directories.
|
||||
git commit -a -m "Updated Boost v1.70.0 libraries including ..."
|
||||
git tag boost_1_70_0
|
||||
git push origin
|
||||
git checkout master
|
||||
git merge upstream
|
||||
@ -30,4 +37,4 @@ git-subtree-pull to import the changes like this:
|
||||
```bash
|
||||
git remote add -f boost git@bitbucket.org:g4wjs/boost.git # for convienence
|
||||
git subtree pull --prefix boost boost master --squash
|
||||
```
|
||||
```
|
||||
|
@ -1,17 +0,0 @@
|
||||
# Copyright (C) 2002-2003 David Abrahams.
|
||||
# Copyright (C) 2002-2003 Vladimir Prus.
|
||||
# Copyright (C) 2003,2007 Rene Rivera.
|
||||
# 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)
|
||||
|
||||
# This is the initial file loaded by Boost Jam when run from any Boost library
|
||||
# folder. It allows us to choose which Boost Build installation to use for
|
||||
# building Boost libraries. Unless explicitly selected using a command-line
|
||||
# option, the version included with the Boost library distribution is used (as
|
||||
# opposed to any other Boost Build version installed on the user's sytem).
|
||||
|
||||
BOOST_ROOT = $(.boost-build-file:D) ;
|
||||
BOOST_BUILD = [ MATCH --boost-build=(.*) : $(ARGV) ] ;
|
||||
BOOST_BUILD ?= tools/build/src ;
|
||||
boost-build $(BOOST_BUILD) ;
|
@ -1,66 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright 2002 William E. Kempf
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompany-
|
||||
ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
|
||||
H1
|
||||
{
|
||||
FONT-SIZE: 200%;
|
||||
COLOR: #00008B;
|
||||
}
|
||||
H2
|
||||
{
|
||||
FONT-SIZE: 150%;
|
||||
}
|
||||
H3
|
||||
{
|
||||
FONT-SIZE: 125%;
|
||||
}
|
||||
H4
|
||||
{
|
||||
FONT-SIZE: 108%;
|
||||
}
|
||||
BODY
|
||||
{
|
||||
FONT-SIZE: 100%;
|
||||
BACKGROUND-COLOR: #ffffff;
|
||||
COLOR: #000000;
|
||||
}
|
||||
PRE
|
||||
{
|
||||
MARGIN-LEFT: 2em;
|
||||
FONT-FAMILY: Courier,
|
||||
monospace;
|
||||
}
|
||||
CODE
|
||||
{
|
||||
FONT-FAMILY: Courier,
|
||||
monospace;
|
||||
}
|
||||
CODE.as_pre
|
||||
{
|
||||
white-space: pre;
|
||||
}
|
||||
.index
|
||||
{
|
||||
TEXT-ALIGN: left;
|
||||
}
|
||||
.page-index
|
||||
{
|
||||
TEXT-ALIGN: left;
|
||||
}
|
||||
.definition
|
||||
{
|
||||
TEXT-ALIGN: left;
|
||||
}
|
||||
.footnote
|
||||
{
|
||||
FONT-SIZE: 66%;
|
||||
VERTICAL-ALIGN: super;
|
||||
TEXT-DECORATION: none;
|
||||
}
|
||||
.function-semantics
|
||||
{
|
||||
CLEAR: left;
|
||||
}
|
BIN
boost/boost.png
BIN
boost/boost.png
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB |
@ -27,7 +27,7 @@ namespace boost { namespace algorithm {
|
||||
///
|
||||
/// \note This function is part of the C++2011 standard library.
|
||||
template<typename InputIterator, typename Predicate>
|
||||
bool all_of ( InputIterator first, InputIterator last, Predicate p )
|
||||
BOOST_CXX14_CONSTEXPR bool all_of ( InputIterator first, InputIterator last, Predicate p )
|
||||
{
|
||||
for ( ; first != last; ++first )
|
||||
if ( !p(*first))
|
||||
@ -43,7 +43,7 @@ bool all_of ( InputIterator first, InputIterator last, Predicate p )
|
||||
/// \param p A predicate for testing the elements of the range
|
||||
///
|
||||
template<typename Range, typename Predicate>
|
||||
bool all_of ( const Range &r, Predicate p )
|
||||
BOOST_CXX14_CONSTEXPR bool all_of ( const Range &r, Predicate p )
|
||||
{
|
||||
return boost::algorithm::all_of ( boost::begin (r), boost::end (r), p );
|
||||
}
|
||||
@ -57,7 +57,7 @@ bool all_of ( const Range &r, Predicate p )
|
||||
/// \param val A value to compare against
|
||||
///
|
||||
template<typename InputIterator, typename T>
|
||||
bool all_of_equal ( InputIterator first, InputIterator last, const T &val )
|
||||
BOOST_CXX14_CONSTEXPR bool all_of_equal ( InputIterator first, InputIterator last, const T &val )
|
||||
{
|
||||
for ( ; first != last; ++first )
|
||||
if ( val != *first )
|
||||
@ -73,7 +73,7 @@ bool all_of_equal ( InputIterator first, InputIterator last, const T &val )
|
||||
/// \param val A value to compare against
|
||||
///
|
||||
template<typename Range, typename T>
|
||||
bool all_of_equal ( const Range &r, const T &val )
|
||||
BOOST_CXX14_CONSTEXPR bool all_of_equal ( const Range &r, const T &val )
|
||||
{
|
||||
return boost::algorithm::all_of_equal ( boost::begin (r), boost::end (r), val );
|
||||
}
|
||||
|
553
boost/boost/algorithm/minmax_element.hpp
Normal file
553
boost/boost/algorithm/minmax_element.hpp
Normal file
@ -0,0 +1,553 @@
|
||||
// (C) Copyright Herve Bronnimann 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)
|
||||
|
||||
/*
|
||||
Revision history:
|
||||
1 July 2004
|
||||
Split the code into two headers to lessen dependence on
|
||||
Boost.tuple. (Herve)
|
||||
26 June 2004
|
||||
Added the code for the boost minmax library. (Herve)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ALGORITHM_MINMAX_ELEMENT_HPP
|
||||
#define BOOST_ALGORITHM_MINMAX_ELEMENT_HPP
|
||||
|
||||
/* PROPOSED STANDARD EXTENSIONS:
|
||||
*
|
||||
* minmax_element(first, last)
|
||||
* Effect: std::make_pair( std::min_element(first, last),
|
||||
* std::max_element(first, last) );
|
||||
*
|
||||
* minmax_element(first, last, comp)
|
||||
* Effect: std::make_pair( std::min_element(first, last, comp),
|
||||
* std::max_element(first, last, comp) );
|
||||
*/
|
||||
|
||||
#include <utility> // for std::pair and std::make_pair
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { // for obtaining a uniform version of minmax_element
|
||||
// that compiles with VC++ 6.0 -- avoid the iterator_traits by
|
||||
// having comparison object over iterator, not over dereferenced value
|
||||
|
||||
template <typename Iterator>
|
||||
struct less_over_iter {
|
||||
bool operator()(Iterator const& it1,
|
||||
Iterator const& it2) const { return *it1 < *it2; }
|
||||
};
|
||||
|
||||
template <typename Iterator, class BinaryPredicate>
|
||||
struct binary_pred_over_iter {
|
||||
explicit binary_pred_over_iter(BinaryPredicate const& p ) : m_p( p ) {}
|
||||
bool operator()(Iterator const& it1,
|
||||
Iterator const& it2) const { return m_p(*it1, *it2); }
|
||||
private:
|
||||
BinaryPredicate m_p;
|
||||
};
|
||||
|
||||
// common base for the two minmax_element overloads
|
||||
|
||||
template <typename ForwardIter, class Compare >
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_minmax_element(ForwardIter first, ForwardIter last, Compare comp)
|
||||
{
|
||||
if (first == last)
|
||||
return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
// if only one element
|
||||
ForwardIter second = first; ++second;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result, max_result);
|
||||
|
||||
// treat first pair separately (only one comparison for first two elements)
|
||||
ForwardIter potential_min_result = last;
|
||||
if (comp(first, second))
|
||||
max_result = second;
|
||||
else {
|
||||
min_result = second;
|
||||
potential_min_result = first;
|
||||
}
|
||||
|
||||
// then each element by pairs, with at most 3 comparisons per pair
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (comp(first, second)) {
|
||||
if (comp(first, min_result)) {
|
||||
min_result = first;
|
||||
potential_min_result = last;
|
||||
}
|
||||
if (comp(max_result, second))
|
||||
max_result = second;
|
||||
} else {
|
||||
if (comp(second, min_result)) {
|
||||
min_result = second;
|
||||
potential_min_result = first;
|
||||
}
|
||||
if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
first = ++second;
|
||||
if (first != last) ++second;
|
||||
}
|
||||
|
||||
// if odd number of elements, treat last element
|
||||
if (first != last) { // odd number of elements
|
||||
if (comp(first, min_result)) {
|
||||
min_result = first;
|
||||
potential_min_result = last;
|
||||
}
|
||||
else if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
|
||||
// resolve min_result being incorrect with one extra comparison
|
||||
// (in which case potential_min_result is necessarily the correct result)
|
||||
if (potential_min_result != last
|
||||
&& !comp(min_result, potential_min_result))
|
||||
min_result = potential_min_result;
|
||||
|
||||
return std::make_pair(min_result,max_result);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
minmax_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_minmax_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
minmax_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_minmax_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* PROPOSED BOOST EXTENSIONS
|
||||
* In the description below, [rfirst,rlast) denotes the reversed range
|
||||
* of [first,last). Even though the iterator type of first and last may
|
||||
* be only a Forward Iterator, it is possible to explain the semantics
|
||||
* by assuming that it is a Bidirectional Iterator. In the sequel,
|
||||
* reverse(ForwardIterator&) returns the reverse_iterator adaptor.
|
||||
* This is not how the functions would be implemented!
|
||||
*
|
||||
* first_min_element(first, last)
|
||||
* Effect: std::min_element(first, last);
|
||||
*
|
||||
* first_min_element(first, last, comp)
|
||||
* Effect: std::min_element(first, last, comp);
|
||||
*
|
||||
* last_min_element(first, last)
|
||||
* Effect: reverse( std::min_element(reverse(last), reverse(first)) );
|
||||
*
|
||||
* last_min_element(first, last, comp)
|
||||
* Effect: reverse( std::min_element(reverse(last), reverse(first), comp) );
|
||||
*
|
||||
* first_max_element(first, last)
|
||||
* Effect: std::max_element(first, last);
|
||||
*
|
||||
* first_max_element(first, last, comp)
|
||||
* Effect: max_element(first, last);
|
||||
*
|
||||
* last_max_element(first, last)
|
||||
* Effect: reverse( std::max_element(reverse(last), reverse(first)) );
|
||||
*
|
||||
* last_max_element(first, last, comp)
|
||||
* Effect: reverse( std::max_element(reverse(last), reverse(first), comp) );
|
||||
*
|
||||
* first_min_first_max_element(first, last)
|
||||
* Effect: std::make_pair( first_min_element(first, last),
|
||||
* first_max_element(first, last) );
|
||||
*
|
||||
* first_min_first_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( first_min_element(first, last, comp),
|
||||
* first_max_element(first, last, comp) );
|
||||
*
|
||||
* first_min_last_max_element(first, last)
|
||||
* Effect: std::make_pair( first_min_element(first, last),
|
||||
* last_max_element(first, last) );
|
||||
*
|
||||
* first_min_last_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( first_min_element(first, last, comp),
|
||||
* last_max_element(first, last, comp) );
|
||||
*
|
||||
* last_min_first_max_element(first, last)
|
||||
* Effect: std::make_pair( last_min_element(first, last),
|
||||
* first_max_element(first, last) );
|
||||
*
|
||||
* last_min_first_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( last_min_element(first, last, comp),
|
||||
* first_max_element(first, last, comp) );
|
||||
*
|
||||
* last_min_last_max_element(first, last)
|
||||
* Effect: std::make_pair( last_min_element(first, last),
|
||||
* last_max_element(first, last) );
|
||||
*
|
||||
* last_min_last_max_element(first, last, comp)
|
||||
* Effect: std::make_pair( last_min_element(first, last, comp),
|
||||
* last_max_element(first, last, comp) );
|
||||
*/
|
||||
|
||||
namespace boost {
|
||||
|
||||
// Min_element and max_element variants
|
||||
|
||||
namespace detail { // common base for the overloads
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_first_min_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter min_result = first;
|
||||
while (++first != last)
|
||||
if (comp(first, min_result))
|
||||
min_result = first;
|
||||
return min_result;
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_last_min_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter min_result = first;
|
||||
while (++first != last)
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
return min_result;
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter max_result = first;
|
||||
while (++first != last)
|
||||
if (comp(max_result, first))
|
||||
max_result = first;
|
||||
return max_result;
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
basic_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return last;
|
||||
ForwardIter max_result = first;
|
||||
while (++first != last)
|
||||
if (!comp(first, max_result))
|
||||
max_result = first;
|
||||
return max_result;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
first_min_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_first_min_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
first_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_first_min_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
last_min_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_min_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
last_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_min_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
first_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_first_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
first_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_first_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
ForwardIter
|
||||
last_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
ForwardIter
|
||||
last_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
|
||||
// Minmax_element variants -- comments removed
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_first_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last)
|
||||
return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
ForwardIter second = ++first;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result, max_result);
|
||||
|
||||
if (comp(second, min_result))
|
||||
min_result = second;
|
||||
else
|
||||
max_result = second;
|
||||
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (!comp(second, first)) {
|
||||
if (comp(first, min_result))
|
||||
min_result = first;
|
||||
if (!comp(second, max_result))
|
||||
max_result = second;
|
||||
} else {
|
||||
if (comp(second, min_result))
|
||||
min_result = second;
|
||||
if (!comp(first, max_result))
|
||||
max_result = first;
|
||||
}
|
||||
first = ++second; if (first != last) ++second;
|
||||
}
|
||||
|
||||
if (first != last) {
|
||||
if (comp(first, min_result))
|
||||
min_result = first;
|
||||
else if (!comp(first, max_result))
|
||||
max_result = first;
|
||||
}
|
||||
|
||||
return std::make_pair(min_result, max_result);
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_last_min_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
ForwardIter second = ++first;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result, max_result);
|
||||
|
||||
if (comp(max_result, second))
|
||||
max_result = second;
|
||||
else
|
||||
min_result = second;
|
||||
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (comp(first, second)) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
if (comp(max_result, second))
|
||||
max_result = second;
|
||||
} else {
|
||||
if (!comp(min_result, second))
|
||||
min_result = second;
|
||||
if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
first = ++second; if (first != last) ++second;
|
||||
}
|
||||
|
||||
if (first != last) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
else if (comp(max_result, first))
|
||||
max_result = first;
|
||||
}
|
||||
|
||||
return std::make_pair(min_result, max_result);
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
basic_last_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
if (first == last) return std::make_pair(last,last);
|
||||
|
||||
ForwardIter min_result = first;
|
||||
ForwardIter max_result = first;
|
||||
|
||||
ForwardIter second = first; ++second;
|
||||
if (second == last)
|
||||
return std::make_pair(min_result,max_result);
|
||||
|
||||
ForwardIter potential_max_result = last;
|
||||
if (comp(first, second))
|
||||
max_result = second;
|
||||
else {
|
||||
min_result = second;
|
||||
potential_max_result = second;
|
||||
}
|
||||
|
||||
first = ++second; if (first != last) ++second;
|
||||
while (second != last) {
|
||||
if (comp(first, second)) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
if (!comp(second, max_result)) {
|
||||
max_result = second;
|
||||
potential_max_result = last;
|
||||
}
|
||||
} else {
|
||||
if (!comp(min_result, second))
|
||||
min_result = second;
|
||||
if (!comp(first, max_result)) {
|
||||
max_result = first;
|
||||
potential_max_result = second;
|
||||
}
|
||||
}
|
||||
first = ++second;
|
||||
if (first != last) ++second;
|
||||
}
|
||||
|
||||
if (first != last) {
|
||||
if (!comp(min_result, first))
|
||||
min_result = first;
|
||||
if (!comp(first, max_result)) {
|
||||
max_result = first;
|
||||
potential_max_result = last;
|
||||
}
|
||||
}
|
||||
|
||||
if (potential_max_result != last
|
||||
&& !comp(potential_max_result, max_result))
|
||||
max_result = potential_max_result;
|
||||
|
||||
return std::make_pair(min_result,max_result);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename ForwardIter>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
first_min_first_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return minmax_element(first, last);
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
first_min_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return minmax_element(first, last, comp);
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
first_min_last_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_first_min_last_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
first_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_first_min_last_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
last_min_first_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_min_first_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
last_min_first_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_min_first_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
template <typename ForwardIter>
|
||||
std::pair<ForwardIter,ForwardIter>
|
||||
last_min_last_max_element(ForwardIter first, ForwardIter last)
|
||||
{
|
||||
return detail::basic_last_min_last_max_element(first, last,
|
||||
detail::less_over_iter<ForwardIter>() );
|
||||
}
|
||||
|
||||
template <typename ForwardIter, class BinaryPredicate>
|
||||
inline std::pair<ForwardIter,ForwardIter>
|
||||
last_min_last_max_element(ForwardIter first, ForwardIter last,
|
||||
BinaryPredicate comp)
|
||||
{
|
||||
return detail::basic_last_min_last_max_element(first, last,
|
||||
detail::binary_pred_over_iter<ForwardIter,BinaryPredicate>(comp) );
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ALGORITHM_MINMAX_ELEMENT_HPP
|
@ -30,8 +30,10 @@ namespace boost {
|
||||
|
||||
// a tolower functor
|
||||
template<typename CharT>
|
||||
struct to_lowerF : public std::unary_function<CharT, CharT>
|
||||
struct to_lowerF
|
||||
{
|
||||
typedef CharT argument_type;
|
||||
typedef CharT result_type;
|
||||
// Constructor
|
||||
to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {}
|
||||
|
||||
@ -50,8 +52,10 @@ namespace boost {
|
||||
|
||||
// a toupper functor
|
||||
template<typename CharT>
|
||||
struct to_upperF : public std::unary_function<CharT, CharT>
|
||||
struct to_upperF
|
||||
{
|
||||
typedef CharT argument_type;
|
||||
typedef CharT result_type;
|
||||
// Constructor
|
||||
to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {}
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace boost {
|
||||
// Protected construction/destruction
|
||||
|
||||
// Default constructor
|
||||
find_iterator_base() {};
|
||||
find_iterator_base() {}
|
||||
// Copy construction
|
||||
find_iterator_base( const find_iterator_base& Other ) :
|
||||
m_Finder(Other.m_Finder) {}
|
||||
|
@ -89,9 +89,10 @@ namespace boost {
|
||||
template<
|
||||
typename SeqT,
|
||||
typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator >
|
||||
struct copy_iterator_rangeF :
|
||||
public std::unary_function< iterator_range<IteratorT>, SeqT >
|
||||
struct copy_iterator_rangeF
|
||||
{
|
||||
typedef iterator_range<IteratorT> argument_type;
|
||||
typedef SeqT result_type;
|
||||
SeqT operator()( const iterator_range<IteratorT>& Range ) const
|
||||
{
|
||||
return copy_range<SeqT>(Range);
|
||||
|
@ -43,7 +43,6 @@ namespace boost {
|
||||
The result is given as an \c iterator_range delimiting the match.
|
||||
|
||||
\param Search A substring to be searched for.
|
||||
\param Comp An element comparison predicate
|
||||
\return An instance of the \c first_finder object
|
||||
*/
|
||||
template<typename RangeT>
|
||||
@ -84,7 +83,6 @@ namespace boost {
|
||||
The result is given as an \c iterator_range delimiting the match.
|
||||
|
||||
\param Search A substring to be searched for.
|
||||
\param Comp An element comparison predicate
|
||||
\return An instance of the \c last_finder object
|
||||
*/
|
||||
template<typename RangeT>
|
||||
@ -124,7 +122,6 @@ namespace boost {
|
||||
|
||||
\param Search A substring to be searched for.
|
||||
\param Nth An index of the match to be find
|
||||
\param Comp An element comparison predicate
|
||||
\return An instance of the \c nth_finder object
|
||||
*/
|
||||
template<typename RangeT>
|
||||
@ -230,7 +227,6 @@ namespace boost {
|
||||
|
||||
\param Begin Beginning of the range
|
||||
\param End End of the range
|
||||
\param Range The range.
|
||||
\return An instance of the \c range_finger object
|
||||
*/
|
||||
template< typename ForwardIteratorT >
|
||||
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
(c) 2014-2015 Glen Joseph Fernandes
|
||||
<glenjofe -at- gmail.com>
|
||||
|
||||
Distributed under the Boost Software
|
||||
License, Version 1.0.
|
||||
http://boost.org/LICENSE_1_0.txt
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_ALIGN_HPP
|
||||
#define BOOST_ALIGN_ALIGN_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_STD_ALIGN)
|
||||
#include <boost/align/detail/align_cxx11.hpp>
|
||||
#else
|
||||
#include <boost/align/detail/align.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
(c) 2014-2016 Glen Joseph Fernandes
|
||||
<glenjofe -at- gmail.com>
|
||||
|
||||
Distributed under the Boost Software
|
||||
License, Version 1.0.
|
||||
http://boost.org/LICENSE_1_0.txt
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGN_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void* align(std::size_t alignment, std::size_t size,
|
||||
void*& ptr, std::size_t& space)
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
if (size <= space) {
|
||||
char* p = (char*)(((std::size_t)ptr + alignment - 1) &
|
||||
~(alignment - 1));
|
||||
std::size_t n = space - (p - static_cast<char*>(ptr));
|
||||
if (size <= n) {
|
||||
ptr = p;
|
||||
space = n;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} /* .alignment */
|
||||
} /* .boost */
|
||||
|
||||
#endif
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
(c) 2014 Glen Joseph Fernandes
|
||||
<glenjofe -at- gmail.com>
|
||||
|
||||
Distributed under the Boost Software
|
||||
License, Version 1.0.
|
||||
http://boost.org/LICENSE_1_0.txt
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
using std::align;
|
||||
|
||||
} /* .alignment */
|
||||
} /* .boost */
|
||||
|
||||
#endif
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
(c) 2014 Glen Joseph Fernandes
|
||||
<glenjofe -at- gmail.com>
|
||||
|
||||
Distributed under the Boost Software
|
||||
License, Version 1.0.
|
||||
http://boost.org/LICENSE_1_0.txt
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
|
||||
#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
BOOST_CONSTEXPR inline bool is_alignment(std::size_t value)
|
||||
BOOST_NOEXCEPT
|
||||
{
|
||||
return (value > 0) && ((value & (value - 1)) == 0);
|
||||
}
|
||||
|
||||
} /* .detail */
|
||||
} /* .alignment */
|
||||
} /* .boost */
|
||||
|
||||
#endif
|
@ -12,11 +12,11 @@
|
||||
// with features contributed and bugs found by
|
||||
// Antony Polukhin, Ed Brey, Mark Rodgers,
|
||||
// Peter Dimov, and James Curran
|
||||
// when: July 2001, April 2013 - May 2013
|
||||
// when: July 2001, April 2013 - 2019
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_index.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/decay.hpp>
|
||||
@ -27,9 +27,10 @@
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/conditional.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@ -108,7 +109,7 @@ namespace boost
|
||||
return *this;
|
||||
}
|
||||
|
||||
// move assignement
|
||||
// move assignment
|
||||
any & operator=(any&& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
rhs.swap(*this);
|
||||
@ -148,7 +149,7 @@ namespace boost
|
||||
public: // types (public so any_cast can be non-friend)
|
||||
#endif
|
||||
|
||||
class placeholder
|
||||
class BOOST_SYMBOL_VISIBLE placeholder
|
||||
{
|
||||
public: // structors
|
||||
|
||||
@ -244,7 +245,9 @@ namespace boost
|
||||
ValueType * any_cast(any * operand) BOOST_NOEXCEPT
|
||||
{
|
||||
return operand && operand->type() == boost::typeindex::type_id<ValueType>()
|
||||
? &static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held
|
||||
? boost::addressof(
|
||||
static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held
|
||||
)
|
||||
: 0;
|
||||
}
|
||||
|
||||
@ -260,7 +263,7 @@ namespace boost
|
||||
typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
|
||||
|
||||
|
||||
nonref * result = any_cast<nonref>(&operand);
|
||||
nonref * result = any_cast<nonref>(boost::addressof(operand));
|
||||
if(!result)
|
||||
boost::throw_exception(bad_any_cast());
|
||||
|
||||
@ -268,13 +271,20 @@ namespace boost
|
||||
// `ValueType` is not a reference. Example:
|
||||
// `static_cast<std::string>(*result);`
|
||||
// which is equal to `std::string(*result);`
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
|
||||
boost::is_reference<ValueType>,
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::conditional<
|
||||
boost::is_reference<ValueType>::value,
|
||||
ValueType,
|
||||
BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type
|
||||
>::type ref_type;
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local!
|
||||
#endif
|
||||
return static_cast<ref_type>(*result);
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
@ -306,7 +316,9 @@ namespace boost
|
||||
template<typename ValueType>
|
||||
inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT
|
||||
{
|
||||
return &static_cast<any::holder<ValueType> *>(operand->content)->held;
|
||||
return boost::addressof(
|
||||
static_cast<any::holder<ValueType> *>(operand->content)->held
|
||||
);
|
||||
}
|
||||
|
||||
template<typename ValueType>
|
||||
@ -317,6 +329,7 @@ namespace boost
|
||||
}
|
||||
|
||||
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
|
||||
// Copyright Antony Polukhin, 2013-2019.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -127,11 +127,11 @@ public:
|
||||
}
|
||||
|
||||
// used for text output
|
||||
operator int () const {
|
||||
operator base_type () const {
|
||||
return t;
|
||||
}
|
||||
// used for text input
|
||||
operator int_least16_t &() {
|
||||
operator base_type &() {
|
||||
return t;
|
||||
}
|
||||
bool operator==(const class_id_type & rhs) const {
|
||||
@ -151,7 +151,10 @@ private:
|
||||
public:
|
||||
object_id_type(): t(0) {};
|
||||
// note: presumes that size_t >= unsigned int.
|
||||
explicit object_id_type(const std::size_t & t_) : t(t_){
|
||||
// use explicit cast to silence useless warning
|
||||
explicit object_id_type(const std::size_t & t_) : t(static_cast<base_type>(t_)){
|
||||
// make quadriple sure that we haven't lost any real integer
|
||||
// precision
|
||||
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
object_id_type(const object_id_type & t_) :
|
||||
@ -162,11 +165,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
// used for text output
|
||||
operator uint_least32_t () const {
|
||||
operator base_type () const {
|
||||
return t;
|
||||
}
|
||||
// used for text input
|
||||
operator uint_least32_t & () {
|
||||
operator base_type & () {
|
||||
return t;
|
||||
}
|
||||
bool operator==(const object_id_type & rhs) const {
|
||||
|
@ -102,17 +102,29 @@ protected:
|
||||
}
|
||||
void load_override(class_id_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
/*
|
||||
* library versions:
|
||||
* boost 1.39 -> 5
|
||||
* boost 1.43 -> 7
|
||||
* boost 1.47 -> 9
|
||||
*
|
||||
*
|
||||
* 1) in boost 1.43 and inferior, class_id_type is always a 16bit value, with no check on the library version
|
||||
* --> this means all archives with version v <= 7 are written with a 16bit class_id_type
|
||||
* 2) in boost 1.44 this load_override has disappeared (and thus boost 1.44 is not backward compatible at all !!)
|
||||
* 3) recent boosts reintroduced load_override with a test on the version :
|
||||
* - v > 7 : this->detail_common_iarchive::load_override(t, version)
|
||||
* - v > 6 : 16bit
|
||||
* - other : 32bit
|
||||
* --> which is obviously incorrect, see point 1
|
||||
*
|
||||
* the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ...
|
||||
*/
|
||||
if(boost::archive::library_version_type(7) < lvt){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
int_least16_t x=0;
|
||||
* this->This() >> x;
|
||||
t = boost::archive::class_id_type(x);
|
||||
}
|
||||
else{
|
||||
int x=0;
|
||||
int_least16_t x=0;
|
||||
* this->This() >> x;
|
||||
t = boost::archive::class_id_type(x);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ namespace std{
|
||||
|
||||
//#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/array_wrapper.hpp>
|
||||
|
||||
#include <boost/archive/basic_streambuf_locale_saver.hpp>
|
||||
#include <boost/archive/codecvt_null.hpp>
|
||||
|
@ -45,7 +45,7 @@ namespace std{
|
||||
|
||||
//#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/array_wrapper.hpp>
|
||||
|
||||
#include <boost/archive/basic_streambuf_locale_saver.hpp>
|
||||
#include <boost/archive/codecvt_null.hpp>
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
// note the fact that on libraries without wide characters, ostream is
|
||||
// is not a specialization of basic_ostream which in fact is not defined
|
||||
// in such cases. So we can't use basic_ostream<IStream::char_type> but rather
|
||||
// in such cases. So we can't use basic_istream<IStream::char_type> but rather
|
||||
// use two template parameters
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
@ -175,8 +175,6 @@ protected:
|
||||
|
||||
template<class T>
|
||||
void save(const T & t){
|
||||
boost::io::ios_flags_saver fs(os);
|
||||
boost::io::ios_precision_saver ps(os);
|
||||
typename is_float<T>::type tf;
|
||||
save_impl(t, tf);
|
||||
}
|
||||
|
@ -89,8 +89,7 @@ protected:
|
||||
// leaving the archive in an undetermined state
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
load_override(class_id_type & t);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
load_override(class_id_optional_type & /* t */){}
|
||||
void load_override(class_id_optional_type & /* t */){}
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
load_override(object_id_type & t);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
|
@ -18,8 +18,11 @@
|
||||
|
||||
#include <locale>
|
||||
#include <cstddef> // NULL, size_t
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#include <cwchar> // for mbstate_t
|
||||
#endif
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/serialization/force_include.hpp>
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
@ -60,9 +63,10 @@ public:
|
||||
};
|
||||
|
||||
template<>
|
||||
class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
|
||||
class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> :
|
||||
public std::codecvt<wchar_t, char, std::mbstate_t>
|
||||
{
|
||||
virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
|
||||
virtual std::codecvt_base::result
|
||||
do_out(
|
||||
std::mbstate_t & state,
|
||||
const wchar_t * first1,
|
||||
@ -72,7 +76,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t,
|
||||
char * last2,
|
||||
char * & next2
|
||||
) const;
|
||||
virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
|
||||
virtual std::codecvt_base::result
|
||||
do_in(
|
||||
std::mbstate_t & state,
|
||||
const char * first1,
|
||||
@ -92,7 +96,7 @@ public:
|
||||
explicit codecvt_null(std::size_t no_locale_manage = 0) :
|
||||
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
|
||||
{}
|
||||
virtual ~codecvt_null(){};
|
||||
//virtual ~codecvt_null(){};
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -35,11 +35,12 @@ class extended_type_info;
|
||||
|
||||
// note: referred to as Curiously Recurring Template Patter (CRTP)
|
||||
template<class Archive>
|
||||
class BOOST_SYMBOL_VISIBLE common_iarchive :
|
||||
class BOOST_SYMBOL_VISIBLE common_iarchive :
|
||||
public basic_iarchive,
|
||||
public interface_iarchive<Archive>
|
||||
{
|
||||
friend class interface_iarchive<Archive>;
|
||||
friend class basic_iarchive;
|
||||
private:
|
||||
virtual void vload(version_type & t){
|
||||
* this->This() >> t;
|
||||
|
@ -38,6 +38,7 @@ class BOOST_SYMBOL_VISIBLE common_oarchive :
|
||||
public interface_oarchive<Archive>
|
||||
{
|
||||
friend class interface_oarchive<Archive>;
|
||||
friend class basic_oarchive;
|
||||
private:
|
||||
virtual void vsave(const version_type t){
|
||||
* this->This() << t;
|
||||
|
@ -57,11 +57,10 @@ namespace std{
|
||||
|
||||
#include <boost/serialization/assume_abstract.hpp>
|
||||
|
||||
#ifndef BOOST_MSVC
|
||||
#define DONT_USE_HAS_NEW_OPERATOR ( \
|
||||
BOOST_WORKAROUND(__IBMCPP__, < 1210) \
|
||||
|| defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \
|
||||
)
|
||||
#if !defined(BOOST_MSVC) && \
|
||||
(BOOST_WORKAROUND(__IBMCPP__, < 1210) || \
|
||||
defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590))
|
||||
#define DONT_USE_HAS_NEW_OPERATOR 1
|
||||
#else
|
||||
#define DONT_USE_HAS_NEW_OPERATOR 0
|
||||
#endif
|
||||
@ -77,10 +76,10 @@ namespace std{
|
||||
#include <boost/serialization/type_info_implementation.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/void_cast.hpp>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/singleton.hpp>
|
||||
#include <boost/serialization/wrapper.hpp>
|
||||
#include <boost/serialization/array_wrapper.hpp>
|
||||
|
||||
// the following is need only for dynamic cast of polymorphic pointers
|
||||
#include <boost/archive/archive_exception.hpp>
|
||||
@ -90,6 +89,8 @@ namespace std{
|
||||
#include <boost/archive/detail/archive_serializer_map.hpp>
|
||||
#include <boost/archive/detail/check.hpp>
|
||||
|
||||
#include <boost/core/addressof.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace serialization {
|
||||
@ -122,8 +123,7 @@ private:
|
||||
virtual void destroy(/*const*/ void *address) const {
|
||||
boost::serialization::access::destroy(static_cast<T *>(address));
|
||||
}
|
||||
protected:
|
||||
// protected constructor since it's always created by singleton
|
||||
public:
|
||||
explicit iserializer() :
|
||||
basic_iserializer(
|
||||
boost::serialization::singleton<
|
||||
@ -132,7 +132,6 @@ protected:
|
||||
>::get_const_instance()
|
||||
)
|
||||
{}
|
||||
public:
|
||||
virtual BOOST_DLLEXPORT void load_object_data(
|
||||
basic_iarchive & ar,
|
||||
void *x,
|
||||
@ -234,7 +233,7 @@ struct heap_allocation {
|
||||
// that the class might have class specific new with NO
|
||||
// class specific delete at all. Patches (compatible with
|
||||
// C++03) welcome!
|
||||
delete t;
|
||||
(operator delete)(t);
|
||||
}
|
||||
};
|
||||
struct doesnt_have_new_operator {
|
||||
@ -243,7 +242,7 @@ struct heap_allocation {
|
||||
}
|
||||
static void invoke_delete(T * t) {
|
||||
// Note: I'm reliance upon automatic conversion from T * to void * here
|
||||
delete t;
|
||||
(operator delete)(t);
|
||||
}
|
||||
};
|
||||
static T * invoke_new() {
|
||||
@ -306,7 +305,7 @@ private:
|
||||
void * x,
|
||||
const unsigned int file_version
|
||||
) const BOOST_USED;
|
||||
protected:
|
||||
public:
|
||||
// this should alway be a singleton so make the constructor protected
|
||||
pointer_iserializer();
|
||||
~pointer_iserializer();
|
||||
@ -406,7 +405,7 @@ struct load_non_pointer_type {
|
||||
struct load_standard {
|
||||
template<class T>
|
||||
static void invoke(Archive &ar, const T & t){
|
||||
void * x = & const_cast<T &>(t);
|
||||
void * x = boost::addressof(const_cast<T &>(t));
|
||||
ar.load_object(
|
||||
x,
|
||||
boost::serialization::singleton<
|
||||
@ -484,7 +483,7 @@ struct load_pointer_type {
|
||||
};
|
||||
|
||||
template<class T>
|
||||
static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*t*/){
|
||||
static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){
|
||||
// there should never be any need to load an abstract polymorphic
|
||||
// class pointer. Inhibiting code generation for this
|
||||
// permits abstract base classes to be used - note: exception
|
||||
@ -523,7 +522,7 @@ struct load_pointer_type {
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static void check_load(T & /* t */){
|
||||
static void check_load(T * const /* t */){
|
||||
check_pointer_level< T >();
|
||||
check_pointer_tracking< T >();
|
||||
}
|
||||
@ -537,8 +536,8 @@ struct load_pointer_type {
|
||||
|
||||
template<class Tptr>
|
||||
static void invoke(Archive & ar, Tptr & t){
|
||||
check_load(*t);
|
||||
const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t);
|
||||
check_load(t);
|
||||
const basic_pointer_iserializer * bpis_ptr = register_type(ar, t);
|
||||
const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer(
|
||||
// note major hack here !!!
|
||||
// I tried every way to convert Tptr &t (where Tptr might
|
||||
@ -588,7 +587,14 @@ struct load_array_type {
|
||||
boost::archive::archive_exception::array_size_too_short
|
||||
)
|
||||
);
|
||||
ar >> serialization::make_array(static_cast<value_type*>(&t[0]),count);
|
||||
// explict template arguments to pass intel C++ compiler
|
||||
ar >> serialization::make_array<
|
||||
value_type,
|
||||
boost::serialization::collection_size_type
|
||||
>(
|
||||
static_cast<value_type *>(&t[0]),
|
||||
count
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@ -598,7 +604,7 @@ template<class Archive, class T>
|
||||
inline void load(Archive & ar, T &t){
|
||||
// if this assertion trips. It means we're trying to load a
|
||||
// const object with a compiler that doesn't have correct
|
||||
// funtion template ordering. On other compilers, this is
|
||||
// function template ordering. On other compilers, this is
|
||||
// handled below.
|
||||
detail::check_const_loading< T >();
|
||||
typedef
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <cstddef> // NULL
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
@ -56,8 +57,9 @@
|
||||
#include <boost/serialization/type_info_implementation.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/void_cast.hpp>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/array_wrapper.hpp>
|
||||
|
||||
#include <boost/serialization/singleton.hpp>
|
||||
|
||||
#include <boost/archive/archive_exception.hpp>
|
||||
@ -67,6 +69,8 @@
|
||||
#include <boost/archive/detail/archive_serializer_map.hpp>
|
||||
#include <boost/archive/detail/check.hpp>
|
||||
|
||||
#include <boost/core/addressof.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace serialization {
|
||||
@ -252,7 +256,7 @@ struct save_non_pointer_type {
|
||||
template<class T>
|
||||
static void invoke(Archive &ar, const T & t){
|
||||
ar.save_object(
|
||||
& t,
|
||||
boost::addressof(t),
|
||||
boost::serialization::singleton<
|
||||
oserializer<Archive, T>
|
||||
>::get_const_instance()
|
||||
@ -260,6 +264,8 @@ struct save_non_pointer_type {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// adds class information to the archive. This includes
|
||||
// serialization level and class version
|
||||
struct save_conditional {
|
||||
@ -337,7 +343,7 @@ struct save_pointer_type {
|
||||
};
|
||||
|
||||
template<class T>
|
||||
static const basic_pointer_oserializer * register_type(Archive &ar, T & /*t*/){
|
||||
static const basic_pointer_oserializer * register_type(Archive &ar, T* const /*t*/){
|
||||
// there should never be any need to save an abstract polymorphic
|
||||
// class pointer. Inhibiting code generation for this
|
||||
// permits abstract base classes to be used - note: exception
|
||||
@ -404,7 +410,7 @@ struct save_pointer_type {
|
||||
// if its not a pointer to a more derived type
|
||||
const void *vp = static_cast<const void *>(&t);
|
||||
if(*this_type == *true_type){
|
||||
const basic_pointer_oserializer * bpos = register_type(ar, t);
|
||||
const basic_pointer_oserializer * bpos = register_type(ar, &t);
|
||||
ar.save_pointer(vp, bpos);
|
||||
return;
|
||||
}
|
||||
@ -463,7 +469,7 @@ struct save_pointer_type {
|
||||
|
||||
template<class TPtr>
|
||||
static void invoke(Archive &ar, const TPtr t){
|
||||
register_type(ar, * t);
|
||||
register_type(ar, t);
|
||||
if(NULL == t){
|
||||
basic_oarchive & boa
|
||||
= boost::serialization::smart_cast_reference<basic_oarchive &>(ar);
|
||||
@ -501,7 +507,14 @@ struct save_array_type
|
||||
);
|
||||
boost::serialization::collection_size_type count(c);
|
||||
ar << BOOST_SERIALIZATION_NVP(count);
|
||||
ar << serialization::make_array(static_cast<value_type const*>(&t[0]),count);
|
||||
// explict template arguments to pass intel C++ compiler
|
||||
ar << serialization::make_array<
|
||||
const value_type,
|
||||
boost::serialization::collection_size_type
|
||||
>(
|
||||
static_cast<const value_type *>(&t[0]),
|
||||
count
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
218
boost/boost/archive/detail/polymorphic_iarchive_route.hpp
Normal file
218
boost/boost/archive/detail/polymorphic_iarchive_route.hpp
Normal file
@ -0,0 +1,218 @@
|
||||
#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP
|
||||
#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// polymorphic_iarchive_route.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// 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.
|
||||
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
#include <boost/archive/polymorphic_iarchive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
class extended_type_info;
|
||||
} // namespace serialization
|
||||
namespace archive {
|
||||
namespace detail{
|
||||
|
||||
class basic_iserializer;
|
||||
class basic_pointer_iserializer;
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
template<class ArchiveImplementation>
|
||||
class polymorphic_iarchive_route :
|
||||
public polymorphic_iarchive,
|
||||
// note: gcc dynamic cross cast fails if the the derivation below is
|
||||
// not public. I think this is a mistake.
|
||||
public /*protected*/ ArchiveImplementation
|
||||
{
|
||||
private:
|
||||
// these are used by the serialization library.
|
||||
virtual void load_object(
|
||||
void *t,
|
||||
const basic_iserializer & bis
|
||||
){
|
||||
ArchiveImplementation::load_object(t, bis);
|
||||
}
|
||||
virtual const basic_pointer_iserializer * load_pointer(
|
||||
void * & t,
|
||||
const basic_pointer_iserializer * bpis_ptr,
|
||||
const basic_pointer_iserializer * (*finder)(
|
||||
const boost::serialization::extended_type_info & type
|
||||
)
|
||||
){
|
||||
return ArchiveImplementation::load_pointer(t, bpis_ptr, finder);
|
||||
}
|
||||
virtual void set_library_version(library_version_type archive_library_version){
|
||||
ArchiveImplementation::set_library_version(archive_library_version);
|
||||
}
|
||||
virtual library_version_type get_library_version() const{
|
||||
return ArchiveImplementation::get_library_version();
|
||||
}
|
||||
virtual unsigned int get_flags() const {
|
||||
return ArchiveImplementation::get_flags();
|
||||
}
|
||||
virtual void delete_created_pointers(){
|
||||
ArchiveImplementation::delete_created_pointers();
|
||||
}
|
||||
virtual void reset_object_address(
|
||||
const void * new_address,
|
||||
const void * old_address
|
||||
){
|
||||
ArchiveImplementation::reset_object_address(new_address, old_address);
|
||||
}
|
||||
virtual void load_binary(void * t, std::size_t size){
|
||||
ArchiveImplementation::load_binary(t, size);
|
||||
}
|
||||
// primitive types the only ones permitted by polymorphic archives
|
||||
virtual void load(bool & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(char & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(signed char & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned char & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
virtual void load(wchar_t & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
virtual void load(short & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned short & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(int & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned int & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(long & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned long & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
virtual void load(boost::long_long_type & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(boost::ulong_long_type & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
virtual void load(__int64 & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned __int64 & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#endif
|
||||
virtual void load(float & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(double & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(std::string & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
virtual void load(std::wstring & t){
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#endif
|
||||
// used for xml and other tagged formats default does nothing
|
||||
virtual void load_start(const char * name){
|
||||
ArchiveImplementation::load_start(name);
|
||||
}
|
||||
virtual void load_end(const char * name){
|
||||
ArchiveImplementation::load_end(name);
|
||||
}
|
||||
virtual void register_basic_serializer(const basic_iserializer & bis){
|
||||
ArchiveImplementation::register_basic_serializer(bis);
|
||||
}
|
||||
virtual helper_collection &
|
||||
get_helper_collection(){
|
||||
return ArchiveImplementation::get_helper_collection();
|
||||
}
|
||||
public:
|
||||
// this can't be inheriteded because they appear in mulitple
|
||||
// parents
|
||||
typedef mpl::bool_<true> is_loading;
|
||||
typedef mpl::bool_<false> is_saving;
|
||||
// the >> operator
|
||||
template<class T>
|
||||
polymorphic_iarchive & operator>>(T & t){
|
||||
return polymorphic_iarchive::operator>>(t);
|
||||
}
|
||||
// the & operator
|
||||
template<class T>
|
||||
polymorphic_iarchive & operator&(T & t){
|
||||
return polymorphic_iarchive::operator&(t);
|
||||
}
|
||||
// register type function
|
||||
template<class T>
|
||||
const basic_pointer_iserializer *
|
||||
register_type(T * t = NULL){
|
||||
return ArchiveImplementation::register_type(t);
|
||||
}
|
||||
// all current archives take a stream as constructor argument
|
||||
template <class _Elem, class _Tr>
|
||||
polymorphic_iarchive_route(
|
||||
std::basic_istream<_Elem, _Tr> & is,
|
||||
unsigned int flags = 0
|
||||
) :
|
||||
ArchiveImplementation(is, flags)
|
||||
{}
|
||||
virtual ~polymorphic_iarchive_route(){};
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
|
||||
|
||||
#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_DISPATCH_HPP
|
209
boost/boost/archive/detail/polymorphic_oarchive_route.hpp
Normal file
209
boost/boost/archive/detail/polymorphic_oarchive_route.hpp
Normal file
@ -0,0 +1,209 @@
|
||||
#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP
|
||||
#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// polymorphic_oarchive_route.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// 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.
|
||||
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
#include <cstddef> // size_t
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
#include <boost/archive/polymorphic_oarchive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
class extended_type_info;
|
||||
} // namespace serialization
|
||||
namespace archive {
|
||||
namespace detail{
|
||||
|
||||
class basic_oserializer;
|
||||
class basic_pointer_oserializer;
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
template<class ArchiveImplementation>
|
||||
class polymorphic_oarchive_route :
|
||||
public polymorphic_oarchive,
|
||||
// note: gcc dynamic cross cast fails if the the derivation below is
|
||||
// not public. I think this is a mistake.
|
||||
public /*protected*/ ArchiveImplementation
|
||||
{
|
||||
private:
|
||||
// these are used by the serialization library.
|
||||
virtual void save_object(
|
||||
const void *x,
|
||||
const detail::basic_oserializer & bos
|
||||
){
|
||||
ArchiveImplementation::save_object(x, bos);
|
||||
}
|
||||
virtual void save_pointer(
|
||||
const void * t,
|
||||
const detail::basic_pointer_oserializer * bpos_ptr
|
||||
){
|
||||
ArchiveImplementation::save_pointer(t, bpos_ptr);
|
||||
}
|
||||
virtual void save_null_pointer(){
|
||||
ArchiveImplementation::save_null_pointer();
|
||||
}
|
||||
// primitive types the only ones permitted by polymorphic archives
|
||||
virtual void save(const bool t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const char t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const signed char t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned char t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
virtual void save(const wchar_t t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
virtual void save(const short t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned short t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const int t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned int t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const long t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned long t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
virtual void save(const boost::long_long_type t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const boost::ulong_long_type t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
virtual void save(const boost::int64_t t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const boost::uint64_t t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#endif
|
||||
virtual void save(const float t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const double t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const std::string & t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
virtual void save(const std::wstring & t){
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#endif
|
||||
virtual library_version_type get_library_version() const{
|
||||
return ArchiveImplementation::get_library_version();
|
||||
}
|
||||
virtual unsigned int get_flags() const {
|
||||
return ArchiveImplementation::get_flags();
|
||||
}
|
||||
virtual void save_binary(const void * t, std::size_t size){
|
||||
ArchiveImplementation::save_binary(t, size);
|
||||
}
|
||||
// used for xml and other tagged formats default does nothing
|
||||
virtual void save_start(const char * name){
|
||||
ArchiveImplementation::save_start(name);
|
||||
}
|
||||
virtual void save_end(const char * name){
|
||||
ArchiveImplementation::save_end(name);
|
||||
}
|
||||
virtual void end_preamble(){
|
||||
ArchiveImplementation::end_preamble();
|
||||
}
|
||||
virtual void register_basic_serializer(const detail::basic_oserializer & bos){
|
||||
ArchiveImplementation::register_basic_serializer(bos);
|
||||
}
|
||||
virtual helper_collection &
|
||||
get_helper_collection(){
|
||||
return ArchiveImplementation::get_helper_collection();
|
||||
}
|
||||
public:
|
||||
// this can't be inheriteded because they appear in mulitple
|
||||
// parents
|
||||
typedef mpl::bool_<false> is_loading;
|
||||
typedef mpl::bool_<true> is_saving;
|
||||
// the << operator
|
||||
template<class T>
|
||||
polymorphic_oarchive & operator<<(T & t){
|
||||
return polymorphic_oarchive::operator<<(t);
|
||||
}
|
||||
// the & operator
|
||||
template<class T>
|
||||
polymorphic_oarchive & operator&(T & t){
|
||||
return polymorphic_oarchive::operator&(t);
|
||||
}
|
||||
// register type function
|
||||
template<class T>
|
||||
const basic_pointer_oserializer *
|
||||
register_type(T * t = NULL){
|
||||
return ArchiveImplementation::register_type(t);
|
||||
}
|
||||
// all current archives take a stream as constructor argument
|
||||
template <class _Elem, class _Tr>
|
||||
polymorphic_oarchive_route(
|
||||
std::basic_ostream<_Elem, _Tr> & os,
|
||||
unsigned int flags = 0
|
||||
) :
|
||||
ArchiveImplementation(os, flags)
|
||||
{}
|
||||
virtual ~polymorphic_oarchive_route(){};
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
|
||||
|
||||
#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_DISPATCH_HPP
|
@ -9,26 +9,21 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// std::codecvt_utf8 doesn't seem to work for msvc
|
||||
// versions prior to MSVC 14.0
|
||||
#ifdef BOOST_NO_STD_WSTREAMBUF
|
||||
#error "wide char i/o not supported on this platform"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900 \
|
||||
|| defined( BOOST_NO_CXX11_HDR_CODECVT )
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
#define BOOST_UTF8_BEGIN_NAMESPACE \
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL
|
||||
#define BOOST_UTF8_END_NAMESPACE }}}
|
||||
// use boost's utf8 codecvt facet
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
#define BOOST_UTF8_BEGIN_NAMESPACE \
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL
|
||||
#define BOOST_UTF8_END_NAMESPACE }}}
|
||||
|
||||
#include <boost/detail/utf8_codecvt_facet.hpp>
|
||||
#include <boost/detail/utf8_codecvt_facet.hpp>
|
||||
|
||||
#undef BOOST_UTF8_END_NAMESPACE
|
||||
#undef BOOST_UTF8_DECL
|
||||
#undef BOOST_UTF8_BEGIN_NAMESPACE
|
||||
|
||||
#undef BOOST_UTF8_END_NAMESPACE
|
||||
#undef BOOST_UTF8_DECL
|
||||
#undef BOOST_UTF8_BEGIN_NAMESPACE
|
||||
#else
|
||||
#include <codecvt>
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet;
|
||||
} } }
|
||||
#endif // BOOST_NO_CXX11_HDR_CODECVT
|
||||
#endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
|
||||
|
@ -47,6 +47,10 @@ archive_serializer_map<Archive>::insert(const basic_serializer * bs){
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
archive_serializer_map<Archive>::erase(const basic_serializer * bs){
|
||||
// note: previously this conditional was a runtime assertion with
|
||||
// BOOST_ASSERT. We've changed it because we've discovered that at
|
||||
// least one platform is not guaranteed to destroy singletons in
|
||||
// reverse order of distruction.
|
||||
if(boost::serialization::singleton<
|
||||
extra_detail::map<Archive>
|
||||
>::is_destroyed())
|
||||
|
@ -84,6 +84,8 @@ basic_binary_iprimitive<Archive, Elem, Tr>::init()
|
||||
);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
template<class Archive, class Elem, class Tr>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>::load(wchar_t * ws)
|
||||
@ -93,6 +95,8 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(wchar_t * ws)
|
||||
load_binary(ws, l * sizeof(wchar_t) / sizeof(char));
|
||||
ws[l] = L'\0';
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
template<class Archive, class Elem, class Tr>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
@ -110,7 +114,6 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(std::string & s)
|
||||
load_binary(&(*s.begin()), l);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
template<class Archive, class Elem, class Tr>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>::load(char * s)
|
||||
@ -120,7 +123,6 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(char * s)
|
||||
load_binary(s, l);
|
||||
s[l] = '\0';
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
template<class Archive, class Elem, class Tr>
|
||||
|
@ -71,6 +71,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::string &s)
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
template<class Archive, class Elem, class Tr>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
basic_binary_oprimitive<Archive, Elem, Tr>::save(const wchar_t * ws)
|
||||
@ -91,6 +92,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save(const std::wstring &ws)
|
||||
save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char));
|
||||
}
|
||||
#endif
|
||||
#endif // BOOST_NO_CWCHAR
|
||||
|
||||
template<class Archive, class Elem, class Tr>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
|
@ -64,7 +64,7 @@ namespace archive {
|
||||
// XML grammar parsing
|
||||
|
||||
template<class CharType>
|
||||
class basic_xml_grammar {
|
||||
class BOOST_SYMBOL_VISIBLE basic_xml_grammar {
|
||||
public:
|
||||
// The following is not necessary according to DR45, but at least
|
||||
// one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user