mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
Compare commits
450 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9a0181189 | ||
|
|
09570996a9 | ||
|
|
adc4c855ca | ||
|
|
8b1df06a94 | ||
|
|
7c81eec30c | ||
|
|
faa999d6d0 | ||
|
|
370bfb7a22 | ||
|
|
ae649ec917 | ||
|
|
93b44fcdc1 | ||
|
|
1fe57720c4 | ||
|
|
fca8fa1b1b | ||
|
|
81082ad10f | ||
|
|
2c515636cb | ||
|
|
2f7ac98e34 | ||
|
|
37b39ed1a1 | ||
|
|
73485d5a23 | ||
|
|
28c7827f14 | ||
|
|
e055dc1513 | ||
|
|
c173f14fc0 | ||
|
|
cd30e552a7 | ||
|
|
9bf1a76e91 | ||
|
|
2957b688fd | ||
|
|
add40d524f | ||
|
|
04a55e35b6 | ||
|
|
955ce45448 | ||
|
|
995e64a205 | ||
|
|
bf085f0ef3 | ||
|
|
1374b37882 | ||
|
|
e275f4eb9d | ||
|
|
652d809129 | ||
|
|
c186519bcf | ||
|
|
870fb4f291 | ||
|
|
7cd63489f4 | ||
|
|
616a53888e | ||
|
|
a336cc26f9 | ||
|
|
382088c456 | ||
|
|
ff80531db4 | ||
|
|
105cf3cd1e | ||
|
|
38ba7e695a | ||
|
|
996326a00e | ||
|
|
f2beb82b97 | ||
|
|
41c0702408 | ||
|
|
66b5f75142 | ||
|
|
c2a16ddbab | ||
|
|
5bb194cf89 | ||
|
|
645b9a01c7 | ||
|
|
3a1a5d12de | ||
|
|
12748e7539 | ||
|
|
2f69d4c8ee | ||
|
|
8dbf8b9038 | ||
|
|
fdfe047f3e | ||
|
|
38c3f84c9f | ||
|
|
9c5b071556 | ||
|
|
46dc52e449 | ||
|
|
f469e3853d | ||
|
|
a681a4fcd4 | ||
|
|
575b0bb7b0 | ||
|
|
588cf4bfca | ||
|
|
9cc8c341e7 | ||
|
|
9b657ba224 | ||
|
|
9bc6e83f8a | ||
|
|
572aae320d | ||
|
|
2906899811 | ||
|
|
1a6bf88900 | ||
|
|
e60b28980a | ||
|
|
a253b2ef4b | ||
|
|
0c2e35edc9 | ||
|
|
d0970397a6 | ||
|
|
0afbda0351 | ||
|
|
2009f8b1ca | ||
|
|
35715a0146 | ||
|
|
20e27ceb04 | ||
|
|
7fb614f7af | ||
|
|
83442825e5 | ||
|
|
123c482a69 | ||
|
|
3f091fce59 | ||
|
|
6c5f88aa25 | ||
|
|
23eccebf5b | ||
|
|
15112c1a27 | ||
|
|
d0ca81ff36 | ||
|
|
3e218c494d | ||
|
|
88bd5b12a4 | ||
|
|
5df5983f88 | ||
|
|
aa5ca7cea5 | ||
|
|
02483b2e0b | ||
|
|
f7817866ba | ||
|
|
d62287d54b | ||
|
|
aad074cd8e | ||
|
|
580d179dd0 | ||
|
|
616a514c4d | ||
|
|
bac8d41954 | ||
|
|
f295bb20a1 | ||
|
|
b5ffa2351a | ||
|
|
1b37b52071 | ||
|
|
b1ffd10079 | ||
|
|
39235f5b91 | ||
|
|
8825d94636 | ||
|
|
c8a7b2af56 | ||
|
|
d22b25c030 | ||
|
|
d475994e02 | ||
|
|
f0bb3dfdfb | ||
|
|
e7f0b8eca6 | ||
|
|
0bab6a9fec | ||
|
|
9486fc416c | ||
|
|
fb63aa737a | ||
|
|
58a6ca1d3d | ||
|
|
505f029edb | ||
|
|
815659b898 | ||
|
|
07d16f280c | ||
|
|
f88ddc947c | ||
|
|
65ffdff40c | ||
|
|
c95dccfec6 | ||
|
|
fe83f471f5 | ||
|
|
d2953f602e | ||
|
|
9d07ddeae1 | ||
|
|
ef7810bc95 | ||
|
|
486539b3d3 | ||
|
|
990fb20a2a | ||
|
|
9b61a83721 | ||
|
|
f753519976 | ||
|
|
663e38dcdd | ||
|
|
7570b6489d | ||
|
|
c341d1a71e | ||
|
|
fa10e90c9d | ||
|
|
68501763dd | ||
|
|
cac1d555be | ||
|
|
25ff77c2fd | ||
|
|
2870c7f457 | ||
|
|
ab8d7a86ae | ||
|
|
809359e81e | ||
|
|
6e4cd5bc9c | ||
|
|
de018bd582 | ||
|
|
544642a6ea | ||
|
|
06737bb36f | ||
|
|
7efbfa2d20 | ||
|
|
4d5df92cbc | ||
|
|
1fcb2872b9 | ||
|
|
00c87ca2dd | ||
|
|
d474d68566 | ||
|
|
93e03804d0 | ||
|
|
4591658160 | ||
|
|
a2109b4bda | ||
|
|
deafea9c88 | ||
|
|
93f1a05f5c | ||
|
|
95a573b755 | ||
|
|
2a4623814c | ||
|
|
1017adf743 | ||
|
|
34fb12344c | ||
|
|
ce3358bdf8 | ||
|
|
1159dadfdb | ||
|
|
62516ef07f | ||
|
|
eecd305efd | ||
|
|
a83fa6b2b2 | ||
|
|
b2feafa94c | ||
|
|
2d234e500d | ||
|
|
fee0e7b20e | ||
|
|
a0f6429652 | ||
|
|
8f8b2ae4a3 | ||
|
|
9abdd16721 | ||
|
|
1e5963aeeb | ||
|
|
e25a83bb39 | ||
|
|
e3a67b13ff | ||
|
|
750cbb8399 | ||
|
|
045beb5f36 | ||
|
|
cd8234acba | ||
|
|
de85a7c2bd | ||
|
|
087301933a | ||
|
|
52333b8bd4 | ||
|
|
3768b3c3ca | ||
|
|
09b39e107d | ||
|
|
4b1155bf32 | ||
|
|
3c7fc31c95 | ||
|
|
da3881a486 | ||
|
|
ff12d9adaa | ||
|
|
528cf56f80 | ||
|
|
0ebe3f1f35 | ||
|
|
328680b6cd | ||
|
|
f9dca105a6 | ||
|
|
3664db61e7 | ||
|
|
49677aa799 | ||
|
|
27b771e2ba | ||
|
|
6527cdfa97 | ||
|
|
b2dbe8ef83 | ||
|
|
9bdb0774ad | ||
|
|
8c2ec2cfbe | ||
|
|
00f959ab7e | ||
|
|
f9c4070ad3 | ||
|
|
074325a7ea | ||
|
|
2f521a6a91 | ||
|
|
07959b3cc9 | ||
|
|
21faf8eaeb | ||
|
|
3e2b5dcc3d | ||
|
|
88a8433d31 | ||
|
|
81d418007a | ||
|
|
f88fcf55a3 | ||
|
|
561c8dea08 | ||
|
|
de92ac9e0b | ||
|
|
deead04a6a | ||
|
|
d4771a9b36 | ||
|
|
27b8415d0c | ||
|
|
e1e81e5d97 | ||
|
|
3705680d68 | ||
|
|
a01f546ae3 | ||
|
|
eabc905bac | ||
|
|
37588b6808 | ||
|
|
071db75f04 | ||
|
|
1e00940a90 | ||
|
|
b984566480 | ||
|
|
51aef120a1 | ||
|
|
636d722e8d | ||
|
|
e6da61120a | ||
|
|
b901e0dcf3 | ||
|
|
177b3c93c4 | ||
|
|
9996e4a57e | ||
|
|
4751b6a65c | ||
|
|
b3c79f5c2f | ||
|
|
0e53105ab5 | ||
|
|
0f2a657196 | ||
|
|
89aa2c7a6a | ||
|
|
4c843b6c66 | ||
|
|
130c7c5c58 | ||
|
|
76c364ec2d | ||
|
|
a549c94a15 | ||
|
|
6de8a6907f | ||
|
|
fc31562052 | ||
|
|
cdaa65c07a | ||
|
|
8a278cf9d6 | ||
|
|
97cecc18ce | ||
|
|
536db23e14 | ||
|
|
39d801fb9f | ||
|
|
6d707b21b2 | ||
|
|
2316fe5bbe | ||
|
|
16ec9d2bdb | ||
|
|
2ce4ce4309 | ||
|
|
858c3a5362 | ||
|
|
c124ad0dcd | ||
|
|
ed64c8bb29 | ||
|
|
2678360715 | ||
|
|
54e504dd5a | ||
|
|
b632a6b2cf | ||
|
|
b9e2ac38fa | ||
|
|
4d1c2a5798 | ||
|
|
c69d8a13b3 | ||
|
|
7c358cda17 | ||
|
|
1954a0eb2e | ||
|
|
5500701661 | ||
|
|
21918922f4 | ||
|
|
fad52c5917 | ||
|
|
306811d2a7 | ||
|
|
8b72f2ad79 | ||
|
|
1a1cb696f7 | ||
|
|
582c17b06b | ||
|
|
b156a49cff | ||
|
|
3943cfea06 | ||
|
|
97346c6618 | ||
|
|
474b824902 | ||
|
|
02b5572ccc | ||
|
|
4577ad60c7 | ||
|
|
e683c380e5 | ||
|
|
b660d82516 | ||
|
|
c0dda06499 | ||
|
|
65abd6307d | ||
|
|
6e713dc3b8 | ||
|
|
596a35acca | ||
|
|
4ad84a339f | ||
|
|
833435f8c2 | ||
|
|
4e4942e357 | ||
|
|
1fc8f0a33b | ||
|
|
1f433dea97 | ||
|
|
d8707cad2c | ||
|
|
a399b571ac | ||
|
|
d0e71225c4 | ||
|
|
19d4bf0ea5 | ||
|
|
9e519af887 | ||
|
|
29aa462bfd | ||
|
|
7a91872ee5 | ||
|
|
68307d1012 | ||
|
|
48cb707bb6 | ||
|
|
9322233b37 | ||
|
|
1daf1b9932 | ||
|
|
a3024352ba | ||
|
|
58f07a573f | ||
|
|
a05f33f6a7 | ||
|
|
968624971f | ||
|
|
57e77a5bd2 | ||
|
|
74c65cfdc5 | ||
|
|
399760fda9 | ||
|
|
67b8f95b1e | ||
|
|
d4d6acdf68 | ||
|
|
472baa8bac | ||
|
|
dd74c19858 | ||
|
|
b5f8d447a0 | ||
|
|
5f4a1917a6 | ||
|
|
cf71680aee | ||
|
|
f04b9131cc | ||
|
|
46861fac48 | ||
|
|
4620b667e7 | ||
|
|
49f43ccc0a | ||
|
|
63aa7284c4 | ||
|
|
286ade2d17 | ||
|
|
066d92ecfa | ||
|
|
c5ccabec38 | ||
|
|
548fedb859 | ||
|
|
8d5378a2ca | ||
|
|
bf1843be9e | ||
|
|
d50439cc4d | ||
|
|
6a8f313394 | ||
|
|
c211094d3e | ||
|
|
072b4f3b73 | ||
|
|
08cbcba4ee | ||
|
|
2a9171c623 | ||
|
|
8573679fbb | ||
|
|
811f244fc2 | ||
|
|
a31b2556a3 | ||
|
|
a0ad5cdbfe | ||
|
|
59cf668348 | ||
|
|
09acc26c50 | ||
|
|
0ae7bcff52 | ||
|
|
2210dbac94 | ||
|
|
6b2f654a30 | ||
|
|
3296ac5628 | ||
|
|
6d06cb29df | ||
|
|
b08c7d15cd | ||
|
|
940d620a96 | ||
|
|
a39fa8ae5f | ||
|
|
f859bf160a | ||
|
|
e0512930ae | ||
|
|
7bbf6c553f | ||
|
|
aeb335ebdc | ||
|
|
73ab408b3c | ||
|
|
f333a33f3d | ||
|
|
42b841735e | ||
|
|
e710bd2183 | ||
|
|
84556ba76a | ||
|
|
4eebea91d3 | ||
|
|
4ddadb8792 | ||
|
|
8e65d6288d | ||
|
|
8e18deb74f | ||
|
|
7ae1ad524b | ||
|
|
1ba1b3983a | ||
|
|
aabd6980ac | ||
|
|
3b19310252 | ||
|
|
8201805b28 | ||
|
|
7277c8478b | ||
|
|
963a0dd934 | ||
|
|
3108d58791 | ||
|
|
31b1a6a7e6 | ||
|
|
9ff65d0da4 | ||
|
|
c11abb42d1 | ||
|
|
7b6d81d812 | ||
|
|
ca0daad11f | ||
|
|
a0c4e685c5 | ||
|
|
b30f7a622c | ||
|
|
23f44f12bd | ||
|
|
6c17002e8a | ||
|
|
5dda088335 | ||
|
|
2427cce2c8 | ||
|
|
1c41dae51c | ||
|
|
1a6d72b14c | ||
|
|
3dc646e03e | ||
|
|
96328a8632 | ||
|
|
2cc4488d8e | ||
|
|
a6c2fe4761 | ||
|
|
ed905d3c3d | ||
|
|
81eadbd05c | ||
|
|
ef1e2f8595 | ||
|
|
fae7082049 | ||
|
|
a63de23156 | ||
|
|
8e0dda8480 | ||
|
|
ad7b9ff8b5 | ||
|
|
04f2d0787a | ||
|
|
2ad98a025e | ||
|
|
67516766a6 | ||
|
|
3b2ead3476 | ||
|
|
fc5be2b911 | ||
|
|
466e623dd6 | ||
|
|
a1b487c512 | ||
|
|
0902af8eb5 | ||
|
|
a8a4caf0e4 | ||
|
|
33478517a6 | ||
|
|
0d5a8ca300 | ||
|
|
da22f06d85 | ||
|
|
a918924923 | ||
|
|
5a9416fbcf | ||
|
|
582b5bb3ac | ||
|
|
abe4f1ba03 | ||
|
|
9dfbffa4b8 | ||
|
|
a25ba91876 | ||
|
|
334f109415 | ||
|
|
eb9eb3aa53 | ||
|
|
978c196c78 | ||
|
|
20e7cac743 | ||
|
|
b5d51214ff | ||
|
|
485d4b4897 | ||
|
|
fb6ecebbd1 | ||
|
|
0b69378a03 | ||
|
|
256c12f150 | ||
|
|
8d0349eee0 | ||
|
|
ab0548c9af | ||
|
|
4868bc4df7 | ||
|
|
0900dfe46f | ||
|
|
8dfe53ff7a | ||
|
|
1ae3328642 | ||
|
|
b9e0208aee | ||
|
|
497cc74adc | ||
|
|
eac3814fb5 | ||
|
|
bb331abeba | ||
|
|
6e20bd2dcd | ||
|
|
09961845b4 | ||
|
|
7eacd3bf57 | ||
|
|
72681fa7fb | ||
|
|
500bddebff | ||
|
|
4d3d46f41d | ||
|
|
82d8d9a092 | ||
|
|
30ff139a29 | ||
|
|
dc8420d32d | ||
|
|
bb29c8ba85 | ||
|
|
625780621b | ||
|
|
ea2589dd9c | ||
|
|
942336c454 | ||
|
|
90282707ab | ||
|
|
70f6c41ff7 | ||
|
|
184cf74daa | ||
|
|
a23fb06409 | ||
|
|
3638485977 | ||
|
|
75f3c52d53 | ||
|
|
364973a523 | ||
|
|
678c241962 | ||
|
|
a2aa938e10 | ||
|
|
48eb92e366 | ||
|
|
2894059b63 | ||
|
|
66a272debd | ||
|
|
7d089561c3 | ||
|
|
53f8e73b65 | ||
|
|
37bcf7899e | ||
|
|
86f662aa4a | ||
|
|
a1b958eaac | ||
|
|
06189b2584 | ||
|
|
0bf006cdae | ||
|
|
3f51eb7b63 | ||
|
|
b76443dbde | ||
|
|
5fc823ae08 | ||
|
|
68aec74b47 | ||
|
|
acd23682d1 | ||
|
|
b042397b9f | ||
|
|
951a8208b8 | ||
|
|
9b3c74a095 | ||
|
|
647c0e302a | ||
|
|
b3b22d7595 | ||
|
|
1ba0139683 |
53
.travis.yml
Normal file
53
.travis.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
language: cpp
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq python-software-properties
|
||||
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
- sudo add-apt-repository -y ppa:boost-latest/ppa
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq g++-4.8
|
||||
- sudo apt-get install -qq libboost1.55-all-dev
|
||||
# We want debug symbols for boost as we install gdb later
|
||||
- sudo apt-get install -qq libboost1.55-dbg
|
||||
- sudo apt-get install -qq mlocate
|
||||
- sudo updatedb
|
||||
- sudo locate libboost | grep /lib | grep -e ".a$"
|
||||
- sudo apt-get install -qq protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags
|
||||
# We need gcc >= 4.8 for some c++11 features
|
||||
- sudo apt-get install -qq gcc-4.8
|
||||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
|
||||
- sudo update-alternatives --set gcc /usr/bin/gcc-4.8
|
||||
# Stuff is gold. Nuff said ;)
|
||||
- sudo apt-get -y install binutils-gold
|
||||
# We can get a backtrace if the guy crashes
|
||||
- sudo apt-get -y install gdb
|
||||
# What versions are we ACTUALLY running?
|
||||
- g++ -v
|
||||
- clang -v
|
||||
|
||||
script:
|
||||
# Set so any failing command will abort the build
|
||||
- set -e
|
||||
# If only we could do -j12 ;)
|
||||
- scons
|
||||
# See what we've actually built
|
||||
- ldd ./build/rippled
|
||||
# Run unittests (under gdb)
|
||||
- | # create gdb script
|
||||
echo "set env MALLOC_CHECK_=3" > script.gdb
|
||||
echo "run" >> script.gdb
|
||||
echo "backtrace full" >> script.gdb
|
||||
# gdb --help
|
||||
- cat script.gdb | gdb --return-child-result --args ./build/rippled --unittest
|
||||
# Run integration tests
|
||||
- npm install
|
||||
- npm test
|
||||
notifications:
|
||||
email:
|
||||
false
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#ripple-dev"
|
||||
@@ -65,11 +65,13 @@ UI_HEADERS_DIR += ../../src/ripple_basics
|
||||
SOURCES += \
|
||||
../../src/ripple/beast/ripple_beast.cpp \
|
||||
../../src/ripple/beast/ripple_beastc.c \
|
||||
../../src/ripple/common/ripple_common.cpp \
|
||||
../../src/ripple/http/ripple_http.cpp \
|
||||
../../src/ripple/json/ripple_json.cpp \
|
||||
../../src/ripple/peerfinder/ripple_peerfinder.cpp \
|
||||
../../src/ripple/rpc/ripple_rpc.cpp \
|
||||
../../src/ripple/sophia/ripple_sophia.c \
|
||||
../../src/ripple/radmap/ripple_radmap.cpp \
|
||||
../../src/ripple/resource/ripple_resource.cpp \
|
||||
../../src/ripple/sitefiles/ripple_sitefiles.cpp \
|
||||
../../src/ripple/sslutil/ripple_sslutil.cpp \
|
||||
../../src/ripple/testoverlay/ripple_testoverlay.cpp \
|
||||
../../src/ripple/types/ripple_types.cpp \
|
||||
@@ -93,8 +95,9 @@ SOURCES += \
|
||||
../../src/ripple_data/ripple_data.cpp \
|
||||
../../src/ripple_hyperleveldb/ripple_hyperleveldb.cpp \
|
||||
../../src/ripple_leveldb/ripple_leveldb.cpp \
|
||||
../../src/ripple_mdb/ripple_mdb.c \
|
||||
../../src/ripple_net/ripple_net.cpp \
|
||||
../../src/ripple_overlay/ripple_overlay.cpp \
|
||||
../../src/ripple_rpc/ripple_rpc.cpp \
|
||||
../../src/ripple_websocket/ripple_websocket.cpp
|
||||
|
||||
LIBS += \
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<RepoDir>..\..</RepoDir>
|
||||
<SrcDir>$(RepoDir)\src\cpp\ripple</SrcDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutDir>$(RepoDir)\build\VisualStudio2010\$(Configuration).$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<IntDir>$(RepoDir)\build\obj\VisualStudio2010\$(Configuration).$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(RepoDir);$(RepoDir)\src\cpp\leveldb;$(RepoDir)\src\cpp\leveldb\include;$(RepoDir)\src\cpp\protobuf\src;$(RepoDir)\src\cpp\protobuf\vsprojects;$(RepoDir)\build\proto;$(RepoDir)\Subtrees\beast;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>USE_LEVELDB;BOOST_TEST_ALTERNATIVE_INIT_API;BOOST_TEST_NO_MAIN;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="RepoDir">
|
||||
<Value>$(RepoDir)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="SrcDir">
|
||||
<Value>$(SrcDir)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{EE95954F-3D34-4FB1-ADBD-FE8395233026}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp" />
|
||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt2.cpp" />
|
||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt3.cpp" />
|
||||
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt4.cpp" />
|
||||
<ClCompile Include="..\..\modules\ripple_basics\ripple_basics.cpp" />
|
||||
<ClCompile Include="..\..\modules\ripple_data\ripple_data.cpp" />
|
||||
<ClCompile Include="..\..\Subtrees\beast\modules\beast_basics\beast_basics.cpp">
|
||||
<Filter>Subtrees</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\Subtrees\beast\modules\beast_core\beast_core.cpp">
|
||||
<Filter>Subtrees</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\cpp\leveldb_core.cpp">
|
||||
<Filter>Subtrees</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\cpp\protobuf_core.cpp">
|
||||
<Filter>Subtrees</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\cpp\websocket_core.cpp">
|
||||
<Filter>Subtrees</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\cpp\database\sqlite3.c">
|
||||
<Filter>Subtrees</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Ripple">
|
||||
<UniqueIdentifier>{63db902e-0e7a-42d1-b5f5-663e4b48786c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Subtrees">
|
||||
<UniqueIdentifier>{469e8a0a-64bf-4fa1-8b6f-81207db68577}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -5,8 +5,8 @@
|
||||
<RepoDir>..\..</RepoDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutDir>$(RepoDir)\build\VisualStudio2012\$(Configuration).$(Platform)\</OutDir>
|
||||
<IntDir>$(RepoDir)\build\obj\VisualStudio2012\$(Configuration).$(Platform)\</IntDir>
|
||||
<OutDir>$(RepoDir)\build\VisualStudio2013\$(Configuration).$(Platform)\</OutDir>
|
||||
<IntDir>$(RepoDir)\build\obj\VisualStudio2013\$(Configuration).$(Platform)\</IntDir>
|
||||
<TargetName>rippled</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,11 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{B7F39ECD-473C-484D-BC34-31F8362506A5}"
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30110.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beast", "..\..\src\beast\Builds\VisualStudio2013\beast.vcxproj", "{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beast", "..\..\src\beast\Builds\VisualStudio2012\beast.vcxproj", "{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{B7F39ECD-473C-484D-BC34-31F8362506A5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -13,14 +15,6 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|x64.Build.0 = Debug|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|Win32.Build.0 = Release|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|x64.ActiveCfg = Release|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|x64.Build.0 = Release|x64
|
||||
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@@ -29,6 +23,14 @@ Global
|
||||
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|Win32.Build.0 = Release|Win32
|
||||
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|x64.ActiveCfg = Release|x64
|
||||
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|x64.Build.0 = Release|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|x64.Build.0 = Debug|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|Win32.Build.0 = Release|Win32
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|x64.ActiveCfg = Release|x64
|
||||
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1,5 +1,6 @@
|
||||
#Ripple - P2P Payment Network
|
||||
|
||||
##[](https://travis-ci.org/ripple/rippled)
|
||||
##[](https://ci.ripple.com/jenkins/job/rippled/)
|
||||
|
||||
This is the repository for Ripple's `rippled`, reference P2P network server.
|
||||
|
||||
86
SConstruct
86
SConstruct
@@ -8,6 +8,7 @@ import glob
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import sys
|
||||
|
||||
OSX = bool(platform.mac_ver()[0])
|
||||
FreeBSD = bool('FreeBSD' == platform.system())
|
||||
@@ -16,10 +17,12 @@ Ubuntu = bool(Linux and 'Ubuntu' == platform.linux_distribution()[0])
|
||||
Debian = bool(Linux and 'debian' == platform.linux_distribution()[0])
|
||||
Archlinux = bool(Linux and ('','','') == platform.linux_distribution()) #Arch still has issues with the platform module
|
||||
|
||||
USING_CLANG = OSX or os.environ.get('CC', None) == 'clang'
|
||||
|
||||
#
|
||||
# We expect this to be set
|
||||
#
|
||||
BOOST_HOME = os.environ.get("RIPPLED_BOOST_HOME", None)
|
||||
#
|
||||
BOOST_HOME = os.environ.get("RIPPLED_BOOST_HOME", None)
|
||||
|
||||
|
||||
if OSX or Ubuntu or Debian or Archlinux:
|
||||
@@ -33,8 +36,12 @@ else:
|
||||
# scons tools
|
||||
#
|
||||
|
||||
HONOR_ENVS = ['CC', 'CXX', 'PATH']
|
||||
|
||||
env = Environment(
|
||||
tools = ['default', 'protoc']
|
||||
tools = ['default', 'protoc'],
|
||||
#ENV = dict((k, os.environ[k]) for k in HONOR_ENVS)
|
||||
ENV = dict((k, os.environ[k]) for k in HONOR_ENVS if k in os.environ)
|
||||
)
|
||||
|
||||
# Use a newer gcc on FreeBSD
|
||||
@@ -44,12 +51,18 @@ if FreeBSD:
|
||||
env.Append(CCFLAGS = ['-Wl,-rpath=/usr/local/lib/gcc46'])
|
||||
env.Append(LINKFLAGS = ['-Wl,-rpath=/usr/local/lib/gcc46'])
|
||||
|
||||
if OSX:
|
||||
if USING_CLANG:
|
||||
env.Replace(CC= 'clang')
|
||||
env.Replace(CXX= 'clang++')
|
||||
env.Append(CXXFLAGS = ['-std=c++11', '-stdlib=libc++'])
|
||||
env.Append(LINKFLAGS='-stdlib=libc++')
|
||||
env['FRAMEWORKS'] = ['AppKit']
|
||||
|
||||
if Linux:
|
||||
env.Append(CXXFLAGS = ['-std=c++11', '-stdlib=libstdc++'])
|
||||
env.Append(LINKFLAGS='-stdlib=libstdc++')
|
||||
|
||||
if OSX:
|
||||
env.Append(CXXFLAGS = ['-std=c++11', '-stdlib=libc++'])
|
||||
env.Append(LINKFLAGS='-stdlib=libc++')
|
||||
env['FRAMEWORKS'] = ['AppKit','Foundation']
|
||||
|
||||
GCC_VERSION = re.split('\.', commands.getoutput(env['CXX'] + ' -dumpversion'))
|
||||
|
||||
@@ -93,17 +106,28 @@ BOOST_LIBS = [
|
||||
'boost_regex',
|
||||
'boost_system',
|
||||
'boost_thread',
|
||||
'boost_random',
|
||||
]
|
||||
|
||||
# We whitelist platforms where the non -mt version is linked with pthreads. This
|
||||
# can be verified with: ldd libboost_filesystem.* If a threading library is
|
||||
# included the platform can be whitelisted.
|
||||
if FreeBSD or Ubuntu or Archlinux or OSX:
|
||||
# if FreeBSD or Ubuntu or Archlinux:
|
||||
|
||||
if not (USING_CLANG and Linux) and (FreeBSD or Ubuntu or Archlinux or OSX):
|
||||
# non-mt libs do link with pthreads.
|
||||
env.Append(
|
||||
LIBS = BOOST_LIBS
|
||||
)
|
||||
elif Linux and USING_CLANG and Ubuntu:
|
||||
# It's likely going to be here if using boost 1.55
|
||||
boost_statics = [ ("/usr/lib/x86_64-linux-gnu/lib%s.a" % a) for a in
|
||||
BOOST_LIBS ]
|
||||
|
||||
if not all(os.path.exists(f) for f in boost_statics):
|
||||
# Else here
|
||||
boost_statics = [("/usr/lib/lib%s.a" % a) for a in BOOST_LIBS]
|
||||
|
||||
env.Append(LIBS = [File(f) for f in boost_statics])
|
||||
else:
|
||||
env.Append(
|
||||
LIBS = [l + '-mt' for l in BOOST_LIBS]
|
||||
@@ -159,12 +183,15 @@ COMPILED_FILES.extend([
|
||||
'src/ripple/http/ripple_http.cpp',
|
||||
'src/ripple/json/ripple_json.cpp',
|
||||
'src/ripple/peerfinder/ripple_peerfinder.cpp',
|
||||
'src/ripple/rpc/ripple_rpc.cpp',
|
||||
'src/ripple/sophia/ripple_sophia.c',
|
||||
'src/ripple/radmap/ripple_radmap.cpp',
|
||||
'src/ripple/resource/ripple_resource.cpp',
|
||||
'src/ripple/rocksdb/ripple_rocksdb.cpp',
|
||||
'src/ripple/sitefiles/ripple_sitefiles.cpp',
|
||||
'src/ripple/sslutil/ripple_sslutil.cpp',
|
||||
'src/ripple/testoverlay/ripple_testoverlay.cpp',
|
||||
'src/ripple/types/ripple_types.cpp',
|
||||
'src/ripple/validators/ripple_validators.cpp'
|
||||
'src/ripple/validators/ripple_validators.cpp',
|
||||
'src/ripple/common/ripple_common.cpp',
|
||||
])
|
||||
|
||||
# ------------------------------
|
||||
@@ -185,8 +212,9 @@ COMPILED_FILES.extend([
|
||||
'src/ripple_data/ripple_data.cpp',
|
||||
'src/ripple_hyperleveldb/ripple_hyperleveldb.cpp',
|
||||
'src/ripple_leveldb/ripple_leveldb.cpp',
|
||||
'src/ripple_mdb/ripple_mdb.c',
|
||||
'src/ripple_net/ripple_net.cpp',
|
||||
'src/ripple_overlay/ripple_overlay.cpp',
|
||||
'src/ripple_rpc/ripple_rpc.cpp',
|
||||
'src/ripple_websocket/ripple_websocket.cpp'
|
||||
])
|
||||
|
||||
@@ -225,7 +253,7 @@ env.Append(
|
||||
['rt'] if not OSX else [] +\
|
||||
[
|
||||
'z'
|
||||
]
|
||||
]
|
||||
)
|
||||
|
||||
# We prepend, in case there's another BOOST somewhere on the path
|
||||
@@ -236,23 +264,41 @@ if BOOST_HOME is not None:
|
||||
|
||||
if not OSX:
|
||||
env.Append(LINKFLAGS = [
|
||||
'-rdynamic', '-pthread',
|
||||
'-rdynamic',
|
||||
'-pthread',
|
||||
])
|
||||
|
||||
DEBUGFLAGS = ['-g', '-DDEBUG', '-D_DEBUG']
|
||||
|
||||
env.Append(CCFLAGS = ['-pthread', '-Wall', '-Wno-sign-compare', '-Wno-char-subscripts']+DEBUGFLAGS)
|
||||
env.Append(CXXFLAGS = ['-O1', '-pthread', '-Wno-invalid-offsetof', '-Wformat']+DEBUGFLAGS)
|
||||
if not USING_CLANG:
|
||||
more_warnings = ['-Wno-unused-local-typedefs']
|
||||
else:
|
||||
# This disables the "You said it was a struct AND a class, wth is going on
|
||||
# warnings"
|
||||
more_warnings = ['-Wno-mismatched-tags']
|
||||
# This needs to be a CCFLAGS not a CXXFLAGS
|
||||
env.Append(CCFLAGS = more_warnings)
|
||||
|
||||
env.Append(CXXFLAGS = ['-O1','-pthread', '-Wno-invalid-offsetof', '-Wformat']+more_warnings+DEBUGFLAGS)
|
||||
|
||||
# RTTI is required for Beast and CountedObject.
|
||||
#
|
||||
env.Append(CXXFLAGS = ['-frtti'])
|
||||
|
||||
if (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) == 6):
|
||||
env.Append(CXXFLAGS = ['-std=c++0x'])
|
||||
elif (int(GCC_VERSION[0]) > 4 or (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) >= 7)):
|
||||
env.Append(CXXFLAGS = ['-std=c++11'])
|
||||
UBUNTU_GCC_48_INSTALL_STEPS = '''
|
||||
https://ripple.com/wiki/Ubuntu_build_instructions#Ubuntu_versions_older_than_13.10_:_Install_gcc_4.8'''
|
||||
|
||||
if not USING_CLANG:
|
||||
if (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) < 7):
|
||||
print "\nrippled, using c++11, requires g++ version >= 4.8 to compile"
|
||||
|
||||
if Ubuntu:
|
||||
print UBUNTU_GCC_48_INSTALL_STEPS
|
||||
|
||||
sys.exit(1)
|
||||
else:
|
||||
env.Append(CXXFLAGS = ['-std=c++11'])
|
||||
|
||||
# FreeBSD doesn't support O_DSYNC
|
||||
if FreeBSD:
|
||||
|
||||
@@ -60,30 +60,37 @@
|
||||
#
|
||||
# [ips]
|
||||
#
|
||||
# List of ips where the Ripple protocol is served. For a starter list,
|
||||
# you can copy entries from: https://ripple.com/ripple.txt
|
||||
# List of hostnames or ips where the Ripple protocol is served. For a starter
|
||||
# list, you can either copy entries from: https://ripple.com/ripple.txt or if
|
||||
# you prefer you can specify r.ripple.com 51235
|
||||
#
|
||||
# Domain names are not allowed. One ipv4 or ipv6 address per line. A port
|
||||
# may optionally be specified after adding a space to the address. By
|
||||
# convention, if known, IPs are listed in from most to least trusted.
|
||||
# One IPv4 address or domain names per line is allowed. A port may optionally
|
||||
# be specified after adding a space to the address. By convention, if known,
|
||||
# IPs are listed in from most to least trusted.
|
||||
#
|
||||
# Examples:
|
||||
# 192.168.0.1
|
||||
# 192.168.0.1 3939
|
||||
# 2001:0db8:0100:f101:0210:a4ff:fee3:9566
|
||||
# r.ripple.com 51235
|
||||
#
|
||||
# Here's the recent set of good, well known addresses:
|
||||
# This will give you a good, up-to-date list of addresses:
|
||||
#
|
||||
# [ips]
|
||||
# 54.225.112.220 51235
|
||||
# 54.225.123.13 51235
|
||||
# 54.227.239.106 51235
|
||||
# 107.21.251.218 51235
|
||||
# 184.73.226.101 51235
|
||||
# 23.23.201.55 51235
|
||||
# r.ripple.com 51235
|
||||
#
|
||||
#
|
||||
#
|
||||
# [ips_fixed]
|
||||
#
|
||||
# List of IP addresses or hostnames to which rippled should always attempt to
|
||||
# maintain peer connections with. This is useful for manually forming private
|
||||
# networks, for example to configure a validation server that connects to the
|
||||
# Ripple network through a public-facing server, or for building a set
|
||||
# of cluster peers.
|
||||
#
|
||||
# One IPv4 address or domain names per line is allowed. A port may optionally
|
||||
# be specified after adding a space to the address.
|
||||
#
|
||||
# [peer_ip]
|
||||
#
|
||||
# IP address or domain to bind to allow external connections from peers.
|
||||
@@ -484,6 +491,20 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
# [fetch_depth]
|
||||
#
|
||||
# The number of past ledgers to serve to other peers that request historical
|
||||
# ledger data (or "full" for no limit).
|
||||
#
|
||||
# Servers that require low latency and high local performance may wish to
|
||||
# restrict the historical ledgers they are willing to serve. Setting this
|
||||
# below 32 can harm network stability as servers require easy access to
|
||||
# recent history to stay in sync. Values below 128 are not recommended.
|
||||
#
|
||||
# The default is: full
|
||||
#
|
||||
#
|
||||
#
|
||||
# [validation_seed]
|
||||
#
|
||||
# To perform validation, this section should contain either a validation seed
|
||||
@@ -645,8 +666,8 @@
|
||||
# Choices for 'type' (not case-sensitive)
|
||||
# HyperLevelDB Use an improved version of LevelDB (preferred)
|
||||
# LevelDB Use Google's LevelDB database (deprecated)
|
||||
# MDB Use MDB
|
||||
# none Use no backend
|
||||
# RocksDB Use Facebook's RocksDB database
|
||||
# SQLite Use SQLite
|
||||
#
|
||||
# Required keys:
|
||||
@@ -697,6 +718,41 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
# [insight]
|
||||
#
|
||||
# Configuration parameters for the Beast.Insight stats collection module.
|
||||
#
|
||||
# Insight is a module that collects information from the areas of rippled
|
||||
# that have instrumentation. The configuration paramters control where the
|
||||
# collection metrics are sent. The parameters are expressed as key = value
|
||||
# pairs with no white space. The main parameter is the choice of server:
|
||||
#
|
||||
# "server"
|
||||
#
|
||||
# Choice of server to send metrics to. Currently the only choice is
|
||||
# "statsd" which sends UDP packets to a StatsD daemon, which must be
|
||||
# running while rippled is running. More information on StatsD is
|
||||
# available here:
|
||||
# https://github.com/b/statsd_spec
|
||||
#
|
||||
# When server=statsd, these additional keys are used:
|
||||
#
|
||||
# "address" The UDP address and port of the listening StatsD server,
|
||||
# in the format, n.n.n.n:port.
|
||||
#
|
||||
# "prefix" A string prepended to each collected metric. This is used
|
||||
# to distinguish between different running instances of rippled.
|
||||
#
|
||||
# If this section is missing, or the server type is unspecified or unknown,
|
||||
# statistics are not collected or reported.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# [insight]
|
||||
# server=statsd
|
||||
# address=192.168.0.95:4201
|
||||
# prefix=my_validator
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Allow other peers to connect to this server.
|
||||
@@ -738,13 +794,14 @@
|
||||
medium
|
||||
|
||||
# Note that HyperLevelDB is unavailable on Windows platforms
|
||||
#
|
||||
[node_db]
|
||||
type=HyperLevelDB
|
||||
path=db/hyperldb
|
||||
path=/etc/ripple/db/hyperldb
|
||||
|
||||
# This needs to be an absolute directory reference, not a relative one.
|
||||
# Modify this value as required.
|
||||
[debug_logfile]
|
||||
log/debug.log
|
||||
/var/log/rippled/debug.log
|
||||
|
||||
[sntp_servers]
|
||||
time.windows.com
|
||||
@@ -753,12 +810,20 @@ time.nist.gov
|
||||
pool.ntp.org
|
||||
|
||||
# Where to find some other servers speaking the Ripple protocol.
|
||||
# This set of addresses is recent as of September 5, 2013
|
||||
#
|
||||
[ips]
|
||||
54.225.112.220 51235
|
||||
54.225.123.13 51235
|
||||
54.227.239.106 51235
|
||||
107.21.251.218 51235
|
||||
184.73.226.101 51235
|
||||
23.23.201.55 51235
|
||||
r.ripple.com 51235
|
||||
|
||||
# These validators are taken from the v0.16 release notes on the wiki:
|
||||
# https://ripple.com/wiki/Latest_rippled_release_notes
|
||||
[validators]
|
||||
n9KPnVLn7ewVzHvn218DcEYsnWLzKerTDwhpofhk4Ym1RUq4TeGw RIP1
|
||||
n9LFzWuhKNvXStHAuemfRKFVECLApowncMAM5chSCL9R5ECHGN4V RIP2
|
||||
n94rSdgTyBNGvYg8pZXGuNt59Y5bGAZGxbxyvjDaqD9ceRAgD85P RIP3
|
||||
n9LeQeDcLDMZKjx1TZtrXoLBLo5q1bR1sUQrWG7tEADFU6R27UBp RIP4
|
||||
n9KF6RpvktjNs2MDBkmxpJbup4BKrKeMKDXPhaXkq7cKTwLmWkFr RIP5
|
||||
|
||||
# Ditto.
|
||||
[validation_quorum]
|
||||
3
|
||||
|
||||
|
||||
114
doc/rippled.init
Normal file
114
doc/rippled.init
Normal file
@@ -0,0 +1,114 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ripple
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: starts the ripple network node
|
||||
# Description: starts rippled using start-stop-daemon
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
NAME=rippled
|
||||
USER="rippled"
|
||||
GROUP="rippled"
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
DAEMON=/usr/local/sbin/rippled
|
||||
DAEMON_OPTS="--conf /etc/ripple/rippled.cfg"
|
||||
NET_OPTS="--net $DAEMON_OPTS"
|
||||
LOGDIR="/var/log/rippled"
|
||||
DBDIR="/var/db/rippled/db/hyperldb"
|
||||
|
||||
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
|
||||
|
||||
# I wish it didn't come down to this, but this is the easiest way to ensure
|
||||
# sanity of an install.
|
||||
if [ ! -d $LOGDIR ]; then
|
||||
mkdir -p $LOGDIR
|
||||
chown $USER:$GROUP $LOGDIR
|
||||
fi
|
||||
if [ ! -d $DBDIR ]; then
|
||||
mkdir -p $DBDIR
|
||||
chown -R $USER:$GROUP $DBDIR
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting daemon: "$NAME
|
||||
start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE \
|
||||
--exec $DAEMON --chuid $USER --group $GROUP --verbose -- $NET_OPTS
|
||||
echo "."
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping daemon: "$NAME
|
||||
$DAEMON $DAEMON_OPTS stop
|
||||
rm -f $PIDFILE
|
||||
echo "."
|
||||
;;
|
||||
|
||||
restart)
|
||||
echo -n "Restarting daemon: "$NAME
|
||||
$DAEMON $DAEMON_OPTS stop
|
||||
rm -f $PIDFILE
|
||||
start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE \
|
||||
--exec $DAEMON --chuid $USER --group $GROUP -- $NET_OPTS
|
||||
echo "."
|
||||
;;
|
||||
|
||||
status)
|
||||
echo "Status of $NAME:"
|
||||
echo -n "PID of $NAME: "
|
||||
if [ -f "$PIDFILE" ]; then
|
||||
cat $PIDFILE
|
||||
$DAEMON $DAEMON_OPTS server_info
|
||||
else
|
||||
echo "$NAME not running."
|
||||
fi
|
||||
echo "."
|
||||
;;
|
||||
|
||||
fetch)
|
||||
echo "$NAME ledger fetching info:"
|
||||
$DAEMON $DAEMON_OPTS fetch_info
|
||||
echo "."
|
||||
;;
|
||||
|
||||
uptime)
|
||||
echo "$NAME uptime:"
|
||||
$DAEMON $DAEMON_OPTS get_counts
|
||||
echo "."
|
||||
;;
|
||||
|
||||
startconfig)
|
||||
echo "$NAME is being started with the following command line:"
|
||||
echo "$DAEMON $NET_OPTS"
|
||||
echo "."
|
||||
;;
|
||||
|
||||
command)
|
||||
# Truncate the script's argument vector by one position to get rid of
|
||||
# this entry.
|
||||
shift
|
||||
|
||||
# Pass the remainder of the argument vector to rippled.
|
||||
$DAEMON $DAEMON_OPTS "$@"
|
||||
echo "."
|
||||
;;
|
||||
|
||||
test)
|
||||
$DAEMON $DAEMON_OPTS ping
|
||||
echo "."
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status|fetch|uptime|startconfig|"
|
||||
echo " command|test}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -4,20 +4,12 @@ RIPPLE TODO
|
||||
|
||||
Vinnie's List: Changes day to day, descending priority
|
||||
- PeerFinder work
|
||||
- Fix and tidy up broken beast classes
|
||||
- Validators work
|
||||
* Parse Validator line using cribbed code
|
||||
- Parse ContentBodyBuffer from HTTPResponse
|
||||
- HTTPMessage improvements
|
||||
- HTTPClient improvements based on HTTPServer
|
||||
- HTTPMessage improvements
|
||||
- Ditch old HTTPClient so I can take the name
|
||||
- Finish RPCAsyncServer, RPCService and RPCService::Manager
|
||||
- Fix RPCDoor to respect config setting for [rpc_secure]
|
||||
- Validators should delay the application of newly downloaded lists from
|
||||
sources, to mitigate the effects of attacks. Unless there's no validators
|
||||
in the list.
|
||||
- Validators RPC options to immediately apply UNL,
|
||||
manually revisit sources, etc...
|
||||
- Clean up calculation of COnfig file location.
|
||||
- Remove TESTNET and all related code and settings.
|
||||
- Remove addRpcSub, findRpcSub, and notify the appropriate partner(s)
|
||||
@@ -28,9 +20,21 @@ David Features:
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- std::priority_queue for DeadlineTimer
|
||||
|
||||
- Change ProxyInfo to use IP::Endpoint, get rid of IPv4Address from the parsing
|
||||
code
|
||||
|
||||
- Validators should delay the application of newly downloaded lists from
|
||||
sources, to mitigate the effects of attacks. Unless there's no validators
|
||||
in the list.
|
||||
|
||||
- Validators RPC options to immediately apply UNL,
|
||||
manually revisit sources, etc...
|
||||
|
||||
- Look into using CMake
|
||||
|
||||
- IPv6 support in IPEndpoint
|
||||
- IPv6 support in IP::Endpoint
|
||||
|
||||
- Configuration list for Jenkins
|
||||
|
||||
@@ -87,8 +91,6 @@ David Features:
|
||||
- Add "skipped" field to beginTestCase() to disable a test but still record
|
||||
that it was skipped in the output. Like for mdb import.
|
||||
|
||||
- use beast DeadlineTimer for sweep in Application
|
||||
|
||||
- Get rid of 'ref' typedefs that really mean const&
|
||||
|
||||
- Use secp256k1 from beast
|
||||
@@ -122,10 +124,6 @@ David Features:
|
||||
|
||||
- Rename RPCHandler to CallHandler
|
||||
|
||||
- Profile/VTune the application to identify hot spots
|
||||
* Determine why rippled has a slow startup on Windows
|
||||
* Improve the performance when running all unit tests on Windows
|
||||
|
||||
- Rename "fullBelow" to something like haveAllDescendants or haveAllChildren.
|
||||
|
||||
- Rewrite Sustain to use Beast and work on Windows as well
|
||||
@@ -133,18 +131,10 @@ David Features:
|
||||
|
||||
- Make sure the leak detector output appears on Linux and FreeBSD debug builds.
|
||||
|
||||
- Create SharedData <LoadState>, move all load related state variables currently
|
||||
protected by separated mutexes in different classes into the LoadState, and
|
||||
use read/write locking semantics to update the values. Later, use Listeners
|
||||
to notify dependent code to resolve the dependency inversion.
|
||||
|
||||
- Rename LoadMonitor to LoadMeter, change LoadEvent to LoadMeter::ScopedSample
|
||||
|
||||
- Rename LedgerMaster to Ledgers, create ILedgers interface.
|
||||
|
||||
- Figure out where previous ledgers go after a call to LedgerMaster::pushLedger()
|
||||
and see if it is possible to clean up the leaks on exit.
|
||||
|
||||
- Replace all NULL with nullptr
|
||||
|
||||
- Make TxFormats a member of ICore instead of a singleton.
|
||||
@@ -152,8 +142,6 @@ David Features:
|
||||
singleton. It might have to remain a singleton. At the very least,
|
||||
it should be a SharedSingleton to resolve ordering issues.
|
||||
|
||||
- Rename include guards to boost style, e.g. RIPPLE_LOG_H_INCLUDED
|
||||
|
||||
- Replace C11X with BEAST_COMPILER_SUPPORTS_MOVE_SEMANTICS
|
||||
|
||||
- Remove "ENABLE_INSECURE" when the time is right.
|
||||
@@ -161,8 +149,6 @@ David Features:
|
||||
- lift unique_ptr / auto_ptr into ripple namespace,
|
||||
or replace with ScopedPointer (preferred)
|
||||
|
||||
- Make LevelDB and Ripple code work with both Unicode and non-Unicode Windows APIs
|
||||
|
||||
- Go searching through VFALCO notes and fix everything
|
||||
|
||||
- Deal with function-level statics used for SqliteDatabase (like in
|
||||
@@ -173,30 +159,8 @@ David Features:
|
||||
STObject
|
||||
SerializedLedgerEntry
|
||||
|
||||
- Replace uint160, uint256 in argument lists, template parameter lists, and
|
||||
data members with tyepdefs from ripple_ProtocolTypes.h
|
||||
|
||||
- Consolidate SQLite database classes: DatabaseCon, Database, SqliteDatabase.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
HYPERLEVELDB TODO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- Port to Windows
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
LEVELDB TODO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- Add VisualStudio 2012 project file to our fork
|
||||
|
||||
- Add LevelDB unity .cpp and .h to our fork
|
||||
|
||||
- Replace Beast specific platform macros with universal macros so that the
|
||||
unity doesn't require Beast
|
||||
|
||||
- Submit LevelDB fork changes to Bitcoin upstream
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
WEBSOCKET TODO
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -213,65 +177,6 @@ PROTOCOL BUFFERS TODO
|
||||
|
||||
- Make a Visual Studio 2012 Project for source browsing
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
NOTES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LoadEvent
|
||||
|
||||
Is referenced with both a shared pointer and an auto pointer.
|
||||
Should be named LoadMeter::ScopedSample. Or possibly ScopedLoadSample
|
||||
|
||||
JobQueue
|
||||
|
||||
getLoadEvent and getLoadEventAP differ only in the style of pointer
|
||||
container which is returned. Unnecessary complexity.
|
||||
|
||||
Naming: Some names don't make sense.
|
||||
|
||||
Index
|
||||
Stop using Index to refer to keys in tables. Replace with "Key" ?
|
||||
Index implies a small integer, or a data structure.
|
||||
|
||||
This is all over the place in the Ledger API, "Index" of this and
|
||||
"Index" of that, the terminology is imprecise and helps neither
|
||||
understanding nor recall.
|
||||
|
||||
Inconsistent names
|
||||
|
||||
We have full names like SerializedType and then acronyms like STObject
|
||||
Two names for some things, e.g. SerializedLedgerEntry and SLE
|
||||
|
||||
Shared/Smart pointer typedefs in classes have a variety of different names
|
||||
for the same thing. e.g. "pointer", "ptr", "ptr_t", "wptr"
|
||||
|
||||
Verbose names
|
||||
|
||||
The prefix "Flat" is more appealing than "Serialized" because its shorter and
|
||||
easier to pronounce.
|
||||
|
||||
Ledger "Skip List"
|
||||
|
||||
Is not really a skip list data structure. This is more appropriately
|
||||
called an "index" although that name is currently used to identify hashes
|
||||
used as keys.
|
||||
|
||||
Interfaces
|
||||
|
||||
Serializer
|
||||
|
||||
Upon analysis this class does two incompatible things. Flattening, and
|
||||
unflattening. The interface should be reimplemented as two distinct
|
||||
abstract classes, InputStream and OutputStream with suitable implementations
|
||||
such as to and from a block of memory or dynamically allocated buffer.
|
||||
|
||||
The name and conflation of dual roles serves to confuse code at the point
|
||||
of call. Does set(Serializer& s) flatten or unflatten the data? This
|
||||
would be more clear:
|
||||
bool write (OutputStream& stream);
|
||||
|
||||
We have beast for InputStream and OutputStream, we can use those now.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Davidisms
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -300,31 +205,3 @@ A node is "full below" if we believe we have (either in the database or
|
||||
|
||||
The fullBelowCache is a cache of hashes of nodes that are full below. Which means
|
||||
there are no missing children
|
||||
|
||||
|
||||
What we want from the unique node list:
|
||||
- Some number of trusted roots (known by domain)
|
||||
probably organizations whose job is to provide a list of validators
|
||||
- We imagine the IRGA for example would establish some group whose job is to
|
||||
maintain a list of validators. There would be a public list of criteria
|
||||
that they would use to vet the validator. Things like:
|
||||
* Not anonymous
|
||||
* registered business
|
||||
* Physical location
|
||||
* Agree not to cease operations without notice / arbitrarily
|
||||
* Responsive to complaints
|
||||
- Identifiable jurisdiction
|
||||
* Homogeneity in the jurisdiction is a business risk
|
||||
* If all validators are in the same jurisdiction this is a business risk
|
||||
- OpenCoin sets criteria for the organizations
|
||||
- Rippled will ship with a list of trusted root "certificates"
|
||||
In other words this is a list of trusted domains from which the software
|
||||
can contact each trusted root and retrieve a list of "good" validators
|
||||
and then do something with that information
|
||||
- All the validation information would be public, including the broadcast
|
||||
messages.
|
||||
- The goal is to easily identify bad actors and assess network health
|
||||
* Malicious intent
|
||||
* Or, just hardware problems (faulty drive or memory)
|
||||
|
||||
|
||||
|
||||
@@ -13,14 +13,16 @@
|
||||
"ripple-lib": "0.7.25",
|
||||
"async": "~0.2.9",
|
||||
"extend": "~1.2.0",
|
||||
"simple-jsonrpc": "~0.0.2"
|
||||
"simple-jsonrpc": "~0.0.2",
|
||||
"deep-equal": "0.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coffee-script": "~1.6.3",
|
||||
"mocha": "~1.13.0"
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec --ui tdd --timeout 10000 --slow 600 test/*-test.js"
|
||||
"test": "mocha test/websocket-test.js test/server-test.js test/*-test.{js,coffee}"
|
||||
},
|
||||
|
||||
"repository": {
|
||||
@@ -29,4 +31,4 @@
|
||||
},
|
||||
|
||||
"readmeFilename": "README.md"
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,13 @@
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_SQLITE_FORCE_NDEBUG
|
||||
Setting this option forces sqlite into release mode even if NDEBUG is not set
|
||||
*/
|
||||
#ifndef BEAST_SQLITE_FORCE_NDEBUG
|
||||
#define BEAST_SQLITE_FORCE_NDEBUG 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Boost
|
||||
@@ -156,26 +163,25 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// These control whether or not certain functionality gets
|
||||
// compiled into the resulting rippled executable
|
||||
|
||||
/** Config: RIPPLE_ROCKSDB_AVAILABLE
|
||||
Controls whether or not the RocksDB database back-end is compiled into
|
||||
rippled. RocksDB requires a relatively modern C++ compiler (tested with
|
||||
gcc versions 4.8.1 and later) that supports some C++11 features.
|
||||
*/
|
||||
#ifndef RIPPLE_ROCKSDB_AVAILABLE
|
||||
//#define RIPPLE_ROCKSDB_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Here temporarily to turn off new Validations code while it
|
||||
// is being written.
|
||||
//
|
||||
#ifndef RIPPLE_USE_NEW_VALIDATORS
|
||||
#define RIPPLE_USE_NEW_VALIDATORS 0
|
||||
#endif
|
||||
|
||||
// Turning this on will use the new PeerFinder logic to establish connections
|
||||
// to other peers. Even with this off, PeerFinder will still send mtENDPOINTS
|
||||
// messages as needed, and collect legacy IP endpoint information.
|
||||
//
|
||||
#ifndef RIPPLE_USE_PEERFINDER
|
||||
#define RIPPLE_USE_PEERFINDER 0
|
||||
#endif
|
||||
|
||||
// Here temporarily
|
||||
// Controls whether or not the new RPC::Manager logic will be
|
||||
// used to invoke RPC commands before they pass to the original code.
|
||||
#ifndef RIPPLE_USE_RPC_SERVICE_MANAGER
|
||||
#define RIPPLE_USE_RPC_SERVICE_MANAGER 0
|
||||
#ifndef RIPPLE_USE_VALIDATORS
|
||||
#define RIPPLE_USE_VALIDATORS 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,6 +21,16 @@ About git-subtree:
|
||||
https://github.com/apenwarr/git-subtree <br>
|
||||
http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ <br>
|
||||
|
||||
<table align=left><tr>
|
||||
<th>dir</th>
|
||||
<th>What</th>
|
||||
</tr><tr>
|
||||
<td>beast</td>
|
||||
<td>Beast, the amazing cross-platform library.<br>
|
||||
git@github.com:vinniefalco/Beast.git
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
## ./beast
|
||||
|
||||
Beast, the amazing cross-platform library.
|
||||
|
||||
3
src/beast/.gitignore
vendored
3
src/beast/.gitignore
vendored
@@ -15,6 +15,7 @@ Docs
|
||||
*.manifest
|
||||
*.manifest.res
|
||||
*.o
|
||||
*.opensdf
|
||||
*.d
|
||||
*.sdf
|
||||
xcuserdata
|
||||
@@ -24,5 +25,5 @@ contents.xcworkspacedata
|
||||
profile
|
||||
Builds/VisualStudio2012/Debug
|
||||
Builds/VisualStudio2012/Release
|
||||
|
||||
project.xcworkspace
|
||||
modules/beast_cryptopp
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>BEAST_COMPILING_STATIC_LIBARARY=1;_CRTDBG_MAP_ALLOC;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>BEAST_COMPILING_STATIC_LIBARARY=1;_CRTDBG_MAP_ALLOC;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<AdditionalIncludeDirectories>$(RepoDir)\config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -82,9 +82,22 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\beast\Arithmetic.h" />
|
||||
<ClInclude Include="..\..\beast\Asio.h" />
|
||||
<ClInclude Include="..\..\beast\asio\io_latency_probe.h" />
|
||||
<ClInclude Include="..\..\beast\asio\IPAddressConversion.h" />
|
||||
<ClInclude Include="..\..\beast\Atomic.h" />
|
||||
<ClInclude Include="..\..\beast\Boost.h" />
|
||||
<ClInclude Include="..\..\beast\boost\ErrorCode.h" />
|
||||
<ClInclude Include="..\..\beast\ByteOrder.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\abstract_clock.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\basic_seconds_clock.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\chrono_io.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\chrono_util.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\CPUMeter.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\manual_clock.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\ratio_io.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\RelativeTime.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\ScopedTimeInterval.h" />
|
||||
<ClInclude Include="..\..\beast\Config.h" />
|
||||
<ClInclude Include="..\..\beast\config\CompilerConfig.h" />
|
||||
<ClInclude Include="..\..\beast\config\compiler\Clang.h" />
|
||||
@@ -103,36 +116,79 @@
|
||||
<ClInclude Include="..\..\beast\config\SelectPlatformConfig.h" />
|
||||
<ClInclude Include="..\..\beast\config\SelectStdlibConfig.h" />
|
||||
<ClInclude Include="..\..\beast\config\StandardConfig.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_container_utility.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_container.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_map.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_multimap.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_multiset.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_set.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_unordered_map.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_unordered_multimap.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_unordered_multiset.h" />
|
||||
<ClInclude Include="..\..\beast\container\aged_unordered_set.h" />
|
||||
<ClInclude Include="..\..\beast\container\detail\aged_associative_container.h" />
|
||||
<ClInclude Include="..\..\beast\container\detail\aged_ordered_container.h" />
|
||||
<ClInclude Include="..\..\beast\container\detail\aged_container_iterator.h" />
|
||||
<ClInclude Include="..\..\beast\container\detail\aged_unordered_container.h" />
|
||||
<ClInclude Include="..\..\beast\Crypto.h" />
|
||||
<ClInclude Include="..\..\beast\crypto\BinaryEncoding.h" />
|
||||
<ClInclude Include="..\..\beast\crypto\impl\sha2\sha2.h" />
|
||||
<ClInclude Include="..\..\beast\crypto\MurmurHash.h" />
|
||||
<ClInclude Include="..\..\beast\crypto\Sha256.h" />
|
||||
<ClInclude Include="..\..\beast\crypto\UnsignedInteger.h" />
|
||||
<ClInclude Include="..\..\beast\crypto\UnsignedIntegerCalc.h" />
|
||||
<ClInclude Include="..\..\beast\CStdInt.h" />
|
||||
<ClInclude Include="..\..\beast\cxx14\algorithm.h" />
|
||||
<ClInclude Include="..\..\beast\cxx14\config.h" />
|
||||
<ClInclude Include="..\..\beast\cxx14\functional.h" />
|
||||
<ClInclude Include="..\..\beast\cxx14\memory.h" />
|
||||
<ClInclude Include="..\..\beast\cxx14\type_traits.h" />
|
||||
<ClInclude Include="..\..\beast\cyclic_iterator.h" />
|
||||
<ClInclude Include="..\..\beast\FixedArray.h" />
|
||||
<ClInclude Include="..\..\beast\HeapBlock.h" />
|
||||
<ClInclude Include="..\..\beast\HTTP.h" />
|
||||
<ClInclude Include="..\..\beast\http\impl\http-parser\http_parser.h" />
|
||||
<ClInclude Include="..\..\beast\http\ParsedURL.h" />
|
||||
<ClInclude Include="..\..\beast\http\URL.h" />
|
||||
<ClInclude Include="..\..\beast\Insight.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Base.h" />
|
||||
<ClInclude Include="..\..\beast\insight\BaseImpl.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Collector.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Counter.h" />
|
||||
<ClInclude Include="..\..\beast\insight\CounterImpl.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Event.h" />
|
||||
<ClInclude Include="..\..\beast\insight\EventImpl.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Gauge.h" />
|
||||
<ClInclude Include="..\..\beast\insight\GaugeImpl.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Group.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Groups.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Hook.h" />
|
||||
<ClInclude Include="..\..\beast\insight\HookImpl.h" />
|
||||
<ClInclude Include="..\..\beast\insight\Meter.h" />
|
||||
<ClInclude Include="..\..\beast\insight\MeterImpl.h" />
|
||||
<ClInclude Include="..\..\beast\insight\NullCollector.h" />
|
||||
<ClInclude Include="..\..\beast\insight\StatsDCollector.h" />
|
||||
<ClInclude Include="..\..\beast\Intrusive.h" />
|
||||
<ClInclude Include="..\..\beast\intrusive\ForwardList.h" />
|
||||
<ClInclude Include="..\..\beast\intrusive\IntrusiveArray.h" />
|
||||
<ClInclude Include="..\..\beast\intrusive\List.h" />
|
||||
<ClInclude Include="..\..\beast\intrusive\LockFreeStack.h" />
|
||||
<ClInclude Include="..\..\beast\intrusive\PointerTraits.h" />
|
||||
<ClInclude Include="..\..\beast\Memory.h" />
|
||||
<ClInclude Include="..\..\beast\MPL.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\AddConst.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\CopyConst.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\IfCond.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\IsCallPossible.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\PointerToOther.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveConst.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveConstVolatile.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveReference.h" />
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveVolatile.h" />
|
||||
<ClInclude Include="..\..\beast\Net.h" />
|
||||
<ClInclude Include="..\..\beast\net\BufferType.h" />
|
||||
<ClInclude Include="..\..\beast\net\detail\Parse.h" />
|
||||
<ClInclude Include="..\..\beast\net\DynamicBuffer.h" />
|
||||
<ClInclude Include="..\..\beast\net\IPAddress.h" />
|
||||
<ClInclude Include="..\..\beast\net\IPAddressV4.h" />
|
||||
<ClInclude Include="..\..\beast\net\IPAddressV6.h" />
|
||||
<ClInclude Include="..\..\beast\net\IPEndpoint.h" />
|
||||
<ClInclude Include="..\..\beast\SafeBool.h" />
|
||||
<ClInclude Include="..\..\beast\SmartPtr.h" />
|
||||
<ClInclude Include="..\..\beast\smart_ptr\AbstractObject.h" />
|
||||
<ClInclude Include="..\..\beast\smart_ptr\ContainerDeletePolicy.h" />
|
||||
<ClInclude Include="..\..\beast\smart_ptr\ScopedPointer.h" />
|
||||
<ClInclude Include="..\..\beast\smart_ptr\SharedObject.h" />
|
||||
<ClInclude Include="..\..\beast\smart_ptr\SharedPtr.h" />
|
||||
<ClInclude Include="..\..\beast\StaticAssert.h" />
|
||||
<ClInclude Include="..\..\beast\Strings.h" />
|
||||
<ClInclude Include="..\..\beast\strings\CharacterFunctions.h" />
|
||||
@@ -144,23 +200,40 @@
|
||||
<ClInclude Include="..\..\beast\strings\String.h" />
|
||||
<ClInclude Include="..\..\beast\strings\StringCharPointerType.h" />
|
||||
<ClInclude Include="..\..\beast\strings\StringFromNumber.h" />
|
||||
<ClInclude Include="..\..\beast\Thread.h" />
|
||||
<ClInclude Include="..\..\beast\thread\LockGuard.h" />
|
||||
<ClInclude Include="..\..\beast\thread\SharedData.h" />
|
||||
<ClInclude Include="..\..\beast\thread\SharedLockGuard.h" />
|
||||
<ClInclude Include="..\..\beast\thread\SharedMutexAdapter.h" />
|
||||
<ClInclude Include="..\..\beast\Threads.h" />
|
||||
<ClInclude Include="..\..\beast\Chrono.h" />
|
||||
<ClInclude Include="..\..\beast\threads\detail\BindHandler.h" />
|
||||
<ClInclude Include="..\..\beast\threads\detail\DispatchedHandler.h" />
|
||||
<ClInclude Include="..\..\beast\threads\LockGuard.h" />
|
||||
<ClInclude Include="..\..\beast\threads\RecursiveMutex.h" />
|
||||
<ClInclude Include="..\..\beast\threads\semaphore.h" />
|
||||
<ClInclude Include="..\..\beast\threads\ServiceQueue.h" />
|
||||
<ClInclude Include="..\..\beast\threads\SharedData.h" />
|
||||
<ClInclude Include="..\..\beast\threads\SharedLockGuard.h" />
|
||||
<ClInclude Include="..\..\beast\threads\SharedMutexAdapter.h" />
|
||||
<ClInclude Include="..\..\beast\threads\SpinLock.h" />
|
||||
<ClInclude Include="..\..\beast\threads\Stoppable.h" />
|
||||
<ClInclude Include="..\..\beast\threads\Thread.h" />
|
||||
<ClInclude Include="..\..\beast\threads\ThreadLocalValue.h" />
|
||||
<ClInclude Include="..\..\beast\threads\TryLockGuard.h" />
|
||||
<ClInclude Include="..\..\beast\threads\UnlockGuard.h" />
|
||||
<ClInclude Include="..\..\beast\threads\WaitableEvent.h" />
|
||||
<ClInclude Include="..\..\beast\threads\ScopedWrapperContext.h" />
|
||||
<ClInclude Include="..\..\beast\TypeTraits.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\IntegralConstant.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\IsIntegral.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\IsSigned.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\RemoveSigned.h" />
|
||||
<ClInclude Include="..\..\beast\type_traits\maybe_const.h" />
|
||||
<ClInclude Include="..\..\beast\Uncopyable.h" />
|
||||
<ClInclude Include="..\..\beast\Utility.h" />
|
||||
<ClInclude Include="..\..\beast\utility\Debug.h" />
|
||||
<ClInclude Include="..\..\beast\utility\EnableIf.h" />
|
||||
<ClInclude Include="..\..\beast\utility\empty_base_optimization.h" />
|
||||
<ClInclude Include="..\..\beast\utility\Error.h" />
|
||||
<ClInclude Include="..\..\beast\utility\hash_pair.h" />
|
||||
<ClInclude Include="..\..\beast\utility\Journal.h" />
|
||||
<ClInclude Include="..\..\beast\utility\LeakChecked.h" />
|
||||
<ClInclude Include="..\..\beast\utility\PropertyStream.h" />
|
||||
<ClInclude Include="..\..\beast\utility\StaticObject.h" />
|
||||
<ClInclude Include="..\..\beast\Version.h" />
|
||||
<ClInclude Include="..\..\config\BeastConfig.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\async\AbstractHandler.h" />
|
||||
@@ -171,8 +244,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_asio\async\SharedHandlerAllocator.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\async\SharedHandlerPtr.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\async\SharedHandlerType.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\basics\BufferType.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\basics\ContentBodyBuffer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\basics\BuffersType.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\basics\FixedInputBuffer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\basics\PeerRole.h" />
|
||||
@@ -186,7 +257,9 @@
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPParserImpl.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPParser.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPRequest.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPRequestParser.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPResponse.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPResponseParser.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPVersion.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\protocol\HandshakeDetectLogic.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\protocol\HandshakeDetectLogicPROXY.h" />
|
||||
@@ -198,7 +271,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_asio\sockets\Socket.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\sockets\SocketBase.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\sockets\SocketWrapper.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\sockets\SocketWrapperStrand.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\system\BoostIncludes.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\system\OpenSSLIncludes.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\tests\TestPeer.h" />
|
||||
@@ -214,29 +286,19 @@
|
||||
<ClInclude Include="..\..\modules\beast_asio\tests\PeerTest.h" />
|
||||
<ClInclude Include="..\..\modules\beast_asio\tests\TestPeerType.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\beast_core.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\AbstractFifo.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\Array.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\ArrayAllocationBase.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\DynamicObject.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\ElementComparator.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\DynamicArray.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\HashMap.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\LinkedListPointer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\LockFreeQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\NamedValueSet.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\OwnedArray.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\PropertySet.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SharedObjectArray.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\ScopedValueSetter.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SharedTable.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SortedLookupTable.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SortedSet.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SparseSet.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\DynamicList.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\Variant.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FatalError.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FPUFlags.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\LeakChecked.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\SemanticVersion.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\Throw.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\UnitTest.h" />
|
||||
@@ -254,37 +316,15 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\logging\FileLogger.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\logging\Logger.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\BigInteger.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Expression.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Interval.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Math.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\MurmurHash.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Random.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Range.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\uint24.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AllocatedBy.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicCounter.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicFlag.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicPointer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicState.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\CacheLine.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\ContainerDeletePolicy.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\FifoFreeStore.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\FifoFreeStoreWithoutTLS.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\FifoFreeStoreWithTLS.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\GlobalFifoFreeStore.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\GlobalPagedFreeStore.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\MemoryAlignment.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\MemoryBlock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\OptionalScopedPointer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\PagedFreeStore.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\RecycledObjectPool.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedFunction.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedObject.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\ScopedPointer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedSingleton.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\WeakReference.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedPtr.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\StaticObject.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\misc\Main.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\misc\Result.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\misc\Uuid.h" />
|
||||
@@ -294,7 +334,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\native\osx_ObjCHelpers.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\native\posix_SharedCode.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\native\win32_ComSmartPtr.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\network\IPAddress.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\network\MACAddress.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\network\NamedPipe.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\network\Socket.h" />
|
||||
@@ -319,7 +358,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\text\StringArray.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\text\StringPairArray.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\text\StringPool.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\text\TextDiff.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ChildProcess.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\CriticalSection.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\DynamicLibrary.h" />
|
||||
@@ -327,26 +365,11 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\InterProcessLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\Process.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ReadWriteLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ReadWriteMutex.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ScopedLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ScopedReadLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ScopedWriteLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\SpinDelay.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\SpinLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\Thread.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ThreadLocalValue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ThreadPool.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\TimeSliceThread.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\WaitableEvent.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\CallQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\DeadlineTimer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\InterruptibleThread.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Listeners.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\ManualCallQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Semaphore.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\ServiceQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Stoppable.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\ThreadWithCallQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Workers.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\detail\ScopedLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\detail\TrackedMutex.h" />
|
||||
@@ -374,14 +397,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\zip\zlib\zconf.in.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\zip\zlib\zlib.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\zip\zlib\zutil.h" />
|
||||
<ClInclude Include="..\..\modules\beast_crypto\beast_crypto.h" />
|
||||
<ClInclude Include="..\..\modules\beast_crypto\math\BinaryEncoding.h" />
|
||||
<ClInclude Include="..\..\modules\beast_crypto\math\UnsignedInteger.h" />
|
||||
<ClInclude Include="..\..\modules\beast_crypto\math\UnsignedIntegerCalc.h" />
|
||||
<ClInclude Include="..\..\modules\beast_db\beast_db.h" />
|
||||
<ClInclude Include="..\..\modules\beast_db\keyvalue\KeyvaDB.h" />
|
||||
<ClInclude Include="..\..\modules\beast_extras\beast_extras.h" />
|
||||
<ClInclude Include="..\..\modules\beast_extras\traits\BoostLockableTraits.h" />
|
||||
<ClInclude Include="..\..\modules\beast_sqdb\api\backend.h" />
|
||||
<ClInclude Include="..\..\modules\beast_sqdb\api\blob.h" />
|
||||
<ClInclude Include="..\..\modules\beast_sqdb\api\into.h" />
|
||||
@@ -407,14 +422,65 @@
|
||||
<ClInclude Include="..\..\modules\beast_sqlite\sqlite\sqlite3ext.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\beast\asio\Asio.cpp" />
|
||||
<ClCompile Include="..\..\beast\asio\impl\IPAddressConversion.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\boost\Boost.cpp" />
|
||||
<ClCompile Include="..\..\beast\chrono\Chrono.cpp" />
|
||||
<ClCompile Include="..\..\beast\chrono\impl\basic_seconds_clock.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\chrono\impl\chrono_io.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\chrono\impl\CPUMeter.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\chrono\impl\abstract_clock.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\chrono\impl\RelativeTime.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\container\Container.cpp" />
|
||||
<ClCompile Include="..\..\beast\container\impl\aged_associative_container.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\crypto\Crypto.cpp" />
|
||||
<ClCompile Include="..\..\beast\crypto\impl\BinaryEncoding.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\crypto\impl\MurmurHash.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\crypto\impl\Sha256.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -439,6 +505,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\crypto\impl\UnsignedInteger.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\http\HTTP.cpp" />
|
||||
<ClCompile Include="..\..\beast\http\impl\http_parser.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -482,6 +554,73 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Collector.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Group.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Groups.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Hook.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Metric.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\NullCollector.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\StatsDCollector.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\Insight.cpp" />
|
||||
<ClCompile Include="..\..\beast\net\impl\DynamicBuffer.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\net\impl\IPAddress.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\net\impl\IPAddressV4.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\net\impl\IPAddressV6.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\net\impl\IPEndpoint.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -489,6 +628,13 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\net\Net.cpp" />
|
||||
<ClCompile Include="..\..\beast\smart_ptr\impl\AbstractObject.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\smart_ptr\SmartPtr.cpp" />
|
||||
<ClCompile Include="..\..\beast\strings\impl\CharacterFunctions.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -502,6 +648,49 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\strings\Strings.cpp" />
|
||||
<ClCompile Include="..\..\beast\threads\impl\Atomic.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\threads\impl\RecursiveMutex.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\threads\impl\ServiceQueue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\threads\impl\Stoppable.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\threads\impl\Thread.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\threads\impl\WaitableEvent.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\threads\Threads.cpp" />
|
||||
<ClCompile Include="..\..\beast\utility\impl\Assert.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\utility\impl\Debug.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -520,14 +709,26 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\utility\Utility.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_asio\async\SharedHandler.cpp">
|
||||
<ClCompile Include="..\..\beast\utility\impl\LeakChecked.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_asio\basics\ContentBodyBuffer.cpp">
|
||||
<ClCompile Include="..\..\beast\utility\impl\PropertyStream.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\utility\impl\StaticObject.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\utility\Utility.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_asio\async\SharedHandler.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@@ -580,12 +781,24 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_asio\http\HTTPRequestParser.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_asio\http\HTTPResponse.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_asio\http\HTTPResponseParser.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_asio\http\HTTPVersion.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -671,12 +884,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\beast_core.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\AbstractFifo.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\DynamicObject.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@@ -701,30 +908,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\DynamicArray.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\DynamicList.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\HashMap.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\Assert.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\FatalError.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -735,12 +918,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\LeakChecked.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\SemanticVersion.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -825,60 +1002,18 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\maths\Expression.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\maths\MurmurHash.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\maths\Random.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\memory\FifoFreeStoreWithoutTLS.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\memory\FifoFreeStoreWithTLS.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\memory\GlobalPagedFreeStore.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\memory\MemoryBlock.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\memory\PagedFreeStore.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\memory\StaticObject.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\misc\Main.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1023,12 +1158,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\network\IPAddress.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\network\MACAddress.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@@ -1137,12 +1266,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\text\TextDiff.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\threads\ChildProcess.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@@ -1161,90 +1284,18 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\threads\ReadWriteMutex.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\threads\SpinDelay.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\threads\Thread.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\threads\ThreadPool.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\threads\TimeSliceThread.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\CallQueue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\DeadlineTimer.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\InterruptibleThread.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Listeners.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\ManualCallQueue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Semaphore.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\ServiceQueue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Stoppable.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\ThreadWithCallQueue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Workers.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1371,27 +1422,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_crypto\beast_crypto.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_crypto\math\BinaryEncoding.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_crypto\math\UnsignedInteger.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_db\beast_db.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_db\keyvalue\KeyvaDB.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_extras\beast_extras.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_sqdb\beast_sqdb.cpp" />
|
||||
<ClCompile Include="..\..\modules\beast_sqdb\source\blob.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1480,31 +1510,32 @@
|
||||
<ProjectGuid>{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>beast</RootNamespace>
|
||||
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -1536,6 +1567,8 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -1564,6 +1597,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,6 @@
|
||||
BEAST TODO
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- Remove ReadWriteMutex and replace it with a CriticalSection
|
||||
since the implementation is broken.
|
||||
|
||||
- Rewrite SharedData to work with a CriticalSection
|
||||
|
||||
- Use new file naming convention
|
||||
|
||||
- Use SemanticVersion for beast version numbers to replace BEAST_VERSION
|
||||
|
||||
- add support for a __PRETTY_FUNCTION__ equivalent for all environments
|
||||
@@ -17,13 +10,6 @@ BEAST TODO
|
||||
|
||||
- Import secp256k1 from sipa
|
||||
|
||||
- HashMap work:
|
||||
- Add unit test
|
||||
- Return size_t from hash function, take out upperLimit, move mod % to caller
|
||||
- Make hash function a functor using operator()
|
||||
- Implement HardenedHashFunctions
|
||||
- Fix problem with assigning to the result of operator[] maybe use a proxy?
|
||||
|
||||
- Set sqlite thread safety model to '2' in beast_sqlite
|
||||
|
||||
- Document and rename all the sqdb files and classes
|
||||
@@ -60,16 +46,12 @@ BEAST TODO
|
||||
|
||||
- Rename malloc/calloc JUCE members that conflict with the debug CRT from MSVC
|
||||
|
||||
- Make beast::HashMap support assignment via operator[]
|
||||
|
||||
- Reformat every Doxygen comment
|
||||
- Fix Doxygen metatags
|
||||
- update Beast Doxyfile
|
||||
|
||||
- Rename include guards to boost style, e.g. BEAST_THROW_H_INCLUDED
|
||||
|
||||
- Decide if we should get rid of AtomicCounter, AtomicFlag, AtomicPointer, AtomicState
|
||||
|
||||
- Clean up CacheLine, StaticObject
|
||||
|
||||
- Clean up ConcurrentObject
|
||||
|
||||
@@ -17,12 +17,9 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_THREAD_H_INCLUDED
|
||||
#define BEAST_THREAD_H_INCLUDED
|
||||
#ifndef BEAST_ASIO_H_INCLUDED
|
||||
#define BEAST_ASIO_H_INCLUDED
|
||||
|
||||
#include "thread/LockGuard.h"
|
||||
#include "thread/SharedLockGuard.h"
|
||||
#include "thread/SharedMutexAdapter.h"
|
||||
#include "thread/SharedData.h"
|
||||
#include "asio/IPAddressConversion.h"
|
||||
|
||||
#endif
|
||||
@@ -207,6 +207,9 @@ private:
|
||||
#define BEAST_64BIT_ATOMICS_UNAVAILABLE 1
|
||||
#endif
|
||||
|
||||
#elif BEAST_CLANG && BEAST_LINUX
|
||||
#define BEAST_ATOMICS_GCC 1
|
||||
|
||||
//==============================================================================
|
||||
#elif BEAST_GCC
|
||||
#define BEAST_ATOMICS_GCC 1 // GCC with intrinsics
|
||||
@@ -297,8 +300,16 @@ template <typename Type>
|
||||
inline Type Atomic<Type>::operator+= (const Type amountToAdd) noexcept
|
||||
{
|
||||
#if BEAST_ATOMICS_MAC
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wint-to-void-pointer-cast"
|
||||
# pragma clang diagnostic ignored "-Wint-to-pointer-cast"
|
||||
# endif
|
||||
return sizeof (Type) == 4 ? (Type) OSAtomicAdd32Barrier ((int32_t) castTo32Bit (amountToAdd), (BEAST_MAC_ATOMICS_VOLATILE int32_t*) &value)
|
||||
: (Type) OSAtomicAdd64Barrier ((int64_t) amountToAdd, (BEAST_MAC_ATOMICS_VOLATILE int64_t*) &value);
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
#elif BEAST_ATOMICS_WINDOWS
|
||||
return sizeof (Type) == 4 ? (Type) (beast_InterlockedExchangeAdd ((volatile long*) &value, (long) amountToAdd) + (long) amountToAdd)
|
||||
: (Type) (beast_InterlockedExchangeAdd64 ((volatile __int64*) &value, (__int64) amountToAdd) + (__int64) amountToAdd);
|
||||
@@ -317,13 +328,21 @@ template <typename Type>
|
||||
inline Type Atomic<Type>::operator++() noexcept
|
||||
{
|
||||
#if BEAST_ATOMICS_MAC
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wint-to-void-pointer-cast"
|
||||
# pragma clang diagnostic ignored "-Wint-to-pointer-cast"
|
||||
# endif
|
||||
return sizeof (Type) == 4 ? (Type) OSAtomicIncrement32Barrier ((BEAST_MAC_ATOMICS_VOLATILE int32_t*) &value)
|
||||
: (Type) OSAtomicIncrement64Barrier ((BEAST_MAC_ATOMICS_VOLATILE int64_t*) &value);
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
#elif BEAST_ATOMICS_WINDOWS
|
||||
return sizeof (Type) == 4 ? (Type) beast_InterlockedIncrement ((volatile long*) &value)
|
||||
: (Type) beast_InterlockedIncrement64 ((volatile __int64*) &value);
|
||||
#elif BEAST_ATOMICS_GCC
|
||||
return (Type) __sync_add_and_fetch (&value, 1);
|
||||
return (Type) __sync_add_and_fetch (&value, (Type) 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -331,13 +350,21 @@ template <typename Type>
|
||||
inline Type Atomic<Type>::operator--() noexcept
|
||||
{
|
||||
#if BEAST_ATOMICS_MAC
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wint-to-void-pointer-cast"
|
||||
# pragma clang diagnostic ignored "-Wint-to-pointer-cast"
|
||||
# endif
|
||||
return sizeof (Type) == 4 ? (Type) OSAtomicDecrement32Barrier ((BEAST_MAC_ATOMICS_VOLATILE int32_t*) &value)
|
||||
: (Type) OSAtomicDecrement64Barrier ((BEAST_MAC_ATOMICS_VOLATILE int64_t*) &value);
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
#elif BEAST_ATOMICS_WINDOWS
|
||||
return sizeof (Type) == 4 ? (Type) beast_InterlockedDecrement ((volatile long*) &value)
|
||||
: (Type) beast_InterlockedDecrement64 ((volatile __int64*) &value);
|
||||
#elif BEAST_ATOMICS_GCC
|
||||
return (Type) __sync_add_and_fetch (&value, -1);
|
||||
return (Type) __sync_add_and_fetch (&value, (Type) -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
27
src/beast/beast/Boost.h
Normal file
27
src/beast/beast/Boost.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_BOOST_H_INCLUDED
|
||||
#define BEAST_BOOST_H_INCLUDED
|
||||
|
||||
// These classes require boost in order to be used.
|
||||
|
||||
#include "boost/ErrorCode.h"
|
||||
|
||||
#endif
|
||||
@@ -20,6 +20,15 @@
|
||||
#ifndef BEAST_CHRONO_H_INCLUDED
|
||||
#define BEAST_CHRONO_H_INCLUDED
|
||||
|
||||
#include "chrono/abstract_clock.h"
|
||||
#include "chrono/basic_seconds_clock.h"
|
||||
#include "chrono/chrono_io.h"
|
||||
#include "chrono/chrono_util.h"
|
||||
#include "chrono/manual_clock.h"
|
||||
#include "chrono/ratio_io.h"
|
||||
|
||||
#include "chrono/CPUMeter.h"
|
||||
#include "chrono/RelativeTime.h"
|
||||
#include "chrono/ScopedTimeInterval.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
#ifndef BEAST_CRYPTO_H_INCLUDED
|
||||
#define BEAST_CRYPTO_H_INCLUDED
|
||||
|
||||
#include "crypto/BinaryEncoding.h"
|
||||
#include "crypto/MurmurHash.h"
|
||||
#include "crypto/Sha256.h"
|
||||
#include "crypto/UnsignedInteger.h"
|
||||
#include "crypto/UnsignedIntegerCalc.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,8 @@ bool operator!= (FixedArray <T, N> const& lhs, FixedArray <T, N> const& rhs)
|
||||
template <class T, std::size_t N>
|
||||
bool operator< (FixedArray <T, N> const& lhs, FixedArray <T, N> const& rhs)
|
||||
{
|
||||
return std::lexicographical_compare (lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return std::lexicographical_compare (
|
||||
lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
template <class T, std::size_t N>
|
||||
|
||||
37
src/beast/beast/Insight.h
Normal file
37
src/beast/beast/Insight.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_INSIGHT_H_INCLUDED
|
||||
#define BEAST_INSIGHT_H_INCLUDED
|
||||
|
||||
#include "insight/Counter.h"
|
||||
#include "insight/CounterImpl.h"
|
||||
#include "insight/Event.h"
|
||||
#include "insight/EventImpl.h"
|
||||
#include "insight/Gauge.h"
|
||||
#include "insight/GaugeImpl.h"
|
||||
#include "insight/Group.h"
|
||||
#include "insight/Groups.h"
|
||||
#include "insight/Hook.h"
|
||||
#include "insight/HookImpl.h"
|
||||
#include "insight/Collector.h"
|
||||
#include "insight/NullCollector.h"
|
||||
#include "insight/StatsDCollector.h"
|
||||
|
||||
#endif
|
||||
@@ -20,8 +20,6 @@
|
||||
#ifndef BEAST_INTRUSIVE_H_INCLUDED
|
||||
#define BEAST_INTRUSIVE_H_INCLUDED
|
||||
|
||||
#include "intrusive/ForwardList.h"
|
||||
#include "intrusive/IntrusiveArray.h"
|
||||
#include "intrusive/List.h"
|
||||
#include "intrusive/LockFreeStack.h"
|
||||
|
||||
|
||||
@@ -20,14 +20,6 @@
|
||||
#ifndef BEAST_MPL_H_INCLUDED
|
||||
#define BEAST_MPL_H_INCLUDED
|
||||
|
||||
#include "mpl/AddConst.h"
|
||||
#include "mpl/CopyConst.h"
|
||||
#include "mpl/IfCond.h"
|
||||
#include "mpl/IsCallPossible.h"
|
||||
#include "mpl/PointerToOther.h"
|
||||
#include "mpl/RemoveConst.h"
|
||||
#include "mpl/RemoveConstVolatile.h"
|
||||
#include "mpl/RemoveReference.h"
|
||||
#include "mpl/RemoveVolatile.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "Config.h"
|
||||
#include "Uncopyable.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
#ifndef BEAST_NET_H_INCLUDED
|
||||
#define BEAST_NET_H_INCLUDED
|
||||
|
||||
#include "net/BufferType.h"
|
||||
#include "net/DynamicBuffer.h"
|
||||
|
||||
#include "net/IPEndpoint.h"
|
||||
#include "net/IPAddressV4.h"
|
||||
#include "net/IPAddressV6.h"
|
||||
#include "net/IPEndpoint.h"
|
||||
|
||||
#endif
|
||||
|
||||
31
src/beast/beast/SmartPtr.h
Normal file
31
src/beast/beast/SmartPtr.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_SMARTPTR_H_INCLUDED
|
||||
#define BEAST_SMARTPTR_H_INCLUDED
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "smart_ptr/AbstractObject.h"
|
||||
#include "smart_ptr/ContainerDeletePolicy.h"
|
||||
#include "smart_ptr/SharedObject.h"
|
||||
#include "smart_ptr/SharedPtr.h"
|
||||
#include "smart_ptr/ScopedPointer.h"
|
||||
|
||||
#endif
|
||||
39
src/beast/beast/Threads.h
Normal file
39
src/beast/beast/Threads.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_THREADS_H_INCLUDED
|
||||
#define BEAST_THREADS_H_INCLUDED
|
||||
|
||||
#include "threads/LockGuard.h"
|
||||
#include "threads/UnlockGuard.h"
|
||||
#include "threads/TryLockGuard.h"
|
||||
#include "threads/SharedLockGuard.h"
|
||||
#include "threads/SharedMutexAdapter.h"
|
||||
#include "threads/SharedData.h"
|
||||
#include "threads/ServiceQueue.h"
|
||||
#include "threads/SpinLock.h"
|
||||
#include "threads/Stoppable.h"
|
||||
#include "threads/Thread.h"
|
||||
#include "threads/ThreadLocalValue.h"
|
||||
#include "threads/WaitableEvent.h"
|
||||
#include "threads/ScopedWrapperContext.h"
|
||||
|
||||
#include "threads/semaphore.h"
|
||||
|
||||
#endif
|
||||
@@ -23,6 +23,5 @@
|
||||
#include "type_traits/IntegralConstant.h"
|
||||
#include "type_traits/IsIntegral.h"
|
||||
#include "type_traits/IsSigned.h"
|
||||
#include "type_traits/RemoveSigned.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,9 +21,13 @@
|
||||
#define BEAST_UTILITY_H_INCLUDED
|
||||
|
||||
#include "utility/Debug.h"
|
||||
#include "utility/EnableIf.h"
|
||||
#include "utility/Error.h"
|
||||
#include "utility/Journal.h"
|
||||
#include "utility/LeakChecked.h"
|
||||
#include "utility/PropertyStream.h"
|
||||
#include "utility/StaticObject.h"
|
||||
|
||||
#include "utility/hash_pair.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,11 +19,4 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "beast_extras.h"
|
||||
|
||||
namespace beast
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
#include "impl/IPAddressConversion.cpp"
|
||||
68
src/beast/beast/asio/IPAddressConversion.h
Normal file
68
src/beast/beast/asio/IPAddressConversion.h
Normal file
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_ASIO_IPADDRESSCONVERSION_H_INCLUDED
|
||||
#define BEAST_ASIO_IPADDRESSCONVERSION_H_INCLUDED
|
||||
|
||||
#include "../net/IPEndpoint.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
namespace beast {
|
||||
namespace IP {
|
||||
|
||||
/** Convert to Endpoint.
|
||||
The port is set to zero.
|
||||
*/
|
||||
Endpoint from_asio (boost::asio::ip::address const& address);
|
||||
|
||||
/** Convert to Endpoint. */
|
||||
Endpoint from_asio (boost::asio::ip::tcp::endpoint const& endpoint);
|
||||
|
||||
/** Convert to asio::ip::address.
|
||||
The port is ignored.
|
||||
*/
|
||||
boost::asio::ip::address to_asio_address (Endpoint const& endpoint);
|
||||
|
||||
/** Convert to asio::ip::tcp::endpoint. */
|
||||
boost::asio::ip::tcp::endpoint to_asio_endpoint (Endpoint const& endpoint);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace beast {
|
||||
|
||||
// DEPRECATED
|
||||
struct IPAddressConversion
|
||||
{
|
||||
static IP::Endpoint from_asio (boost::asio::ip::address const& address)
|
||||
{ return IP::from_asio (address); }
|
||||
static IP::Endpoint from_asio (boost::asio::ip::tcp::endpoint const& endpoint)
|
||||
{ return IP::from_asio (endpoint); }
|
||||
static boost::asio::ip::address to_asio_address (IP::Endpoint const& address)
|
||||
{ return IP::to_asio_address (address); }
|
||||
static boost::asio::ip::tcp::endpoint to_asio_endpoint (IP::Endpoint const& address)
|
||||
{ return IP::to_asio_endpoint (address); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
67
src/beast/beast/asio/impl/IPAddressConversion.cpp
Normal file
67
src/beast/beast/asio/impl/IPAddressConversion.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "../IPAddressConversion.h"
|
||||
|
||||
namespace beast {
|
||||
namespace IP {
|
||||
|
||||
Endpoint from_asio (boost::asio::ip::address const& address)
|
||||
{
|
||||
if (address.is_v4 ())
|
||||
{
|
||||
boost::asio::ip::address_v4::bytes_type const bytes (
|
||||
address.to_v4().to_bytes());
|
||||
return Endpoint (AddressV4 (
|
||||
bytes [0], bytes [1], bytes [2], bytes [3]));
|
||||
}
|
||||
|
||||
// VFALCO TODO IPv6 support
|
||||
bassertfalse;
|
||||
return Endpoint();
|
||||
}
|
||||
|
||||
Endpoint from_asio (boost::asio::ip::tcp::endpoint const& endpoint)
|
||||
{
|
||||
return from_asio (endpoint.address()).at_port (endpoint.port());
|
||||
}
|
||||
|
||||
boost::asio::ip::address to_asio_address (Endpoint const& endpoint)
|
||||
{
|
||||
if (endpoint.address().is_v4())
|
||||
{
|
||||
return boost::asio::ip::address (
|
||||
boost::asio::ip::address_v4 (
|
||||
endpoint.address().to_v4().value));
|
||||
}
|
||||
|
||||
// VFALCO TODO IPv6 support
|
||||
bassertfalse;
|
||||
return boost::asio::ip::address (
|
||||
boost::asio::ip::address_v6 ());
|
||||
}
|
||||
|
||||
boost::asio::ip::tcp::endpoint to_asio_endpoint (Endpoint const& endpoint)
|
||||
{
|
||||
return boost::asio::ip::tcp::endpoint (
|
||||
to_asio_address (endpoint), endpoint.port());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
245
src/beast/beast/asio/io_latency_probe.h
Normal file
245
src/beast/beast/asio/io_latency_probe.h
Normal file
@@ -0,0 +1,245 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_ASIO_IO_LATENCY_PROBE_H_INCLUDED
|
||||
#define BEAST_ASIO_IO_LATENCY_PROBE_H_INCLUDED
|
||||
|
||||
#include <chrono>
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <boost/asio/deadline_timer.hpp>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Measures handler latency on an io_service queue. */
|
||||
template <class Clock>
|
||||
class io_latency_probe
|
||||
{
|
||||
private:
|
||||
typedef typename Clock::duration duration;
|
||||
typedef typename Clock::time_point time_point;
|
||||
|
||||
std::recursive_mutex m_mutex;
|
||||
std::condition_variable_any m_cond;
|
||||
std::size_t m_count;
|
||||
duration const m_period;
|
||||
boost::asio::io_service& m_ios;
|
||||
boost::asio::deadline_timer m_timer;
|
||||
bool m_cancel;
|
||||
|
||||
public:
|
||||
io_latency_probe (duration const& period,
|
||||
boost::asio::io_service& ios)
|
||||
: m_count (1)
|
||||
, m_period (period)
|
||||
, m_ios (ios)
|
||||
, m_timer (m_ios)
|
||||
, m_cancel (false)
|
||||
{
|
||||
}
|
||||
|
||||
~io_latency_probe ()
|
||||
{
|
||||
std::unique_lock <decltype (m_mutex)> lock (m_mutex);
|
||||
cancel (lock, true);
|
||||
}
|
||||
|
||||
/** Return the io_service associated with the latency probe. */
|
||||
/** @{ */
|
||||
boost::asio::io_service& get_io_service ()
|
||||
{
|
||||
return m_ios;
|
||||
}
|
||||
|
||||
boost::asio::io_service const& get_io_service () const
|
||||
{
|
||||
return m_ios;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Cancel all pending i/o.
|
||||
Any handlers which have already been queued will still be called.
|
||||
*/
|
||||
/** @{ */
|
||||
void cancel ()
|
||||
{
|
||||
std::unique_lock <decltype(m_mutex)> lock (m_mutex);
|
||||
cancel (lock, true);
|
||||
}
|
||||
|
||||
void cancel_async ()
|
||||
{
|
||||
std::unique_lock <decltype(m_mutex)> lock (m_mutex);
|
||||
cancel (lock, false);
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Measure one sample of i/o latency.
|
||||
Handler will be called with this signature:
|
||||
void Handler (Duration d);
|
||||
*/
|
||||
template <class Handler>
|
||||
void sample_one (Handler&& handler)
|
||||
{
|
||||
std::lock_guard <decltype(m_mutex)> lock (m_mutex);
|
||||
if (m_cancel)
|
||||
throw std::logic_error ("io_latency_probe is canceled");
|
||||
m_ios.post (sample_op <Handler> (
|
||||
std::forward <Handler> (handler),
|
||||
Clock::now(), false, this));
|
||||
}
|
||||
|
||||
/** Initiate continuous i/o latency sampling.
|
||||
Handler will be called with this signature:
|
||||
void Handler (std::chrono::milliseconds);
|
||||
*/
|
||||
template <class Handler>
|
||||
void sample (Handler&& handler)
|
||||
{
|
||||
std::lock_guard <decltype(m_mutex)> lock (m_mutex);
|
||||
if (m_cancel)
|
||||
throw std::logic_error ("io_latency_probe is canceled");
|
||||
m_ios.post (sample_op <Handler> (
|
||||
std::forward <Handler> (handler),
|
||||
Clock::now(), true, this));
|
||||
}
|
||||
|
||||
private:
|
||||
void cancel (std::unique_lock <decltype (m_mutex)>& lock,
|
||||
bool wait)
|
||||
{
|
||||
if (! m_cancel)
|
||||
{
|
||||
--m_count;
|
||||
m_cancel = true;
|
||||
}
|
||||
|
||||
if (wait)
|
||||
#ifdef BOOST_NO_CXX11_LAMBDAS
|
||||
while (m_count != 0)
|
||||
m_cond.wait (lock);
|
||||
#else
|
||||
m_cond.wait (lock, [this] {
|
||||
return this->m_count == 0; });
|
||||
#endif
|
||||
}
|
||||
|
||||
void addref ()
|
||||
{
|
||||
std::lock_guard <decltype(m_mutex)> lock (m_mutex);
|
||||
++m_count;
|
||||
}
|
||||
|
||||
void release ()
|
||||
{
|
||||
std::lock_guard <decltype(m_mutex)> lock (m_mutex);
|
||||
if (--m_count == 0)
|
||||
m_cond.notify_all ();
|
||||
}
|
||||
|
||||
template <class Handler>
|
||||
struct sample_op
|
||||
{
|
||||
Handler m_handler;
|
||||
time_point m_start;
|
||||
bool m_repeat;
|
||||
io_latency_probe* m_probe;
|
||||
|
||||
sample_op (Handler const& handler, time_point const& start,
|
||||
bool repeat, io_latency_probe* probe)
|
||||
: m_handler (handler)
|
||||
, m_start (start)
|
||||
, m_repeat (repeat)
|
||||
, m_probe (probe)
|
||||
{
|
||||
m_probe->addref();
|
||||
}
|
||||
|
||||
sample_op (sample_op const& other)
|
||||
: m_handler (other.m_handler)
|
||||
, m_start (other.m_start)
|
||||
, m_probe (other.m_probe)
|
||||
{
|
||||
m_probe->addref();
|
||||
}
|
||||
|
||||
~sample_op ()
|
||||
{
|
||||
m_probe->release();
|
||||
}
|
||||
|
||||
void operator() () const
|
||||
{
|
||||
typename Clock::time_point const now (Clock::now());
|
||||
typename Clock::duration const elapsed (now - m_start);
|
||||
|
||||
m_handler (elapsed);
|
||||
|
||||
{
|
||||
std::lock_guard <decltype (m_probe->m_mutex)
|
||||
> lock (m_probe->m_mutex);
|
||||
if (m_probe->m_cancel)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_repeat)
|
||||
{
|
||||
// Calculate when we want to sample again, and
|
||||
// adjust for the expected latency.
|
||||
//
|
||||
typename Clock::time_point const when (
|
||||
now + m_probe->m_period - 2 * elapsed);
|
||||
|
||||
if (when <= now)
|
||||
{
|
||||
// The latency is too high to maintain the desired
|
||||
// period so don't bother with a timer.
|
||||
//
|
||||
m_probe->m_ios.post (sample_op <Handler> (
|
||||
m_handler, now, m_repeat, m_probe));
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::posix_time::microseconds mms (
|
||||
std::chrono::duration_cast <
|
||||
std::chrono::microseconds> (
|
||||
when - now).count ());
|
||||
m_probe->m_timer.expires_from_now (mms);
|
||||
m_probe->m_timer.async_wait (sample_op <Handler> (
|
||||
m_handler, now, m_repeat, m_probe));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void operator () (boost::system::error_code const& ec)
|
||||
{
|
||||
typename Clock::time_point const now (Clock::now());
|
||||
m_probe->m_ios.post (sample_op <Handler> (
|
||||
m_handler, now, m_repeat, m_probe));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "beast_crypto.h"
|
||||
#include "ErrorCode.h"
|
||||
|
||||
namespace beast
|
||||
{
|
||||
namespace detail {
|
||||
|
||||
#include "math/BinaryEncoding.cpp"
|
||||
#include "math/UnsignedInteger.cpp"
|
||||
// to squelch linker warnings
|
||||
int boostUnusedVariable = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -17,30 +17,19 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_REMOVECONST_H_INCLUDED
|
||||
#define BEAST_MPL_REMOVECONST_H_INCLUDED
|
||||
#ifndef BEAST_BOOST_ERRORCODE_H_INCLUDED
|
||||
#define BEAST_BOOST_ERRORCODE_H_INCLUDED
|
||||
|
||||
// Ideas based on boost
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
|
||||
/** Remove the `const` qualifier from a type. */
|
||||
/** @{ */
|
||||
template <typename T>
|
||||
struct RemoveConst
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
// Lift this into our namespace. For now we will
|
||||
// use boost, and then switch to std::error_code when
|
||||
// it is available on all our supported platforms.
|
||||
//
|
||||
typedef boost::system::error_code ErrorCode;
|
||||
|
||||
template <typename T>
|
||||
struct RemoveConst <T const>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
159
src/beast/beast/chrono/CPUMeter.h
Normal file
159
src/beast/beast/chrono/CPUMeter.h
Normal file
@@ -0,0 +1,159 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CHRONO_CPUMETER_H_INCLUDED
|
||||
#define BEAST_CHRONO_CPUMETER_H_INCLUDED
|
||||
|
||||
#include "RelativeTime.h"
|
||||
#include "ScopedTimeInterval.h"
|
||||
#include "../threads/SharedData.h"
|
||||
#include "../Atomic.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Measurements of CPU utilization. */
|
||||
class CPUMeter
|
||||
{
|
||||
private:
|
||||
struct MeasureIdle
|
||||
{
|
||||
explicit MeasureIdle (CPUMeter& meter)
|
||||
: m_meter (&meter)
|
||||
{ }
|
||||
void operator() (RelativeTime const& interval) const
|
||||
{ m_meter->addIdleTime (interval); }
|
||||
CPUMeter* m_meter;
|
||||
};
|
||||
|
||||
struct MeasureActive
|
||||
{
|
||||
explicit MeasureActive (CPUMeter& meter)
|
||||
: m_meter (&meter)
|
||||
{ }
|
||||
void operator() (RelativeTime const& interval) const
|
||||
{ m_meter->addActiveTime (interval); }
|
||||
CPUMeter* m_meter;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
// The amount of time an aggregate must accrue before a swap
|
||||
secondsPerAggregate = 3
|
||||
|
||||
// The number of aggregates in the rolling history buffer
|
||||
,numberOfAggregates = 20
|
||||
};
|
||||
|
||||
// Aggregated sample data
|
||||
struct Aggregate
|
||||
{
|
||||
RelativeTime idle;
|
||||
RelativeTime active;
|
||||
|
||||
// Returns the total number of seconds in the aggregate
|
||||
double seconds () const
|
||||
{ return idle.inSeconds() + active.inSeconds(); }
|
||||
|
||||
// Reset the accumulated times
|
||||
void clear ()
|
||||
{ idle = RelativeTime (0); active = RelativeTime (0); }
|
||||
|
||||
Aggregate& operator+= (Aggregate const& other)
|
||||
{ idle += other.idle; active += other.active; return *this; }
|
||||
|
||||
Aggregate& operator-= (Aggregate const& other)
|
||||
{ idle -= other.idle; active -= other.active; return *this; }
|
||||
};
|
||||
|
||||
struct State
|
||||
{
|
||||
State () : index (0)
|
||||
{
|
||||
}
|
||||
|
||||
// Returns a reference to the current aggregate
|
||||
Aggregate& front ()
|
||||
{
|
||||
return history [index];
|
||||
}
|
||||
|
||||
// Checks the current aggregate to see if we should advance
|
||||
void update()
|
||||
{
|
||||
if (front().seconds() >= secondsPerAggregate)
|
||||
advance();
|
||||
}
|
||||
|
||||
// Advance the index in the rolling history
|
||||
void advance ()
|
||||
{
|
||||
usage += history [index];
|
||||
index = (index+1) % numberOfAggregates;
|
||||
usage -= history [index];
|
||||
history [index].clear ();
|
||||
}
|
||||
|
||||
// Index of the current aggregate we are accumulating
|
||||
int index;
|
||||
|
||||
// Delta summed usage over the entire history buffer
|
||||
Aggregate usage;
|
||||
|
||||
// The rolling history buffer
|
||||
Aggregate history [numberOfAggregates];
|
||||
};
|
||||
|
||||
typedef SharedData <State> SharedState;
|
||||
|
||||
SharedState m_state;
|
||||
|
||||
void addIdleTime (RelativeTime const& interval)
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
state->front().idle += interval;
|
||||
state->update();
|
||||
}
|
||||
|
||||
void addActiveTime (RelativeTime const& interval)
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
state->front().active += interval;
|
||||
state->update();
|
||||
}
|
||||
|
||||
public:
|
||||
/** The type of container that measures idle time. */
|
||||
typedef ScopedTimeInterval <MeasureIdle> ScopedIdleTime;
|
||||
typedef ScopedTimeInterval <MeasureActive> ScopedActiveTime;
|
||||
|
||||
/** Returns the fraction of time that the CPU is being used. */
|
||||
double getUtilization () const
|
||||
{
|
||||
SharedState::ConstAccess state (m_state);
|
||||
|
||||
double const seconds (state->usage.seconds());
|
||||
if (seconds > 0)
|
||||
return (state->usage.active.inSeconds() / seconds);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -19,4 +19,12 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "../Config.h"
|
||||
#include "../../modules/beast_core/beast_core.h" // for UnitTest
|
||||
|
||||
#include "impl/abstract_clock.cpp"
|
||||
#include "impl/chrono_io.cpp"
|
||||
#include "impl/basic_seconds_clock.cpp"
|
||||
|
||||
#include "impl/CPUMeter.cpp"
|
||||
#include "impl/RelativeTime.cpp"
|
||||
|
||||
@@ -43,13 +43,22 @@ namespace beast {
|
||||
class BEAST_API RelativeTime
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** The underlying data type used by RelativeTime.
|
||||
|
||||
If you need to get to the underlying time and manipulate it
|
||||
you can use this to declare a type that is guaranteed to
|
||||
work cleanly.
|
||||
*/
|
||||
typedef double value_type;
|
||||
|
||||
//==============================================================================
|
||||
/** Creates a RelativeTime.
|
||||
|
||||
@param seconds the number of seconds, which may be +ve or -ve.
|
||||
@see milliseconds, minutes, hours, days, weeks
|
||||
*/
|
||||
explicit RelativeTime (double seconds = 0.0) noexcept;
|
||||
explicit RelativeTime (value_type seconds = 0.0) noexcept;
|
||||
|
||||
/** Copies another relative time. */
|
||||
RelativeTime (const RelativeTime& other) noexcept;
|
||||
@@ -60,6 +69,12 @@ public:
|
||||
/** Destructor. */
|
||||
~RelativeTime() noexcept;
|
||||
|
||||
bool isZero() const
|
||||
{ return numSeconds == 0; }
|
||||
|
||||
bool isNotZero() const
|
||||
{ return numSeconds != 0; }
|
||||
|
||||
/** Returns the amount of time since the process was started. */
|
||||
static RelativeTime fromStartup ();
|
||||
|
||||
@@ -77,27 +92,27 @@ public:
|
||||
/** Creates a new RelativeTime object representing a number of seconds.
|
||||
@see milliseconds, minutes, hours, days, weeks
|
||||
*/
|
||||
static RelativeTime seconds (double seconds) noexcept;
|
||||
static RelativeTime seconds (value_type seconds) noexcept;
|
||||
|
||||
/** Creates a new RelativeTime object representing a number of minutes.
|
||||
@see milliseconds, hours, days, weeks
|
||||
*/
|
||||
static RelativeTime minutes (double numberOfMinutes) noexcept;
|
||||
static RelativeTime minutes (value_type numberOfMinutes) noexcept;
|
||||
|
||||
/** Creates a new RelativeTime object representing a number of hours.
|
||||
@see milliseconds, minutes, days, weeks
|
||||
*/
|
||||
static RelativeTime hours (double numberOfHours) noexcept;
|
||||
static RelativeTime hours (value_type numberOfHours) noexcept;
|
||||
|
||||
/** Creates a new RelativeTime object representing a number of days.
|
||||
@see milliseconds, minutes, hours, weeks
|
||||
*/
|
||||
static RelativeTime days (double numberOfDays) noexcept;
|
||||
static RelativeTime days (value_type numberOfDays) noexcept;
|
||||
|
||||
/** Creates a new RelativeTime object representing a number of weeks.
|
||||
@see milliseconds, minutes, hours, days
|
||||
*/
|
||||
static RelativeTime weeks (double numberOfWeeks) noexcept;
|
||||
static RelativeTime weeks (value_type numberOfWeeks) noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the number of milliseconds this time represents.
|
||||
@@ -108,27 +123,27 @@ public:
|
||||
/** Returns the number of seconds this time represents.
|
||||
@see inMilliseconds, inMinutes, inHours, inDays, inWeeks
|
||||
*/
|
||||
double inSeconds() const noexcept { return numSeconds; }
|
||||
value_type inSeconds() const noexcept { return numSeconds; }
|
||||
|
||||
/** Returns the number of minutes this time represents.
|
||||
@see inMilliseconds, inSeconds, inHours, inDays, inWeeks
|
||||
*/
|
||||
double inMinutes() const noexcept;
|
||||
value_type inMinutes() const noexcept;
|
||||
|
||||
/** Returns the number of hours this time represents.
|
||||
@see inMilliseconds, inSeconds, inMinutes, inDays, inWeeks
|
||||
*/
|
||||
double inHours() const noexcept;
|
||||
value_type inHours() const noexcept;
|
||||
|
||||
/** Returns the number of days this time represents.
|
||||
@see inMilliseconds, inSeconds, inMinutes, inHours, inWeeks
|
||||
*/
|
||||
double inDays() const noexcept;
|
||||
value_type inDays() const noexcept;
|
||||
|
||||
/** Returns the number of weeks this time represents.
|
||||
@see inMilliseconds, inSeconds, inMinutes, inHours, inDays
|
||||
*/
|
||||
double inWeeks() const noexcept;
|
||||
value_type inWeeks() const noexcept;
|
||||
|
||||
/** Returns a readable textual description of the time.
|
||||
|
||||
@@ -148,10 +163,12 @@ public:
|
||||
String getDescription (const String& returnValueForZeroTime = "0") const;
|
||||
std::string to_string () const;
|
||||
|
||||
RelativeTime operator+ (double seconds) const noexcept
|
||||
template <typename Number>
|
||||
RelativeTime operator+ (Number seconds) const noexcept
|
||||
{ return RelativeTime (numSeconds + seconds); }
|
||||
|
||||
RelativeTime operator- (double seconds) const noexcept
|
||||
template <typename Number>
|
||||
RelativeTime operator- (Number seconds) const noexcept
|
||||
{ return RelativeTime (numSeconds - seconds); }
|
||||
|
||||
/** Adds another RelativeTime to this one. */
|
||||
@@ -161,13 +178,13 @@ public:
|
||||
RelativeTime operator-= (RelativeTime timeToSubtract) noexcept;
|
||||
|
||||
/** Adds a number of seconds to this time. */
|
||||
RelativeTime operator+= (double secondsToAdd) noexcept;
|
||||
RelativeTime operator+= (value_type secondsToAdd) noexcept;
|
||||
|
||||
/** Subtracts a number of seconds from this time. */
|
||||
RelativeTime operator-= (double secondsToSubtract) noexcept;
|
||||
RelativeTime operator-= (value_type secondsToSubtract) noexcept;
|
||||
|
||||
private:
|
||||
double numSeconds;
|
||||
value_type numSeconds;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -17,47 +17,46 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_GLOBALFIFOFREESTORE_H_INCLUDED
|
||||
#define BEAST_GLOBALFIFOFREESTORE_H_INCLUDED
|
||||
#ifndef BEAST_CHRONO_SCOPEDTIMEINTERVAL_H_INCLUDED
|
||||
#define BEAST_CHRONO_SCOPEDTIMEINTERVAL_H_INCLUDED
|
||||
|
||||
/*============================================================================*/
|
||||
/**
|
||||
A @ref FifoFreeStoreType singleton.
|
||||
#include "../Uncopyable.h"
|
||||
#include "RelativeTime.h"
|
||||
|
||||
@ingroup beast_concurrent
|
||||
namespace beast {
|
||||
|
||||
/** Time measurement using scoped RAII container.
|
||||
UnaryFunction will be called with this signature:
|
||||
void (RelativeTime const& interval);
|
||||
*/
|
||||
template <class Tag>
|
||||
class GlobalFifoFreeStore
|
||||
template <class UnaryFunction>
|
||||
class ScopedTimeInterval : public Uncopyable
|
||||
{
|
||||
public:
|
||||
inline void* allocate (size_t bytes)
|
||||
{
|
||||
return m_allocator.allocate (bytes);
|
||||
}
|
||||
|
||||
static inline void deallocate (void* const p)
|
||||
{
|
||||
FifoFreeStoreType::deallocate (p);
|
||||
}
|
||||
|
||||
typedef SharedPtr <SharedSingleton <GlobalFifoFreeStore> > Ptr;
|
||||
|
||||
static Ptr getInstance ()
|
||||
{
|
||||
return SharedSingleton <GlobalFifoFreeStore>::getInstance();
|
||||
}
|
||||
|
||||
public:
|
||||
GlobalFifoFreeStore ()
|
||||
/** Create the measurement with a default-constructed UnaryFunction. */
|
||||
ScopedTimeInterval ()
|
||||
: m_start (RelativeTime::fromStartup())
|
||||
{
|
||||
}
|
||||
|
||||
~GlobalFifoFreeStore ()
|
||||
/** Create the measurement with UnaryFunction constructed from one argument. */
|
||||
template <typename Arg>
|
||||
explicit ScopedTimeInterval (Arg& arg)
|
||||
: m_func (arg)
|
||||
, m_start (RelativeTime::fromStartup ())
|
||||
{
|
||||
}
|
||||
|
||||
~ScopedTimeInterval ()
|
||||
{
|
||||
m_func (RelativeTime::fromStartup() - m_start);
|
||||
}
|
||||
|
||||
private:
|
||||
FifoFreeStoreType m_allocator;
|
||||
UnaryFunction m_func;
|
||||
RelativeTime m_start;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
166
src/beast/beast/chrono/abstract_clock.h
Normal file
166
src/beast/beast/chrono/abstract_clock.h
Normal file
@@ -0,0 +1,166 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CHRONO_ABSTRACT_CLOCK_H_INCLUDED
|
||||
#define BEAST_CHRONO_ABSTRACT_CLOCK_H_INCLUDED
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "chrono_io.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Abstract interface to a clock.
|
||||
|
||||
The abstract clock interface allows a dependency injection to take
|
||||
place so that the choice of implementation can be made at run-time
|
||||
instead of compile time. The trade-off is that the Duration used to
|
||||
represent the clock must be chosen at compile time and cannot be
|
||||
changed. This includes both the choice of representation (integers
|
||||
for example) and the period in ticks corresponding to one second.
|
||||
|
||||
Example:
|
||||
|
||||
@code
|
||||
|
||||
struct Implementation
|
||||
{
|
||||
abstract_clock <std::chrono::seconds>& m_clock;
|
||||
|
||||
// Dependency injection
|
||||
//
|
||||
explicit Implementation (
|
||||
abstract_clock <std::chrono::seconds>& clock)
|
||||
: m_clock (clock)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@endcode
|
||||
|
||||
@tparam The length of time, in seconds, corresponding to one tick.
|
||||
*/
|
||||
template <class Duration>
|
||||
class abstract_clock
|
||||
{
|
||||
public:
|
||||
typedef typename Duration::rep rep;
|
||||
typedef typename Duration::period period;
|
||||
typedef Duration duration;
|
||||
typedef std::chrono::time_point <
|
||||
abstract_clock, duration> time_point;
|
||||
|
||||
virtual ~abstract_clock () { }
|
||||
|
||||
/** Returns `true` if this is a steady clock. */
|
||||
virtual bool is_steady () const = 0;
|
||||
|
||||
/** Returns the current time. */
|
||||
virtual time_point now () const = 0;
|
||||
|
||||
/** Convert the specified time point to a string. */
|
||||
/** @{ */
|
||||
virtual std::string to_string (time_point const& tp) const = 0;
|
||||
|
||||
template <class Duration2>
|
||||
std::string to_string (
|
||||
std::chrono::time_point <abstract_clock, Duration2> const& tp) const
|
||||
{
|
||||
return to_string (
|
||||
std::chrono::time_point_cast <Duration> (tp));
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Returning elapsed ticks since the epoch. */
|
||||
rep elapsed () const
|
||||
{
|
||||
return now().time_since_epoch().count();
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <class TrivialClock, class Duration>
|
||||
struct basic_abstract_clock_wrapper : public abstract_clock <Duration>
|
||||
{
|
||||
using typename abstract_clock <Duration>::duration;
|
||||
using typename abstract_clock <Duration>::time_point;
|
||||
|
||||
bool is_steady () const
|
||||
{
|
||||
return TrivialClock::is_steady;
|
||||
}
|
||||
|
||||
time_point now () const
|
||||
{
|
||||
return time_point (duration (
|
||||
std::chrono::duration_cast <duration> (
|
||||
TrivialClock::now().time_since_epoch ()).count ()));
|
||||
}
|
||||
};
|
||||
|
||||
template <class TrivialClock, class Duration>
|
||||
struct abstract_clock_wrapper
|
||||
: public basic_abstract_clock_wrapper <TrivialClock, Duration>
|
||||
{
|
||||
// generic conversion displays the duration
|
||||
std::string to_string (typename basic_abstract_clock_wrapper <
|
||||
TrivialClock, Duration>::time_point const& tp) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << tp.time_since_epoch();
|
||||
return ss.str ();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
template <class Duration>
|
||||
struct abstract_clock_wrapper <std::chrono::system_clock, Duration>
|
||||
: public basic_abstract_clock_wrapper <std::chrono::system_clock, Duration>
|
||||
{
|
||||
typedef std::chrono::system_clock clock_type;
|
||||
std::string to_string (time_point const& tp)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << clock_type::time_point (tp.time_since_epoch ());
|
||||
return ss.str ();
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Retrieve a discrete clock for a type implementing the Clock concept.
|
||||
The interface is created as an object with static storage duration.
|
||||
*/
|
||||
template <class TrivialClock, class Duration>
|
||||
abstract_clock <Duration>& get_abstract_clock ()
|
||||
{
|
||||
static detail::abstract_clock_wrapper <
|
||||
TrivialClock, Duration> clock;
|
||||
return clock;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
237
src/beast/beast/chrono/basic_seconds_clock.h
Normal file
237
src/beast/beast/chrono/basic_seconds_clock.h
Normal file
@@ -0,0 +1,237 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CHRONO_BASIC_SECONDS_CLOCK_H_INCLUDED
|
||||
#define BEAST_CHRONO_BASIC_SECONDS_CLOCK_H_INCLUDED
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
|
||||
#ifndef BEAST_BASIC_SECONDS_CLOCK_BOOST_WORKAROUND
|
||||
# ifdef _MSC_VER
|
||||
// Visual Studio 2012, 2013 have a bug in std::thread that
|
||||
// causes a hang on exit, in the library function atexit()
|
||||
# if BEAST_USE_BOOST_FEATURES
|
||||
# define BEAST_BASIC_SECONDS_CLOCK_BOOST_WORKAROUND 1
|
||||
# else
|
||||
# define BEAST_BASIC_SECONDS_CLOCK_BOOST_WORKAROUND 0
|
||||
# endif
|
||||
# else
|
||||
# define BEAST_BASIC_SECONDS_CLOCK_BOOST_WORKAROUND 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BEAST_BASIC_SECONDS_CLOCK_BOOST_WORKAROUND
|
||||
# include <boost/version.hpp>
|
||||
# if BOOST_VERSION >= 105500
|
||||
# include <boost/thread/thread.hpp>
|
||||
# include <boost/thread/mutex.hpp>
|
||||
# include <boost/thread/condition_variable.hpp>
|
||||
# include <boost/chrono.hpp>
|
||||
# else
|
||||
# error "Boost version 1.55.0 or later is required"
|
||||
# endif
|
||||
#else
|
||||
# include <condition_variable>
|
||||
# include <mutex>
|
||||
# include <thread>
|
||||
#endif
|
||||
|
||||
#include "../chrono/chrono_util.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
namespace detail {
|
||||
|
||||
class seconds_clock_worker
|
||||
{
|
||||
public:
|
||||
virtual void sample () = 0;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Updates the clocks
|
||||
class seconds_clock_thread
|
||||
{
|
||||
public:
|
||||
#if BEAST_BASIC_SECONDS_CLOCK_BOOST_WORKAROUND
|
||||
typedef boost::mutex mutex;
|
||||
typedef boost::condition_variable cond_var;
|
||||
typedef boost::lock_guard <mutex> lock_guard;
|
||||
typedef boost::unique_lock <mutex> unique_lock;
|
||||
typedef boost::chrono::steady_clock clock_type;
|
||||
typedef boost::chrono::seconds seconds;
|
||||
typedef boost::thread thread;
|
||||
#else
|
||||
typedef std::mutex mutex;
|
||||
typedef std::condition_variable cond_var;
|
||||
typedef std::lock_guard <mutex> lock_guard;
|
||||
typedef std::unique_lock <mutex> unique_lock;
|
||||
typedef std::chrono::steady_clock clock_type;
|
||||
typedef std::chrono::seconds seconds;
|
||||
typedef std::thread thread;
|
||||
#endif
|
||||
typedef std::vector <seconds_clock_worker*> workers;
|
||||
|
||||
bool m_stop;
|
||||
mutex m_mutex;
|
||||
cond_var m_cond;
|
||||
workers m_workers;
|
||||
thread m_thread;
|
||||
|
||||
seconds_clock_thread ()
|
||||
: m_stop (false)
|
||||
{
|
||||
m_thread = thread (std::bind(
|
||||
&seconds_clock_thread::run, this));
|
||||
}
|
||||
|
||||
~seconds_clock_thread ()
|
||||
{
|
||||
{
|
||||
lock_guard lock (m_mutex);
|
||||
m_stop = true;
|
||||
}
|
||||
m_cond.notify_all();
|
||||
m_thread.join ();
|
||||
}
|
||||
|
||||
void add (seconds_clock_worker& w)
|
||||
{
|
||||
lock_guard lock (m_mutex);
|
||||
m_workers.push_back (&w);
|
||||
}
|
||||
|
||||
void remove (seconds_clock_worker& w)
|
||||
{
|
||||
lock_guard lock (m_mutex);
|
||||
m_workers.erase (std::find (
|
||||
m_workers.begin (), m_workers.end(), &w));
|
||||
}
|
||||
|
||||
void run ()
|
||||
{
|
||||
unique_lock lock (m_mutex);;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
for (auto iter : m_workers)
|
||||
iter->sample();
|
||||
|
||||
clock_type::time_point const when (
|
||||
floor <seconds> (
|
||||
clock_type::now().time_since_epoch()) +
|
||||
seconds (1));
|
||||
|
||||
if (m_cond.wait_until (lock, when, [this]{ return m_stop; }))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static seconds_clock_thread& instance ()
|
||||
{
|
||||
static seconds_clock_thread singleton;
|
||||
return singleton;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** A clock whose minimum resolution is one second.
|
||||
The purpose of this class is to optimize the performance of the now()
|
||||
member function call. It uses a dedicated thread that wakes up at least
|
||||
once per second to sample the requested trivial clock.
|
||||
@tparam TrivialClock The clock to sample.
|
||||
*/
|
||||
template <class TrivialClock>
|
||||
class basic_seconds_clock
|
||||
{
|
||||
public:
|
||||
typedef std::chrono::seconds resolution;
|
||||
typedef typename resolution::rep rep;
|
||||
typedef typename resolution::period period;
|
||||
typedef std::chrono::duration <rep, period> duration;
|
||||
typedef std::chrono::time_point <basic_seconds_clock> time_point;
|
||||
|
||||
static bool const is_steady = TrivialClock::is_steady;
|
||||
|
||||
static time_point now ()
|
||||
{
|
||||
// Make sure the thread is constructed before the
|
||||
// worker otherwise we will crash during destruction
|
||||
// of objects with static storage duration.
|
||||
struct initializer
|
||||
{
|
||||
initializer ()
|
||||
{
|
||||
detail::seconds_clock_thread::instance();
|
||||
}
|
||||
};
|
||||
static initializer init;
|
||||
|
||||
struct worker : detail::seconds_clock_worker
|
||||
{
|
||||
typedef std::mutex mutex;
|
||||
typedef std::lock_guard <mutex> lock_guard;
|
||||
|
||||
time_point m_now;
|
||||
mutex m_mutex;
|
||||
|
||||
static time_point get_now ()
|
||||
{
|
||||
return time_point (floor <resolution> (
|
||||
TrivialClock::now().time_since_epoch()));
|
||||
}
|
||||
|
||||
worker ()
|
||||
: m_now (get_now ())
|
||||
{
|
||||
detail::seconds_clock_thread::instance().add (*this);
|
||||
}
|
||||
|
||||
~worker ()
|
||||
{
|
||||
detail::seconds_clock_thread::instance().remove (*this);
|
||||
}
|
||||
|
||||
time_point now()
|
||||
{
|
||||
lock_guard lock (m_mutex);
|
||||
return m_now;
|
||||
}
|
||||
|
||||
void sample ()
|
||||
{
|
||||
lock_guard lock (m_mutex);
|
||||
m_now = get_now ();
|
||||
}
|
||||
};
|
||||
|
||||
static worker w;
|
||||
|
||||
return w.now ();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
1089
src/beast/beast/chrono/chrono_io.h
Normal file
1089
src/beast/beast/chrono/chrono_io.h
Normal file
File diff suppressed because it is too large
Load Diff
66
src/beast/beast/chrono/chrono_util.h
Normal file
66
src/beast/beast/chrono/chrono_util.h
Normal file
@@ -0,0 +1,66 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CHRONO_UTIL_H_INCLUDED
|
||||
#define BEAST_CHRONO_UTIL_H_INCLUDED
|
||||
|
||||
// From Howard Hinnant
|
||||
// http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html
|
||||
|
||||
// round down
|
||||
template <class To, class Rep, class Period>
|
||||
To floor(std::chrono::duration <Rep, Period> const& d)
|
||||
{
|
||||
To t = std::chrono::duration_cast<To>(d);
|
||||
if (t > d)
|
||||
--t;
|
||||
return t;
|
||||
}
|
||||
|
||||
// round to nearest, to even on tie
|
||||
template <class To, class Rep, class Period>
|
||||
To round (std::chrono::duration <Rep, Period> const& d)
|
||||
{
|
||||
To t0 = std::chrono::duration_cast<To>(d);
|
||||
To t1 = t0;
|
||||
++t1;
|
||||
auto diff0 = d - t0;
|
||||
auto diff1 = t1 - d;
|
||||
if (diff0 == diff1)
|
||||
{
|
||||
if (t0.count() & 1)
|
||||
return t1;
|
||||
return t0;
|
||||
}
|
||||
else if (diff0 < diff1)
|
||||
return t0;
|
||||
return t1;
|
||||
}
|
||||
|
||||
// round up
|
||||
template <class To, class Rep, class Period>
|
||||
To ceil (std::chrono::duration <Rep, Period> const& d)
|
||||
{
|
||||
To t = std::chrono::duration_cast<To>(d);
|
||||
if (t < d)
|
||||
++t;
|
||||
return t;
|
||||
}
|
||||
|
||||
#endif
|
||||
21
src/beast/beast/chrono/impl/CPUMeter.cpp
Normal file
21
src/beast/beast/chrono/impl/CPUMeter.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "../CPUMeter.h"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace beast {
|
||||
|
||||
RelativeTime::RelativeTime (const double secs) noexcept
|
||||
RelativeTime::RelativeTime (const RelativeTime::value_type secs) noexcept
|
||||
: numSeconds (secs)
|
||||
{
|
||||
}
|
||||
@@ -59,27 +59,27 @@ RelativeTime RelativeTime::milliseconds (const int64 milliseconds) noexcept
|
||||
return RelativeTime (milliseconds * 0.001);
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::seconds (double s) noexcept
|
||||
RelativeTime RelativeTime::seconds (RelativeTime::value_type s) noexcept
|
||||
{
|
||||
return RelativeTime (s);
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::minutes (const double numberOfMinutes) noexcept
|
||||
RelativeTime RelativeTime::minutes (const RelativeTime::value_type numberOfMinutes) noexcept
|
||||
{
|
||||
return RelativeTime (numberOfMinutes * 60.0);
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::hours (const double numberOfHours) noexcept
|
||||
RelativeTime RelativeTime::hours (const RelativeTime::value_type numberOfHours) noexcept
|
||||
{
|
||||
return RelativeTime (numberOfHours * (60.0 * 60.0));
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::days (const double numberOfDays) noexcept
|
||||
RelativeTime RelativeTime::days (const RelativeTime::value_type numberOfDays) noexcept
|
||||
{
|
||||
return RelativeTime (numberOfDays * (60.0 * 60.0 * 24.0));
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::weeks (const double numberOfWeeks) noexcept
|
||||
RelativeTime RelativeTime::weeks (const RelativeTime::value_type numberOfWeeks) noexcept
|
||||
{
|
||||
return RelativeTime (numberOfWeeks * (60.0 * 60.0 * 24.0 * 7.0));
|
||||
}
|
||||
@@ -91,22 +91,22 @@ int64 RelativeTime::inMilliseconds() const noexcept
|
||||
return (int64) (numSeconds * 1000.0);
|
||||
}
|
||||
|
||||
double RelativeTime::inMinutes() const noexcept
|
||||
RelativeTime::value_type RelativeTime::inMinutes() const noexcept
|
||||
{
|
||||
return numSeconds / 60.0;
|
||||
}
|
||||
|
||||
double RelativeTime::inHours() const noexcept
|
||||
RelativeTime::value_type RelativeTime::inHours() const noexcept
|
||||
{
|
||||
return numSeconds / (60.0 * 60.0);
|
||||
}
|
||||
|
||||
double RelativeTime::inDays() const noexcept
|
||||
RelativeTime::value_type RelativeTime::inDays() const noexcept
|
||||
{
|
||||
return numSeconds / (60.0 * 60.0 * 24.0);
|
||||
}
|
||||
|
||||
double RelativeTime::inWeeks() const noexcept
|
||||
RelativeTime::value_type RelativeTime::inWeeks() const noexcept
|
||||
{
|
||||
return numSeconds / (60.0 * 60.0 * 24.0 * 7.0);
|
||||
}
|
||||
@@ -125,12 +125,12 @@ RelativeTime RelativeTime::operator-= (RelativeTime t) noexcept
|
||||
numSeconds -= t.numSeconds; return *this;
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::operator+= (const double secs) noexcept
|
||||
RelativeTime RelativeTime::operator+= (const RelativeTime::value_type secs) noexcept
|
||||
{
|
||||
numSeconds += secs; return *this;
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::operator-= (const double secs) noexcept
|
||||
RelativeTime RelativeTime::operator-= (const RelativeTime::value_type secs) noexcept
|
||||
{
|
||||
numSeconds -= secs; return *this;
|
||||
}
|
||||
@@ -256,71 +256,126 @@ std::string RelativeTime::to_string () const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if BEAST_WINDOWS
|
||||
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
RelativeTime RelativeTime::fromStartup ()
|
||||
static double monotonicCurrentTimeInSeconds()
|
||||
{
|
||||
ULONGLONG ticks (GetTickCount64());
|
||||
|
||||
return RelativeTime (ticks / 1000.0);
|
||||
return GetTickCount64() / 1000.0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#elif BEAST_MAC || BEAST_IOS
|
||||
|
||||
#include <mach/mach_time.h>
|
||||
#include <mach/mach.h>
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
static double monotonicCurrentTimeInSeconds()
|
||||
{
|
||||
struct StaticInitializer
|
||||
{
|
||||
StaticInitializer ()
|
||||
{
|
||||
double numerator;
|
||||
double denominator;
|
||||
|
||||
mach_timebase_info_data_t timebase;
|
||||
(void) mach_timebase_info (&timebase);
|
||||
|
||||
if (timebase.numer % 1000000 == 0)
|
||||
{
|
||||
numerator = timebase.numer / 1000000.0;
|
||||
denominator = timebase.denom * 1000.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
numerator = timebase.numer;
|
||||
// VFALCO NOTE I don't understand this code
|
||||
//denominator = timebase.denom * (uint64) 1000000 * 1000.0;
|
||||
denominator = timebase.denom * 1000000000.0;
|
||||
}
|
||||
|
||||
ratio = numerator / denominator;
|
||||
}
|
||||
|
||||
double ratio;
|
||||
};
|
||||
|
||||
static StaticInitializer const data;
|
||||
|
||||
return mach_absolute_time() * data.ratio;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
#include <time.h>
|
||||
|
||||
namespace beast {
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Converts a timespec to a RelativeTme
|
||||
static RelativeTime toRelativeTime (timespec const& ts)
|
||||
static double monotonicCurrentTimeInSeconds()
|
||||
{
|
||||
return RelativeTime (ts.tv_sec +
|
||||
ts.tv_nsec / 1000000000.0);
|
||||
timespec t;
|
||||
clock_gettime (CLOCK_MONOTONIC, &t);
|
||||
return t.tv_sec + t.tv_nsec / 1000000000.0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
// Records and returns the time from process startup
|
||||
static RelativeTime getStartupTime()
|
||||
static double getStartupTime()
|
||||
{
|
||||
struct StartupTime
|
||||
{
|
||||
StartupTime ()
|
||||
{ clock_gettime (CLOCK_MONOTONIC, &ts); }
|
||||
timespec ts;
|
||||
};
|
||||
struct StaticInitializer
|
||||
{
|
||||
StaticInitializer ()
|
||||
{
|
||||
when = detail::monotonicCurrentTimeInSeconds();
|
||||
}
|
||||
|
||||
double when;
|
||||
};
|
||||
|
||||
static StartupTime startupTime;
|
||||
static StaticInitializer const data;
|
||||
|
||||
return toRelativeTime (startupTime.ts);
|
||||
return data.when;
|
||||
}
|
||||
|
||||
// Used to call getStartupTime as early as possible
|
||||
struct StartupTimeStaticInitializer
|
||||
{
|
||||
StartupTimeStaticInitializer ()
|
||||
{ getStartupTime(); }
|
||||
StartupTimeStaticInitializer ()
|
||||
{
|
||||
getStartupTime();
|
||||
}
|
||||
};
|
||||
|
||||
static StartupTimeStaticInitializer startupTimeStaticInitializer;
|
||||
|
||||
|
||||
}
|
||||
|
||||
RelativeTime RelativeTime::fromStartup ()
|
||||
{
|
||||
timespec ts;
|
||||
clock_gettime (CLOCK_MONOTONIC, &ts);
|
||||
|
||||
return detail::toRelativeTime (ts) - detail::getStartupTime();
|
||||
return RelativeTime (
|
||||
detail::monotonicCurrentTimeInSeconds() - detail::getStartupTime());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
98
src/beast/beast/chrono/impl/abstract_clock.cpp
Normal file
98
src/beast/beast/chrono/impl/abstract_clock.cpp
Normal file
@@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "../abstract_clock.h"
|
||||
#include "../manual_clock.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
namespace beast {
|
||||
|
||||
class abstract_clock_tests : public UnitTest
|
||||
{
|
||||
public:
|
||||
void test (abstract_clock <std::chrono::seconds>& c)
|
||||
{
|
||||
{
|
||||
auto const t1 (c.now ());
|
||||
std::this_thread::sleep_for (
|
||||
std::chrono::milliseconds (1500));
|
||||
auto const t2 (c.now ());
|
||||
|
||||
std::stringstream ss;
|
||||
ss <<
|
||||
"t1= " << c.to_string (t1) <<
|
||||
", t2= " << c.to_string (t2) <<
|
||||
", elapsed= " << (t2 - t1);
|
||||
logMessage (ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
void test_manual ()
|
||||
{
|
||||
typedef manual_clock <std::chrono::seconds> clock_type;
|
||||
clock_type c;
|
||||
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "now() = " << c.to_string (c.now ()) << std::endl;
|
||||
|
||||
c.set (clock_type::time_point (std::chrono::seconds (1)));
|
||||
ss << "now() = " << c.to_string (c.now ()) << std::endl;
|
||||
|
||||
c.set (clock_type::time_point (std::chrono::seconds (2)));
|
||||
ss << "now() = " << c.to_string (c.now ()) << std::endl;
|
||||
|
||||
logMessage (ss.str());
|
||||
}
|
||||
|
||||
void runTest ()
|
||||
{
|
||||
beginTestCase ("Syntax");
|
||||
|
||||
logMessage ("steady_clock");
|
||||
test (get_abstract_clock <std::chrono::steady_clock,
|
||||
std::chrono::seconds> ());
|
||||
|
||||
logMessage ("system_clock");
|
||||
test (get_abstract_clock <std::chrono::system_clock,
|
||||
std::chrono::seconds> ());
|
||||
|
||||
logMessage ("high_resolution_clock");
|
||||
test (get_abstract_clock <std::chrono::high_resolution_clock,
|
||||
std::chrono::seconds> ());
|
||||
|
||||
logMessage ("manual_clock");
|
||||
test_manual ();
|
||||
|
||||
pass ();
|
||||
}
|
||||
|
||||
abstract_clock_tests ()
|
||||
: UnitTest ("abstract_clock", "beast", runManual)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static abstract_clock_tests abstract_clock_tests_;
|
||||
|
||||
}
|
||||
46
src/beast/beast/chrono/impl/basic_seconds_clock.cpp
Normal file
46
src/beast/beast/chrono/impl/basic_seconds_clock.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "../basic_seconds_clock.h"
|
||||
|
||||
#include "../../Config.h"
|
||||
#include "../../../modules/beast_core/beast_core.h" // for UnitTest
|
||||
|
||||
namespace beast {
|
||||
|
||||
class basic_seconds_clock_Tests : public UnitTest
|
||||
{
|
||||
public:
|
||||
void runTest ()
|
||||
{
|
||||
beginTestCase ("now");
|
||||
|
||||
basic_seconds_clock <std::chrono::steady_clock>::now ();
|
||||
|
||||
pass ();
|
||||
}
|
||||
|
||||
basic_seconds_clock_Tests() : UnitTest("basic_seconds_clock", "beast")
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static basic_seconds_clock_Tests basic_seconds_clock_tests;
|
||||
|
||||
}
|
||||
41
src/beast/beast/chrono/impl/chrono_io.cpp
Normal file
41
src/beast/beast/chrono/impl/chrono_io.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
// chrono_io
|
||||
//
|
||||
// (C) Copyright Howard Hinnant
|
||||
// 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).
|
||||
|
||||
#include "../chrono_io.h"
|
||||
|
||||
//_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
namespace std {
|
||||
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
locale::id
|
||||
durationpunct::id;
|
||||
|
||||
} // chrono
|
||||
|
||||
//_LIBCPP_END_NAMESPACE_STD
|
||||
}
|
||||
92
src/beast/beast/chrono/manual_clock.h
Normal file
92
src/beast/beast/chrono/manual_clock.h
Normal file
@@ -0,0 +1,92 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CHRONO_MANUAL_CLOCK_H_INCLUDED
|
||||
#define BEAST_CHRONO_MANUAL_CLOCK_H_INCLUDED
|
||||
|
||||
#include "abstract_clock.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Manual clock implementation.
|
||||
This concrete class implements the @ref abstract_clock interface and
|
||||
allows the time to be advanced manually, mainly for the purpose of
|
||||
providing a clock in unit tests.
|
||||
@tparam The length of time, in seconds, corresponding to one tick.
|
||||
*/
|
||||
template <class Duration, bool IsSteady = true>
|
||||
class manual_clock : public abstract_clock <Duration>
|
||||
{
|
||||
public:
|
||||
using typename abstract_clock <Duration>::rep;
|
||||
using typename abstract_clock <Duration>::duration;
|
||||
using typename abstract_clock <Duration>::time_point;
|
||||
|
||||
explicit manual_clock (time_point const& t = time_point (Duration (0)))
|
||||
: m_now (t)
|
||||
{
|
||||
}
|
||||
|
||||
bool is_steady () const
|
||||
{
|
||||
return IsSteady;
|
||||
}
|
||||
|
||||
time_point now () const
|
||||
{
|
||||
return m_now;
|
||||
}
|
||||
|
||||
std::string to_string (time_point const& tp) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << tp.time_since_epoch() << " from start";
|
||||
return ss.str ();
|
||||
}
|
||||
|
||||
/** Set the current time of the manual clock.
|
||||
Precondition:
|
||||
! IsSteady || t > now()
|
||||
*/
|
||||
void set (time_point const& t)
|
||||
{
|
||||
//if (IsSteady)
|
||||
m_now = t;
|
||||
}
|
||||
|
||||
/** Convenience for setting the time using a duration in @ref rep units. */
|
||||
void set (rep v)
|
||||
{
|
||||
set (time_point (duration (v)));
|
||||
}
|
||||
|
||||
/** Convenience for advancing the clock by one. */
|
||||
manual_clock& operator++ ()
|
||||
{
|
||||
m_now += duration (1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
time_point m_now;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
622
src/beast/beast/chrono/ratio_io.h
Normal file
622
src/beast/beast/chrono/ratio_io.h
Normal file
@@ -0,0 +1,622 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
// ratio_io
|
||||
//
|
||||
// (C) Copyright Howard Hinnant
|
||||
// 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).
|
||||
|
||||
#ifndef BEAST_CHRONO_RATIO_IO_H_INCLUDED
|
||||
#define BEAST_CHRONO_RATIO_IO_H_INCLUDED
|
||||
|
||||
/*
|
||||
|
||||
ratio_io synopsis
|
||||
|
||||
#include <ratio>
|
||||
#include <string>
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <class Ratio, class charT>
|
||||
struct ratio_string
|
||||
{
|
||||
static basic_string<charT> symbol();
|
||||
static basic_string<charT> prefix();
|
||||
};
|
||||
|
||||
} // std
|
||||
|
||||
*/
|
||||
|
||||
#include <ratio>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
//_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
namespace std {
|
||||
|
||||
template <class _Ratio, class _CharT>
|
||||
struct ratio_string
|
||||
{
|
||||
static basic_string<_CharT> symbol() {return prefix();}
|
||||
static basic_string<_CharT> prefix();
|
||||
};
|
||||
|
||||
template <class _Ratio, class _CharT>
|
||||
basic_string<_CharT>
|
||||
ratio_string<_Ratio, _CharT>::prefix()
|
||||
{
|
||||
basic_ostringstream<_CharT> __os;
|
||||
__os << _CharT('[') << _Ratio::num << _CharT('/')
|
||||
<< _Ratio::den << _CharT(']');
|
||||
return __os.str();
|
||||
}
|
||||
|
||||
// atto
|
||||
|
||||
template <>
|
||||
struct ratio_string<atto, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'a');}
|
||||
static string prefix() {return string("atto");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<atto, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'a');}
|
||||
static u16string prefix() {return u16string(u"atto");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<atto, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'a');}
|
||||
static u32string prefix() {return u32string(U"atto");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<atto, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'a');}
|
||||
static wstring prefix() {return wstring(L"atto");}
|
||||
};
|
||||
|
||||
// femto
|
||||
|
||||
template <>
|
||||
struct ratio_string<femto, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'f');}
|
||||
static string prefix() {return string("femto");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<femto, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'f');}
|
||||
static u16string prefix() {return u16string(u"femto");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<femto, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'f');}
|
||||
static u32string prefix() {return u32string(U"femto");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<femto, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'f');}
|
||||
static wstring prefix() {return wstring(L"femto");}
|
||||
};
|
||||
|
||||
// pico
|
||||
|
||||
template <>
|
||||
struct ratio_string<pico, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'p');}
|
||||
static string prefix() {return string("pico");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<pico, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'p');}
|
||||
static u16string prefix() {return u16string(u"pico");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<pico, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'p');}
|
||||
static u32string prefix() {return u32string(U"pico");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<pico, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'p');}
|
||||
static wstring prefix() {return wstring(L"pico");}
|
||||
};
|
||||
|
||||
// nano
|
||||
|
||||
template <>
|
||||
struct ratio_string<nano, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'n');}
|
||||
static string prefix() {return string("nano");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<nano, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'n');}
|
||||
static u16string prefix() {return u16string(u"nano");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<nano, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'n');}
|
||||
static u32string prefix() {return u32string(U"nano");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<nano, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'n');}
|
||||
static wstring prefix() {return wstring(L"nano");}
|
||||
};
|
||||
|
||||
// micro
|
||||
|
||||
template <>
|
||||
struct ratio_string<micro, char>
|
||||
{
|
||||
static string symbol() {return string("\xC2\xB5");}
|
||||
static string prefix() {return string("micro");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<micro, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'\xB5');}
|
||||
static u16string prefix() {return u16string(u"micro");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<micro, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'\xB5');}
|
||||
static u32string prefix() {return u32string(U"micro");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<micro, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'\xB5');}
|
||||
static wstring prefix() {return wstring(L"micro");}
|
||||
};
|
||||
|
||||
// milli
|
||||
|
||||
template <>
|
||||
struct ratio_string<milli, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'm');}
|
||||
static string prefix() {return string("milli");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<milli, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'm');}
|
||||
static u16string prefix() {return u16string(u"milli");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<milli, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'm');}
|
||||
static u32string prefix() {return u32string(U"milli");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<milli, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'm');}
|
||||
static wstring prefix() {return wstring(L"milli");}
|
||||
};
|
||||
|
||||
// centi
|
||||
|
||||
template <>
|
||||
struct ratio_string<centi, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'c');}
|
||||
static string prefix() {return string("centi");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<centi, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'c');}
|
||||
static u16string prefix() {return u16string(u"centi");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<centi, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'c');}
|
||||
static u32string prefix() {return u32string(U"centi");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<centi, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'c');}
|
||||
static wstring prefix() {return wstring(L"centi");}
|
||||
};
|
||||
|
||||
// deci
|
||||
|
||||
template <>
|
||||
struct ratio_string<deci, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'd');}
|
||||
static string prefix() {return string("deci");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<deci, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'd');}
|
||||
static u16string prefix() {return u16string(u"deci");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<deci, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'd');}
|
||||
static u32string prefix() {return u32string(U"deci");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<deci, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'd');}
|
||||
static wstring prefix() {return wstring(L"deci");}
|
||||
};
|
||||
|
||||
// deca
|
||||
|
||||
template <>
|
||||
struct ratio_string<deca, char>
|
||||
{
|
||||
static string symbol() {return string("da");}
|
||||
static string prefix() {return string("deca");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<deca, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(u"da");}
|
||||
static u16string prefix() {return u16string(u"deca");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<deca, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(U"da");}
|
||||
static u32string prefix() {return u32string(U"deca");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<deca, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(L"da");}
|
||||
static wstring prefix() {return wstring(L"deca");}
|
||||
};
|
||||
|
||||
// hecto
|
||||
|
||||
template <>
|
||||
struct ratio_string<hecto, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'h');}
|
||||
static string prefix() {return string("hecto");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<hecto, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'h');}
|
||||
static u16string prefix() {return u16string(u"hecto");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<hecto, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'h');}
|
||||
static u32string prefix() {return u32string(U"hecto");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<hecto, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'h');}
|
||||
static wstring prefix() {return wstring(L"hecto");}
|
||||
};
|
||||
|
||||
// kilo
|
||||
|
||||
template <>
|
||||
struct ratio_string<kilo, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'k');}
|
||||
static string prefix() {return string("kilo");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<kilo, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'k');}
|
||||
static u16string prefix() {return u16string(u"kilo");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<kilo, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'k');}
|
||||
static u32string prefix() {return u32string(U"kilo");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<kilo, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'k');}
|
||||
static wstring prefix() {return wstring(L"kilo");}
|
||||
};
|
||||
|
||||
// mega
|
||||
|
||||
template <>
|
||||
struct ratio_string<mega, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'M');}
|
||||
static string prefix() {return string("mega");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<mega, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'M');}
|
||||
static u16string prefix() {return u16string(u"mega");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<mega, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'M');}
|
||||
static u32string prefix() {return u32string(U"mega");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<mega, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'M');}
|
||||
static wstring prefix() {return wstring(L"mega");}
|
||||
};
|
||||
|
||||
// giga
|
||||
|
||||
template <>
|
||||
struct ratio_string<giga, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'G');}
|
||||
static string prefix() {return string("giga");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<giga, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'G');}
|
||||
static u16string prefix() {return u16string(u"giga");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<giga, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'G');}
|
||||
static u32string prefix() {return u32string(U"giga");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<giga, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'G');}
|
||||
static wstring prefix() {return wstring(L"giga");}
|
||||
};
|
||||
|
||||
// tera
|
||||
|
||||
template <>
|
||||
struct ratio_string<tera, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'T');}
|
||||
static string prefix() {return string("tera");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<tera, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'T');}
|
||||
static u16string prefix() {return u16string(u"tera");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<tera, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'T');}
|
||||
static u32string prefix() {return u32string(U"tera");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<tera, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'T');}
|
||||
static wstring prefix() {return wstring(L"tera");}
|
||||
};
|
||||
|
||||
// peta
|
||||
|
||||
template <>
|
||||
struct ratio_string<peta, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'P');}
|
||||
static string prefix() {return string("peta");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<peta, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'P');}
|
||||
static u16string prefix() {return u16string(u"peta");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<peta, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'P');}
|
||||
static u32string prefix() {return u32string(U"peta");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<peta, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'P');}
|
||||
static wstring prefix() {return wstring(L"peta");}
|
||||
};
|
||||
|
||||
// exa
|
||||
|
||||
template <>
|
||||
struct ratio_string<exa, char>
|
||||
{
|
||||
static string symbol() {return string(1, 'E');}
|
||||
static string prefix() {return string("exa");}
|
||||
};
|
||||
|
||||
#if HAS_UNICODE_SUPPORT
|
||||
|
||||
template <>
|
||||
struct ratio_string<exa, char16_t>
|
||||
{
|
||||
static u16string symbol() {return u16string(1, u'E');}
|
||||
static u16string prefix() {return u16string(u"exa");}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ratio_string<exa, char32_t>
|
||||
{
|
||||
static u32string symbol() {return u32string(1, U'E');}
|
||||
static u32string prefix() {return u32string(U"exa");}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct ratio_string<exa, wchar_t>
|
||||
{
|
||||
static wstring symbol() {return wstring(1, L'E');}
|
||||
static wstring prefix() {return wstring(L"exa");}
|
||||
};
|
||||
|
||||
//_LIBCPP_END_NAMESPACE_STD
|
||||
}
|
||||
|
||||
#endif // _RATIO_IO
|
||||
@@ -30,6 +30,8 @@
|
||||
#error "PlatformConfig.h must come first!"
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// This file defines miscellaneous macros for debugging, assertions, etc.
|
||||
|
||||
#if BEAST_FORCE_DEBUG
|
||||
@@ -107,8 +109,9 @@ extern void beast_reportFatalError (char const* message, char const* fileName, i
|
||||
This is only compiled in a debug build.
|
||||
@see Logger::outputDebugString
|
||||
*/
|
||||
#define DBG(dbgtext) { beast::String tempDbgBuf; tempDbgBuf << dbgtext; beast::Logger::outputDebugString (tempDbgBuf); }
|
||||
#define BDBG(dbgtext) { beast::String tempDbgBuf; tempDbgBuf << dbgtext; beast::Logger::outputDebugString (tempDbgBuf); }
|
||||
|
||||
#if 0
|
||||
/** This will always cause an assertion failure.
|
||||
It is only compiled in a debug build, (unless BEAST_LOG_ASSERTIONS is enabled for your build).
|
||||
@see bassert
|
||||
@@ -122,12 +125,17 @@ extern void beast_reportFatalError (char const* message, char const* fileName, i
|
||||
@see bassertfalse
|
||||
*/
|
||||
#define bassert(expression) { if (! (expression)) beast_reportFatalError(#expression,__FILE__,__LINE__); }
|
||||
#else
|
||||
|
||||
#define bassertfalse assert(false)
|
||||
#define bassert(expression) assert(expression)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
// If debugging is disabled, these dummy debug and assertion macros are used..
|
||||
|
||||
#define DBG(dbgtext)
|
||||
#define BDBG(dbgtext)
|
||||
#define bassertfalse { beast_LogCurrentAssertion }
|
||||
|
||||
# if BEAST_LOG_ASSERTIONS
|
||||
|
||||
@@ -81,6 +81,10 @@
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_SQLITE_FORCE_NDEBUG
|
||||
#define BEAST_SQLITE_FORCE_NDEBUG 0
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_STRING_UTF_TYPE
|
||||
#define BEAST_STRING_UTF_TYPE 8
|
||||
#endif
|
||||
|
||||
@@ -174,7 +174,6 @@
|
||||
|
||||
#ifdef __clang__
|
||||
#define BEAST_CLANG 1
|
||||
#define BEAST_GCC 1
|
||||
#elif defined (__GNUC__)
|
||||
#define BEAST_GCC 1
|
||||
#elif defined (_MSC_VER)
|
||||
|
||||
22
src/beast/beast/container/Container.cpp
Normal file
22
src/beast/beast/container/Container.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "impl/aged_associative_container.cpp"
|
||||
35
src/beast/beast/container/aged_container.h
Normal file
35
src/beast/beast/container/aged_container.h
Normal file
@@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_CONTAINER_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_CONTAINER_H_INCLUDED
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <class T>
|
||||
struct is_aged_container
|
||||
: std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
51
src/beast/beast/container/aged_container_utility.h
Normal file
51
src/beast/beast/container/aged_container_utility.h
Normal file
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_CONTAINER_UTILITY_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_CONTAINER_UTILITY_H_INCLUDED
|
||||
|
||||
#include "aged_container.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Expire aged container items past the specified age. */
|
||||
template <class AgedContainer, class Rep, class Period>
|
||||
typename std::enable_if <
|
||||
is_aged_container <AgedContainer>::value,
|
||||
std::size_t
|
||||
>::type
|
||||
expire (AgedContainer& c, std::chrono::duration <Rep, Period> const& age)
|
||||
{
|
||||
std::size_t n (0);
|
||||
auto const expired (c.clock().now() - age);
|
||||
for (auto iter (c.chronological.cbegin());
|
||||
iter != c.chronological.cend() &&
|
||||
iter.when() <= expired;)
|
||||
{
|
||||
iter = c.erase (iter);
|
||||
++n;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
43
src/beast/beast/container/aged_map.h
Normal file
43
src/beast/beast/container/aged_map.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_MAP_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_MAP_H_INCLUDED
|
||||
|
||||
#include "detail/aged_ordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class T,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Compare = std::less <Key>,
|
||||
class Allocator = std::allocator <std::pair <Key const, T>>
|
||||
>
|
||||
using aged_map = detail::aged_ordered_container <
|
||||
false, true, Key, T, Duration, Compare, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
43
src/beast/beast/container/aged_multimap.h
Normal file
43
src/beast/beast/container/aged_multimap.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_MULTIMAP_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_MULTIMAP_H_INCLUDED
|
||||
|
||||
#include "detail/aged_ordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class T,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Compare = std::less <Key>,
|
||||
class Allocator = std::allocator <std::pair <Key const, T>>
|
||||
>
|
||||
using aged_multimap = detail::aged_ordered_container <
|
||||
true, true, Key, T, Duration, Compare, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
42
src/beast/beast/container/aged_multiset.h
Normal file
42
src/beast/beast/container/aged_multiset.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_MULTISET_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_MULTISET_H_INCLUDED
|
||||
|
||||
#include "detail/aged_ordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Compare = std::less <Key>,
|
||||
class Allocator = std::allocator <Key>
|
||||
>
|
||||
using aged_multiset = detail::aged_ordered_container <
|
||||
true, false, Key, void, Duration, Compare, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
42
src/beast/beast/container/aged_set.h
Normal file
42
src/beast/beast/container/aged_set.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_SET_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_SET_H_INCLUDED
|
||||
|
||||
#include "detail/aged_ordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Compare = std::less <Key>,
|
||||
class Allocator = std::allocator <Key>
|
||||
>
|
||||
using aged_set = detail::aged_ordered_container <
|
||||
false, false, Key, void, Duration, Compare, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
44
src/beast/beast/container/aged_unordered_map.h
Normal file
44
src/beast/beast/container/aged_unordered_map.h
Normal file
@@ -0,0 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_UNORDERED_MAP_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_UNORDERED_MAP_H_INCLUDED
|
||||
|
||||
#include "detail/aged_unordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class T,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Hash = std::hash <Key>,
|
||||
class KeyEqual = std::equal_to <Key>,
|
||||
class Allocator = std::allocator <std::pair <Key const, T>>
|
||||
>
|
||||
using aged_unordered_map = detail::aged_unordered_container <
|
||||
false, true, Key, T, Duration, Hash, KeyEqual, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
44
src/beast/beast/container/aged_unordered_multimap.h
Normal file
44
src/beast/beast/container/aged_unordered_multimap.h
Normal file
@@ -0,0 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_UNORDERED_MULTIMAP_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_UNORDERED_MULTIMAP_H_INCLUDED
|
||||
|
||||
#include "detail/aged_unordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class T,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Hash = std::hash <Key>,
|
||||
class KeyEqual = std::equal_to <Key>,
|
||||
class Allocator = std::allocator <std::pair <Key const, T>>
|
||||
>
|
||||
using aged_unordered_multimap = detail::aged_unordered_container <
|
||||
true, true, Key, T, Duration, Hash, KeyEqual, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
43
src/beast/beast/container/aged_unordered_multiset.h
Normal file
43
src/beast/beast/container/aged_unordered_multiset.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_UNORDERED_MULTISET_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_UNORDERED_MULTISET_H_INCLUDED
|
||||
|
||||
#include "detail/aged_unordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Hash = std::hash <Key>,
|
||||
class KeyEqual = std::equal_to <Key>,
|
||||
class Allocator = std::allocator <Key>
|
||||
>
|
||||
using aged_unordered_multiset = detail::aged_unordered_container <
|
||||
true, false, Key, void, Duration, Hash, KeyEqual, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
43
src/beast/beast/container/aged_unordered_set.h
Normal file
43
src/beast/beast/container/aged_unordered_set.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_UNORDERED_SET_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_UNORDERED_SET_H_INCLUDED
|
||||
|
||||
#include "detail/aged_unordered_container.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <
|
||||
class Key,
|
||||
class Duration = std::chrono::seconds,
|
||||
class Hash = std::hash <Key>,
|
||||
class KeyEqual = std::equal_to <Key>,
|
||||
class Allocator = std::allocator <Key>
|
||||
>
|
||||
using aged_unordered_set = detail::aged_unordered_container <
|
||||
false, false, Key, void, Duration, Hash, KeyEqual, Allocator>;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_ASSOCIATIVE_CONTAINER_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_ASSOCIATIVE_CONTAINER_H_INCLUDED
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
// Extracts the key portion of value
|
||||
template <bool maybe_map>
|
||||
struct aged_associative_container_extract_t
|
||||
{
|
||||
template <class Value>
|
||||
decltype (Value::first) const&
|
||||
operator() (Value const& value) const
|
||||
{
|
||||
return value.first;
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct aged_associative_container_extract_t <false>
|
||||
{
|
||||
template <class Value>
|
||||
Value const&
|
||||
operator() (Value const& value) const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
156
src/beast/beast/container/detail/aged_container_iterator.h
Normal file
156
src/beast/beast/container/detail/aged_container_iterator.h
Normal file
@@ -0,0 +1,156 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CONTAINER_AGED_CONTAINER_ITERATOR_H_INCLUDED
|
||||
#define BEAST_CONTAINER_AGED_CONTAINER_ITERATOR_H_INCLUDED
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <bool, bool, class, class, class, class, class>
|
||||
class aged_ordered_container;
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Idea for Base template argument to prevent having to repeat
|
||||
// the base class declaration comes from newbiz on ##c++/Freenode
|
||||
//
|
||||
// If Iterator is SCARY then this iterator will be as well.
|
||||
template <
|
||||
bool is_const,
|
||||
class Iterator,
|
||||
class Base =
|
||||
std::iterator <
|
||||
typename std::iterator_traits <Iterator>::iterator_category,
|
||||
typename std::conditional <is_const,
|
||||
typename Iterator::value_type::stashed::value_type const,
|
||||
typename Iterator::value_type::stashed::value_type>::type,
|
||||
typename std::iterator_traits <Iterator>::difference_type>
|
||||
>
|
||||
class aged_container_iterator
|
||||
: public Base
|
||||
{
|
||||
public:
|
||||
typedef typename Iterator::value_type::stashed::time_point time_point;
|
||||
|
||||
aged_container_iterator ()
|
||||
{
|
||||
}
|
||||
|
||||
template <class OtherIterator, class OtherBase>
|
||||
aged_container_iterator (aged_container_iterator <
|
||||
false, OtherIterator, OtherBase> const& other)
|
||||
: m_iter (other.m_iter)
|
||||
{
|
||||
}
|
||||
|
||||
template <bool other_is_const, class OtherIterator, class OtherBase>
|
||||
aged_container_iterator& operator= (aged_container_iterator <
|
||||
other_is_const, OtherIterator, OtherBase> const& other)
|
||||
{
|
||||
m_iter = other.m_iter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <bool other_is_const, class OtherIterator, class OtherBase>
|
||||
bool operator== (aged_container_iterator <
|
||||
other_is_const, OtherIterator, OtherBase> const& other) const
|
||||
{
|
||||
return m_iter == other.m_iter;
|
||||
}
|
||||
|
||||
template <bool other_is_const, class OtherIterator, class OtherBase>
|
||||
bool operator!= (aged_container_iterator <
|
||||
other_is_const, OtherIterator, OtherBase> const& other) const
|
||||
{
|
||||
return m_iter != other.m_iter;
|
||||
}
|
||||
|
||||
aged_container_iterator& operator++ ()
|
||||
{
|
||||
++m_iter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
aged_container_iterator operator++ (int)
|
||||
{
|
||||
aged_container_iterator const prev (*this);
|
||||
++m_iter;
|
||||
return prev;
|
||||
}
|
||||
|
||||
aged_container_iterator& operator-- ()
|
||||
{
|
||||
--m_iter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
aged_container_iterator operator-- (int)
|
||||
{
|
||||
aged_container_iterator const prev (*this);
|
||||
--m_iter;
|
||||
return prev;
|
||||
}
|
||||
|
||||
typename Base::reference operator* () const
|
||||
{
|
||||
return m_iter->value;
|
||||
}
|
||||
|
||||
typename Base::pointer operator-> () const
|
||||
{
|
||||
return &m_iter->value;
|
||||
}
|
||||
|
||||
time_point const& when () const
|
||||
{
|
||||
return m_iter->when;
|
||||
}
|
||||
|
||||
private:
|
||||
template <bool, bool, class, class, class, class, class>
|
||||
friend class aged_ordered_container;
|
||||
|
||||
template <bool, bool, class, class, class, class, class, class>
|
||||
friend class aged_unordered_container;
|
||||
|
||||
template <bool, class, class>
|
||||
friend class aged_container_iterator;
|
||||
|
||||
template <class OtherIterator>
|
||||
aged_container_iterator (OtherIterator const& iter)
|
||||
: m_iter (iter)
|
||||
{
|
||||
}
|
||||
|
||||
Iterator const& iterator() const
|
||||
{
|
||||
return m_iter;
|
||||
}
|
||||
|
||||
Iterator m_iter;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
1926
src/beast/beast/container/detail/aged_ordered_container.h
Normal file
1926
src/beast/beast/container/detail/aged_ordered_container.h
Normal file
File diff suppressed because it is too large
Load Diff
2483
src/beast/beast/container/detail/aged_unordered_container.h
Normal file
2483
src/beast/beast/container/detail/aged_unordered_container.h
Normal file
File diff suppressed because it is too large
Load Diff
1460
src/beast/beast/container/impl/aged_associative_container.cpp
Normal file
1460
src/beast/beast/container/impl/aged_associative_container.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,5 +20,4 @@
|
||||
#ifndef BEAST_CRYPTO_BINARYENCODING_H_INCLUDED
|
||||
#define BEAST_CRYPTO_BINARYENCODING_H_INCLUDED
|
||||
|
||||
|
||||
#endif
|
||||
@@ -19,4 +19,9 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "../../modules/beast_core/beast_core.h" // for UnitTest
|
||||
|
||||
#include "impl/BinaryEncoding.cpp"
|
||||
#include "impl/MurmurHash.cpp"
|
||||
#include "impl/Sha256.cpp"
|
||||
#include "impl/UnsignedInteger.cpp"
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MURMURHASH_H_INCLUDED
|
||||
#define BEAST_MURMURHASH_H_INCLUDED
|
||||
#ifndef BEAST_CRYPTO_MURMURHASH_H_INCLUDED
|
||||
#define BEAST_CRYPTO_MURMURHASH_H_INCLUDED
|
||||
|
||||
#include "../CStdInt.h"
|
||||
|
||||
// Original source code links in .cpp file
|
||||
|
||||
// This file depends on some Beast declarations and defines
|
||||
|
||||
namespace Murmur
|
||||
{
|
||||
namespace beast {
|
||||
namespace Murmur {
|
||||
|
||||
extern void MurmurHash3_x86_32 (const void* key, int len, uint32 seed, void* out);
|
||||
extern void MurmurHash3_x86_128 (const void* key, int len, uint32 seed, void* out);
|
||||
@@ -77,6 +77,7 @@ inline void Hash (const void* key, int len, uint32 seed, HashType* out)
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
#include "../Config.h"
|
||||
#include "../CStdInt.h"
|
||||
#include "../FixedArray.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -36,7 +37,7 @@ enum
|
||||
};
|
||||
|
||||
/** A container suitable for holding the resulting hash. */
|
||||
typedef FixedArray <uint8, digestLength> digest_type;
|
||||
typedef std::array <uint8, digestLength> digest_type;
|
||||
|
||||
namespace detail {
|
||||
struct Context
|
||||
@@ -85,7 +86,7 @@ public:
|
||||
|
||||
digest_type& finish (digest_type& digest)
|
||||
{
|
||||
finish (digest.c_array());
|
||||
finish (digest.data());
|
||||
return digest;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
#ifndef BEAST_CRYPTO_UNSIGNEDINTEGER_H_INCLUDED
|
||||
#define BEAST_CRYPTO_UNSIGNEDINTEGER_H_INCLUDED
|
||||
|
||||
#include "../SafeBool.h"
|
||||
#include "UnsignedIntegerCalc.h"
|
||||
#include "MurmurHash.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Represents a set of bits of fixed size.
|
||||
|
||||
The data is stored in "canonical" format which is network (big endian)
|
||||
@@ -36,17 +45,17 @@ public:
|
||||
static std::size_t const size = Bytes;
|
||||
|
||||
// The underlying integer type we use when converting to calculation format.
|
||||
typedef uint32 IntCalcType;
|
||||
typedef std::uint32_t IntCalcType;
|
||||
|
||||
// The type of object resulting from a conversion to calculation format.
|
||||
typedef UnsignedIntegerCalc <IntCalcType> CalcType;
|
||||
|
||||
// Standard container compatibility
|
||||
typedef uint8 value_type;
|
||||
typedef std::uint8_t value_type;
|
||||
typedef value_type* iterator;
|
||||
typedef value_type const* const_iterator;
|
||||
|
||||
/** Hardened hash function for use with HashMap.
|
||||
/** Hardened hash function for use with hash based containers.
|
||||
The seed is used to make the hash unpredictable. This prevents
|
||||
attackers from exploiting crafted inputs to produce degenerate
|
||||
containers.
|
||||
@@ -59,21 +68,21 @@ public:
|
||||
will be generated from the system
|
||||
@param seedToUse An optional seed to use.
|
||||
*/
|
||||
explicit hasher (HashValue seedToUse = Random::getSystemRandom ().nextInt ())
|
||||
explicit hasher (std::size_t seedToUse = Random::getSystemRandom ().nextInt ())
|
||||
: m_seed (seedToUse)
|
||||
{
|
||||
}
|
||||
|
||||
/** Generates a simple hash from an UnsignedInteger. */
|
||||
HashValue operator() (UnsignedInteger const& key) const
|
||||
std::size_t operator() (UnsignedInteger const& key) const
|
||||
{
|
||||
HashValue hash;
|
||||
std::size_t hash;
|
||||
Murmur::Hash (key.cbegin (), key.size, m_seed, &hash);
|
||||
return hash;
|
||||
}
|
||||
|
||||
private:
|
||||
HashValue m_seed;
|
||||
std::size_t m_seed;
|
||||
};
|
||||
|
||||
/** Determins if two UnsignedInteger objects are equal. */
|
||||
@@ -135,7 +144,8 @@ public:
|
||||
template <class UnsignedIntegralType>
|
||||
static UnsignedInteger createFromInteger (UnsignedIntegralType value)
|
||||
{
|
||||
static_bassert (Bytes >= sizeof (UnsignedIntegralType));
|
||||
static_assert (Bytes >= sizeof (UnsignedIntegralType),
|
||||
"Bytes is too small.");
|
||||
UnsignedInteger <Bytes> result;
|
||||
value = toNetworkByteOrder <UnsignedIntegralType> (value);
|
||||
result.clear ();
|
||||
@@ -296,4 +306,6 @@ private:
|
||||
IntCalcType m_values [CalcCount];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,22 +20,25 @@
|
||||
#ifndef BEAST_CRYPTO_UNSIGNEDINTEGERCALC_H_INCLUDED
|
||||
#define BEAST_CRYPTO_UNSIGNEDINTEGERCALC_H_INCLUDED
|
||||
|
||||
namespace detail
|
||||
{
|
||||
#include <cstdint>
|
||||
|
||||
namespace beast {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename UInt>
|
||||
struct DoubleWidthUInt;
|
||||
|
||||
template <>
|
||||
struct DoubleWidthUInt <uint16>
|
||||
struct DoubleWidthUInt <std::uint16_t>
|
||||
{
|
||||
typedef uint32 type;
|
||||
typedef std::uint32_t type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct DoubleWidthUInt <uint32>
|
||||
struct DoubleWidthUInt <std::uint32_t>
|
||||
{
|
||||
typedef uint64 type;
|
||||
typedef std::uint64_t type;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -331,7 +334,7 @@ public:
|
||||
}
|
||||
*lhs++ = UInt (part);
|
||||
}
|
||||
bassert (carry == 0) // overflow
|
||||
bassert (carry == 0); // overflow
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -427,4 +430,6 @@ private:
|
||||
UInt* m_values;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,6 +17,14 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "../BinaryEncoding.h"
|
||||
#include "../UnsignedInteger.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** Generic algorithms for base encoding and decoding. */
|
||||
class BinaryEncoding
|
||||
{
|
||||
@@ -393,3 +401,5 @@ public:
|
||||
};
|
||||
|
||||
static BinaryEncodingTests BinaryEncodingTests;
|
||||
|
||||
}
|
||||
@@ -19,8 +19,12 @@
|
||||
|
||||
// http://code.google.com/p/smhasher/
|
||||
|
||||
namespace Murmur
|
||||
{
|
||||
#include "../MurmurHash.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace beast {
|
||||
namespace Murmur {
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Platform-specific functions and macros
|
||||
@@ -485,3 +489,4 @@ void MurmurHash3_x64_128 ( const void* key, const int len,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ void* hash (void const* buffer, std::size_t bytes, void* digest)
|
||||
|
||||
digest_type& hash (void const* buffer, std::size_t bytes, digest_type& digest)
|
||||
{
|
||||
hash (buffer, bytes, digest.c_array());
|
||||
hash (buffer, bytes, digest.data());
|
||||
return digest;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions are Copyright (c) 2013 the authors listed at the following URL,
|
||||
and/or the authors of referenced articles or incorporated external code:
|
||||
http://en.literateprograms.org/Arbitrary-precision_integer_arithmetic_(C)?action=history&offset=20100923155004
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
@@ -17,7 +21,13 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#include "../UnsignedInteger.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
namespace multiprecsion {
|
||||
|
||||
#if 0
|
||||
|
||||
/* Copyright (c) 2013 the authors listed at the following URL, and/or
|
||||
the authors of referenced articles or incorporated external code:
|
||||
@@ -41,15 +51,11 @@
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Retrieved from: http://en.literateprograms.org/Arbitrary-precision_integer_arithmetic_(C)?oldid=16902
|
||||
*/
|
||||
|
||||
namespace multiprecsion
|
||||
{
|
||||
|
||||
#if 0
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Retrieved from: http://en.literateprograms.org/Arbitrary-precision_integer_arithmetic_(C)?oldid=16902
|
||||
//
|
||||
|
||||
typedef unsigned short component_t;
|
||||
typedef unsigned long double_component_t;
|
||||
@@ -394,3 +400,5 @@ private:
|
||||
};
|
||||
|
||||
static UnsignedIntegerTests unsignedIntegerTests;
|
||||
|
||||
}
|
||||
90
src/beast/beast/cxx14/algorithm.h
Normal file
90
src/beast/beast/cxx14/algorithm.h
Normal file
@@ -0,0 +1,90 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CXX14_ALGORITHM_H_INCLUDED
|
||||
#define BEAST_CXX14_ALGORITHM_H_INCLUDED
|
||||
|
||||
#include "config.h"
|
||||
#include "functional.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace std {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <class Pred, class FwdIt1, class FwdIt2>
|
||||
bool equal (FwdIt1 first1, FwdIt1 last1,
|
||||
FwdIt2 first2, FwdIt2 last2, Pred pred,
|
||||
std::input_iterator_tag, std::input_iterator_tag)
|
||||
{
|
||||
for (; first1 != last1 && first2 != last2; ++first1, ++first2)
|
||||
if (! pred (*first1, *first2))
|
||||
return false;
|
||||
return first1 == last1 && first2 == last2;
|
||||
}
|
||||
|
||||
template <class Pred, class RanIt1, class RanIt2>
|
||||
bool equal (RanIt1 first1, RanIt1 last1,
|
||||
RanIt2 first2, RanIt2 last2, Pred pred,
|
||||
random_access_iterator_tag,
|
||||
random_access_iterator_tag )
|
||||
{
|
||||
if (std::distance (first1, last1) !=
|
||||
std::distance (first2, last2))
|
||||
return false;
|
||||
for (; first1 != last1; ++first1, ++first2)
|
||||
if (! pred (*first1, *first2))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** C++14 implementation of std::equal. */
|
||||
/** @{ */
|
||||
template <class FwdIt1, class FwdIt2>
|
||||
bool equal (FwdIt1 first1, FwdIt1 last1,
|
||||
FwdIt2 first2, FwdIt2 last2)
|
||||
{
|
||||
return std::detail::equal (first1, last1,
|
||||
first2, last2, std::equal_to <void>(),
|
||||
typename std::iterator_traits <
|
||||
FwdIt1>::iterator_category(),
|
||||
typename std::iterator_traits <
|
||||
FwdIt2>::iterator_category());
|
||||
}
|
||||
|
||||
template <class FwdIt1, class FwdIt2, class Pred>
|
||||
bool equal (FwdIt1 first1, FwdIt1 last1,
|
||||
FwdIt2 first2, FwdIt2 last2, Pred pred)
|
||||
{
|
||||
return std::detail::equal <
|
||||
typename std::add_lvalue_reference <Pred>::type> (
|
||||
first1, last1, first2, last2, pred,
|
||||
typename std::iterator_traits <
|
||||
FwdIt1>::iterator_category(),
|
||||
typename std::iterator_traits <
|
||||
FwdIt2>::iterator_category());
|
||||
}
|
||||
/** @} */
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,27 +17,28 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_EXTRAS_H_INCLUDED
|
||||
#define BEAST_EXTRAS_H_INCLUDED
|
||||
#ifndef BEAST_CXX14_CONFIG_H_INCLUDED
|
||||
#define BEAST_CXX14_CONFIG_H_INCLUDED
|
||||
|
||||
// Adds boost-specific features to beast.
|
||||
// Sets C++14 compatibility configuration macros based on build environment
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// lockable_traits was added in 1.53.0
|
||||
#ifndef BEAST_BOOST_HAS_LOCKABLES
|
||||
# if BOOST_VERSION >= 105300
|
||||
# define BEAST_BOOST_HAS_LOCKABLES 1
|
||||
// Disables beast c++14 compatibility additions when set to 1
|
||||
//
|
||||
#ifndef BEAST_NO_CXX14_COMPATIBILITY
|
||||
# ifdef _MSC_VER
|
||||
# define BEAST_NO_CXX14_COMPATIBILITY 1
|
||||
# else
|
||||
# define BEAST_BOOST_HAS_LOCKABLES 0
|
||||
# define BEAST_NO_CXX14_COMPATIBILITY 0
|
||||
# endif
|
||||
#endif
|
||||
#if BEAST_BOOST_HAS_LOCKABLES
|
||||
# include <boost/thread/lockable_traits.hpp>
|
||||
#endif
|
||||
|
||||
#if BEAST_BOOST_HAS_LOCKABLES
|
||||
# include "traits/BoostLockableTraits.h"
|
||||
// Disables beast's make_unique
|
||||
#ifndef BEAST_NO_CXX14_MAKE_UNIQUE
|
||||
# ifdef _MSC_VER
|
||||
# define BEAST_NO_CXX14_MAKE_UNIQUE 1
|
||||
# else
|
||||
# define BEAST_NO_CXX14_MAKE_UNIQUE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -17,32 +17,37 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_UTILITY_ENABLEIF_H_INCLUDED
|
||||
#define BEAST_UTILITY_ENABLEIF_H_INCLUDED
|
||||
#ifndef BEAST_CXX14_FUNCTIONAL_H_INCLUDED
|
||||
#define BEAST_CXX14_FUNCTIONAL_H_INCLUDED
|
||||
|
||||
#include "../type_traits/IntegralConstant.h"
|
||||
#include "config.h"
|
||||
|
||||
namespace beast
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#if ! BEAST_NO_CXX14_COMPATIBILITY
|
||||
|
||||
namespace std {
|
||||
|
||||
// C++14 implementation of std::equal_to <void> specialization.
|
||||
// This supports heterogeneous comparisons.
|
||||
template <>
|
||||
struct equal_to <void>
|
||||
{
|
||||
// VFALCO NOTE Its not clear how to support is_transparent pre c++14
|
||||
typedef std::true_type is_transparent;
|
||||
|
||||
template <bool Enable, class T = void>
|
||||
struct EnableIfBool : TrueType { typedef T type; };
|
||||
|
||||
template <class T>
|
||||
struct EnableIfBool <false, T> : FalseType { };
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct EnableIf : public EnableIfBool <Cond::value, T> { };
|
||||
|
||||
template <bool Enable, class T = void>
|
||||
struct DisableIfBool : FalseType { typedef T type; };
|
||||
|
||||
template <class T>
|
||||
struct DisableIfBool <true, T> { };
|
||||
|
||||
template <class Cond, class T = void>
|
||||
struct DisableIf : public DisableIfBool <Cond::value, T> { };
|
||||
template <class T, class U>
|
||||
auto operator() (T&& lhs, U&& rhs) const ->
|
||||
decltype (std::forward <T> (lhs) == std::forward <U> (rhs))
|
||||
{
|
||||
return std::forward <T> (lhs) == std::forward <U> (rhs);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
41
src/beast/beast/cxx14/memory.h
Normal file
41
src/beast/beast/cxx14/memory.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CXX14_MEMORY_H_INCLUDED
|
||||
#define BEAST_CXX14_MEMORY_H_INCLUDED
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace std {
|
||||
|
||||
#if ! BEAST_NO_CXX14_MAKE_UNIQUE
|
||||
|
||||
template <class T, class... Args>
|
||||
std::unique_ptr <T> make_unique (Args&&... args)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (std::forward <Args> (args)...));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
147
src/beast/beast/cxx14/type_traits.h
Normal file
147
src/beast/beast/cxx14/type_traits.h
Normal file
@@ -0,0 +1,147 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CXX14_TYPE_TRAITS_H_INCLUDED
|
||||
#define BEAST_CXX14_TYPE_TRAITS_H_INCLUDED
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace std {
|
||||
|
||||
// Ideas from Howard Hinnant
|
||||
//
|
||||
// Specializations of is_constructible for pair and tuple which
|
||||
// work around an apparent defect in the standard that causes well
|
||||
// formed expressions involving pairs or tuples of non default-constructible
|
||||
// types to generate compile errors.
|
||||
//
|
||||
template <class T, class U>
|
||||
struct is_constructible <pair <T, U>>
|
||||
: integral_constant <bool,
|
||||
is_default_constructible <T>::value &&
|
||||
is_default_constructible <U>::value>
|
||||
{
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <bool...>
|
||||
struct compile_time_all;
|
||||
|
||||
template <>
|
||||
struct compile_time_all <>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template <bool Arg0, bool ... Argn>
|
||||
struct compile_time_all <Arg0, Argn...>
|
||||
{
|
||||
static const bool value =
|
||||
Arg0 && compile_time_all <Argn...>::value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class ...T>
|
||||
struct is_constructible <tuple <T...>>
|
||||
: integral_constant <bool,
|
||||
detail::compile_time_all <
|
||||
is_default_constructible <T>::value...>::value>
|
||||
{
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if ! BEAST_NO_CXX14_COMPATIBILITY
|
||||
|
||||
// From http://llvm.org/svn/llvm-project/libcxx/trunk/include/type_traits
|
||||
|
||||
// const-volatile modifications:
|
||||
template <class T>
|
||||
using remove_const_t = typename remove_const<T>::type; // C++14
|
||||
template <class T>
|
||||
using remove_volatile_t = typename remove_volatile<T>::type; // C++14
|
||||
template <class T>
|
||||
using remove_cv_t = typename remove_cv<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_const_t = typename add_const<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_volatile_t = typename add_volatile<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_cv_t = typename add_cv<T>::type; // C++14
|
||||
|
||||
// reference modifications:
|
||||
template <class T>
|
||||
using remove_reference_t = typename remove_reference<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_lvalue_reference_t = typename add_lvalue_reference<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_rvalue_reference_t = typename add_rvalue_reference<T>::type; // C++14
|
||||
|
||||
// sign modifications:
|
||||
template <class T>
|
||||
using make_signed_t = typename make_signed<T>::type; // C++14
|
||||
template <class T>
|
||||
using make_unsigned_t = typename make_unsigned<T>::type; // C++14
|
||||
|
||||
// array modifications:
|
||||
template <class T>
|
||||
using remove_extent_t = typename remove_extent<T>::type; // C++14
|
||||
template <class T>
|
||||
using remove_all_extents_t = typename remove_all_extents<T>::type; // C++14
|
||||
|
||||
// pointer modifications:
|
||||
template <class T>
|
||||
using remove_pointer_t = typename remove_pointer<T>::type; // C++14
|
||||
template <class T>
|
||||
using add_pointer_t = typename add_pointer<T>::type; // C++14
|
||||
|
||||
// other transformations:
|
||||
|
||||
#if 0
|
||||
// This is not easy to implement in C++11
|
||||
template <size_t Len, std::size_t Align=std::alignment_of<max_align_t>::value>
|
||||
using aligned_storage_t = typename aligned_storage<Len,Align>::type; // C++14
|
||||
template <std::size_t Len, class... Types>
|
||||
using aligned_union_t = typename aligned_union<Len,Types...>::type; // C++14
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
using decay_t = typename decay<T>::type; // C++14
|
||||
template <bool b, class T=void>
|
||||
using enable_if_t = typename enable_if<b,T>::type; // C++14
|
||||
template <bool b, class T, class F>
|
||||
using conditional_t = typename conditional<b,T,F>::type; // C++14
|
||||
template <class... T>
|
||||
using common_type_t = typename common_type<T...>::type; // C++14
|
||||
template <class T>
|
||||
using underlying_type_t = typename underlying_type<T>::type; // C++14
|
||||
template <class F, class... ArgTypes>
|
||||
using result_of_t = typename result_of<F(ArgTypes...)>::type; // C++14
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
513
src/beast/beast/cyclic_iterator.h
Normal file
513
src/beast/beast/cyclic_iterator.h
Normal file
@@ -0,0 +1,513 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Based on work with these copyrights:
|
||||
Copyright Carl Philipp Reh 2009 - 2013.
|
||||
Copyright Philipp Middendorf 2009 - 2013.
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
Original code taken from
|
||||
https://github.com/freundlich/fcppt
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CYCLIC_ITERATOR_H_INCLUDED
|
||||
#define BEAST_CYCLIC_ITERATOR_H_INCLUDED
|
||||
|
||||
#include <iterator>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
|
||||
namespace beast {
|
||||
|
||||
//
|
||||
// cyclic_iterator_fwd.hpp
|
||||
//
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
class cyclic_iterator;
|
||||
|
||||
//
|
||||
// cyclic_iterator_category.hpp
|
||||
//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<
|
||||
typename SourceCategory
|
||||
>
|
||||
struct cyclic_iterator_category;
|
||||
|
||||
template<>
|
||||
struct cyclic_iterator_category<
|
||||
std::forward_iterator_tag
|
||||
>
|
||||
{
|
||||
typedef std::forward_iterator_tag type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct cyclic_iterator_category<
|
||||
std::bidirectional_iterator_tag
|
||||
>
|
||||
{
|
||||
typedef std::bidirectional_iterator_tag type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct cyclic_iterator_category<
|
||||
std::random_access_iterator_tag
|
||||
>
|
||||
{
|
||||
typedef std::bidirectional_iterator_tag type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// cyclic_iterator_base.hpp
|
||||
//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
struct cyclic_iterator_base
|
||||
{
|
||||
typedef boost::iterator_facade<
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>,
|
||||
typename std::iterator_traits<
|
||||
ContainerIterator
|
||||
>::value_type,
|
||||
typename detail::cyclic_iterator_category<
|
||||
typename std::iterator_traits<
|
||||
ContainerIterator
|
||||
>::iterator_category
|
||||
>::type,
|
||||
typename std::iterator_traits<
|
||||
ContainerIterator
|
||||
>::reference
|
||||
> type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// cyclic_iterator_decl.hpp
|
||||
//
|
||||
|
||||
/**
|
||||
\brief An iterator adaptor that cycles through a range
|
||||
|
||||
\ingroup fcpptmain
|
||||
|
||||
\tparam ContainerIterator The underlying iterator which must be at least a
|
||||
forward iterator
|
||||
|
||||
A cyclic iterator can be useful in cases where you want <code>end()</code> to
|
||||
become <code>begin()</code> again. For example, imagine a cycling through a
|
||||
list of items which means if you skip over the last, you will return to the
|
||||
first one.
|
||||
|
||||
This class can only increment or decrement its underlying iterator, random
|
||||
access is not supported. The iterator category will be at most bidirectional.
|
||||
It inherits all capabilities from <code>boost::iterator_facade</code> which
|
||||
means that it will have the usual iterator operations with their semantics.
|
||||
|
||||
Here is a short example demonstrating its use.
|
||||
|
||||
\snippet cyclic_iterator.cpp cyclic_iterator
|
||||
*/
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
class cyclic_iterator
|
||||
:
|
||||
public detail::cyclic_iterator_base<
|
||||
ContainerIterator
|
||||
>::type
|
||||
{
|
||||
public:
|
||||
/**
|
||||
\brief The base type which is a <code>boost::iterator_facade</code>
|
||||
*/
|
||||
typedef typename detail::cyclic_iterator_base<
|
||||
ContainerIterator
|
||||
>::type base_type;
|
||||
|
||||
/**
|
||||
\brief The underlying iterator type
|
||||
*/
|
||||
typedef ContainerIterator container_iterator_type;
|
||||
|
||||
/**
|
||||
\brief The value type adapted from \a ContainerIterator
|
||||
*/
|
||||
typedef typename base_type::value_type value_type;
|
||||
|
||||
/**
|
||||
\brief The reference type adapted from \a ContainerIterator
|
||||
*/
|
||||
typedef typename base_type::reference reference;
|
||||
|
||||
/**
|
||||
\brief The pointer type adapted from \a ContainerIterator
|
||||
*/
|
||||
typedef typename base_type::pointer pointer;
|
||||
|
||||
/**
|
||||
\brief The difference type adapted from \a ContainerIterator
|
||||
*/
|
||||
typedef typename base_type::difference_type difference_type;
|
||||
|
||||
/**
|
||||
\brief The iterator category, either Forward or Bidirectional
|
||||
*/
|
||||
typedef typename base_type::iterator_category iterator_category;
|
||||
|
||||
/**
|
||||
\brief Creates a singular iterator
|
||||
*/
|
||||
cyclic_iterator();
|
||||
|
||||
/**
|
||||
\brief Copy constructs from another cyclic iterator
|
||||
|
||||
Copy constructs from another cyclic iterator \a other. This only works
|
||||
if the underlying iterators are convertible.
|
||||
|
||||
\param other The iterator to copy construct from
|
||||
*/
|
||||
template<
|
||||
typename OtherIterator
|
||||
>
|
||||
explicit
|
||||
cyclic_iterator(
|
||||
cyclic_iterator<OtherIterator> const &other
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Constructs a new cyclic iterator
|
||||
|
||||
Constructs a new cyclic iterator, starting at \a it, inside
|
||||
a range from \a begin to \a end.
|
||||
|
||||
\param pos The start of the iterator
|
||||
\param begin The beginning of the range
|
||||
\param end The end of the range
|
||||
|
||||
\warning The behaviour is undefined if \a pos isn't between \a begin
|
||||
and \a end. Also, the behaviour is undefined, if \a begin and \a end
|
||||
don't form a valid range.
|
||||
*/
|
||||
cyclic_iterator(
|
||||
container_iterator_type const &pos,
|
||||
container_iterator_type const &begin,
|
||||
container_iterator_type const &end
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Assigns from another cyclic iterator
|
||||
|
||||
Assigns from another cyclic iterator \a other. This only works if the
|
||||
underlying iterators are convertible.
|
||||
|
||||
\param other The iterator to assign from
|
||||
|
||||
\return <code>*this</code>
|
||||
*/
|
||||
template<
|
||||
typename OtherIterator
|
||||
>
|
||||
cyclic_iterator<ContainerIterator> &
|
||||
operator=(
|
||||
cyclic_iterator<OtherIterator> const &other
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Returns the beginning of the range
|
||||
*/
|
||||
container_iterator_type
|
||||
begin() const;
|
||||
|
||||
/**
|
||||
\brief Returns the end of the range
|
||||
*/
|
||||
container_iterator_type
|
||||
end() const;
|
||||
|
||||
/**
|
||||
\brief Returns the underlying iterator
|
||||
*/
|
||||
container_iterator_type
|
||||
get() const;
|
||||
private:
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
void
|
||||
increment();
|
||||
|
||||
void
|
||||
decrement();
|
||||
|
||||
bool
|
||||
equal(
|
||||
cyclic_iterator const &
|
||||
) const;
|
||||
|
||||
reference
|
||||
dereference() const;
|
||||
|
||||
difference_type
|
||||
distance_to(
|
||||
cyclic_iterator const &
|
||||
) const;
|
||||
private:
|
||||
container_iterator_type
|
||||
it_,
|
||||
begin_,
|
||||
end_;
|
||||
};
|
||||
|
||||
//
|
||||
// cyclic_iterator_impl.hpp
|
||||
//
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::cyclic_iterator()
|
||||
:
|
||||
it_(),
|
||||
begin_(),
|
||||
end_()
|
||||
{
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
template<
|
||||
typename OtherIterator
|
||||
>
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::cyclic_iterator(
|
||||
cyclic_iterator<
|
||||
OtherIterator
|
||||
> const &_other
|
||||
)
|
||||
:
|
||||
it_(
|
||||
_other.it_
|
||||
),
|
||||
begin_(
|
||||
_other.begin_
|
||||
),
|
||||
end_(
|
||||
_other.end_
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::cyclic_iterator(
|
||||
container_iterator_type const &_it,
|
||||
container_iterator_type const &_begin,
|
||||
container_iterator_type const &_end
|
||||
)
|
||||
:
|
||||
it_(
|
||||
_it
|
||||
),
|
||||
begin_(
|
||||
_begin
|
||||
),
|
||||
end_(
|
||||
_end
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
template<
|
||||
typename OtherIterator
|
||||
>
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
> &
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::operator=(
|
||||
cyclic_iterator<
|
||||
OtherIterator
|
||||
> const &_other
|
||||
)
|
||||
{
|
||||
it_ = _other.it_;
|
||||
|
||||
begin_ = _other.begin_;
|
||||
|
||||
end_ = _other.end_;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
typename cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::container_iterator_type
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::begin() const
|
||||
{
|
||||
return begin_;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
typename cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::container_iterator_type
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::end() const
|
||||
{
|
||||
return end_;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
typename cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::container_iterator_type
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::get() const
|
||||
{
|
||||
return it_;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
void
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::increment()
|
||||
{
|
||||
if(
|
||||
begin_ != end_
|
||||
&& ++it_ == end_
|
||||
)
|
||||
it_ = begin_;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
void
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::decrement()
|
||||
{
|
||||
if(
|
||||
begin_ == end_
|
||||
)
|
||||
return;
|
||||
|
||||
if(
|
||||
it_ == begin_
|
||||
)
|
||||
it_ =
|
||||
std::prev(
|
||||
end_
|
||||
);
|
||||
else
|
||||
--it_;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
bool
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::equal(
|
||||
cyclic_iterator const &_other
|
||||
) const
|
||||
{
|
||||
return it_ == _other.it;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
typename cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::reference
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::dereference() const
|
||||
{
|
||||
return *it_;
|
||||
}
|
||||
|
||||
template<
|
||||
typename ContainerIterator
|
||||
>
|
||||
typename cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::difference_type
|
||||
cyclic_iterator<
|
||||
ContainerIterator
|
||||
>::distance_to(
|
||||
cyclic_iterator const &_other
|
||||
) const
|
||||
{
|
||||
return _other.it_ - it_;
|
||||
}
|
||||
|
||||
// Convenience function for template argument deduction
|
||||
template <typename ContainerIterator>
|
||||
cyclic_iterator <ContainerIterator> make_cyclic (
|
||||
ContainerIterator const& pos,
|
||||
ContainerIterator const& begin,
|
||||
ContainerIterator const& end);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include "../strings/String.h"
|
||||
|
||||
#include <ios>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** A URL.
|
||||
@@ -90,7 +92,10 @@ public:
|
||||
String userinfo () const;
|
||||
|
||||
/** Retrieve the full URL as a single string. */
|
||||
String full () const;
|
||||
/** @{ */
|
||||
String toString () const;
|
||||
std::string to_string() const;
|
||||
/** @} */
|
||||
|
||||
private:
|
||||
String m_scheme;
|
||||
@@ -103,6 +108,37 @@ private:
|
||||
String m_userinfo;
|
||||
};
|
||||
|
||||
/** URL comparisons. */
|
||||
/** @{ */
|
||||
inline bool operator== (URL const& lhs, URL const& rhs) { return lhs.toString() == rhs.toString(); }
|
||||
inline bool operator!= (URL const& lhs, URL const& rhs) { return ! (lhs.toString() == rhs.toString()); }
|
||||
inline bool operator< (URL const& lhs, URL const& rhs) { return lhs.toString() < rhs.toString(); }
|
||||
inline bool operator> (URL const& lhs, URL const& rhs) { return rhs.toString() < lhs.toString(); }
|
||||
inline bool operator<= (URL const& lhs, URL const& rhs) { return ! (rhs.toString() < lhs.toString()); }
|
||||
inline bool operator>= (URL const& lhs, URL const& rhs) { return ! (lhs.toString() < rhs.toString()); }
|
||||
/** @} */
|
||||
|
||||
/** Output stream conversion. */
|
||||
std::ostream& operator<< (std::ostream& os, URL const& url);
|
||||
|
||||
/** boost::hash support */
|
||||
extern std::size_t hash_value (beast::URL const& url);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace std {
|
||||
|
||||
template <>
|
||||
struct hash <beast::URL>
|
||||
{
|
||||
std::size_t operator() (beast::URL const& v) const
|
||||
{ return beast::hash_value (v); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
{
|
||||
ParsedURL result (url);
|
||||
expect (result.error () == 0);
|
||||
expect (result.url ().full () == url);
|
||||
expect (result.url ().toString () == url);
|
||||
}
|
||||
|
||||
void testURL ()
|
||||
|
||||
@@ -25,7 +25,6 @@ URL::URL ()
|
||||
: m_port (0)
|
||||
{
|
||||
}
|
||||
|
||||
URL::URL (
|
||||
String scheme_,
|
||||
String host_,
|
||||
@@ -129,7 +128,7 @@ String URL::userinfo () const
|
||||
|
||||
foo://username:password@example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose
|
||||
*/
|
||||
String URL::full () const
|
||||
String URL::toString () const
|
||||
{
|
||||
String s;
|
||||
|
||||
@@ -154,5 +153,25 @@ String URL::full () const
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string URL::to_string() const
|
||||
{
|
||||
return toString().toStdString();
|
||||
}
|
||||
|
||||
std::ostream& operator<< (std::ostream &os, URL const& url)
|
||||
{
|
||||
os << url.to_string();
|
||||
return os;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
std::size_t hash_value (URL const& v)
|
||||
{
|
||||
return std::size_t (v.toString().hash());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// boost::hash support
|
||||
38
src/beast/beast/insight/Base.h
Normal file
38
src/beast/beast/insight/Base.h
Normal file
@@ -0,0 +1,38 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_INSIGHT_BASE_H_INCLUDED
|
||||
#define BEAST_INSIGHT_BASE_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** Base for all metrics and hooks. */
|
||||
class Base
|
||||
{
|
||||
public:
|
||||
virtual ~Base () = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,21 +17,21 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_ADDCONST_H_INCLUDED
|
||||
#define BEAST_MPL_ADDCONST_H_INCLUDED
|
||||
#ifndef BEAST_INSIGHT_BASEIMPL_H_INCLUDED
|
||||
#define BEAST_INSIGHT_BASEIMPL_H_INCLUDED
|
||||
|
||||
#include "RemoveConst.h"
|
||||
|
||||
// Ideas based on boost
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
namespace insight {
|
||||
|
||||
/** Add the `const` qualifier to a type. */
|
||||
template <typename T>
|
||||
struct AddConst
|
||||
/** Base for all metrics and hook implementations. */
|
||||
class BaseImpl
|
||||
{
|
||||
typedef typename RemoveConst<T>::type const type;
|
||||
public:
|
||||
typedef std::shared_ptr <BaseImpl> ptr;
|
||||
|
||||
virtual ~BaseImpl () = 0;
|
||||
};
|
||||
|
||||
}
|
||||
133
src/beast/beast/insight/Collector.h
Normal file
133
src/beast/beast/insight/Collector.h
Normal file
@@ -0,0 +1,133 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_INSIGHT_COLLECTOR_H_INCLUDED
|
||||
#define BEAST_INSIGHT_COLLECTOR_H_INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Counter.h"
|
||||
#include "Event.h"
|
||||
#include "Gauge.h"
|
||||
#include "Hook.h"
|
||||
#include "Meter.h"
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** Interface for a manager that allows collection of metrics.
|
||||
|
||||
To export metrics from a class, pass and save a shared_ptr to this
|
||||
interface in the class constructor. Create the metric objects
|
||||
as desired (counters, events, gauges, meters, and an optional hook)
|
||||
using the interface.
|
||||
|
||||
@see Counter, Event, Gauge, Hook, Meter
|
||||
@see NullCollector, StatsDCollector
|
||||
*/
|
||||
class Collector
|
||||
{
|
||||
public:
|
||||
typedef std::shared_ptr <Collector> ptr;
|
||||
|
||||
virtual ~Collector() = 0;
|
||||
|
||||
/** Create a hook.
|
||||
|
||||
A hook is called at each collection interval, on an implementation
|
||||
defined thread. This is a convenience facility for gathering metrics
|
||||
in the polling style. The typical usage is to update all the metrics
|
||||
of interest in the handler.
|
||||
|
||||
Handler will be called with this signature:
|
||||
void handler (void)
|
||||
|
||||
@see Hook
|
||||
*/
|
||||
/** @{ */
|
||||
template <class Handler>
|
||||
Hook make_hook (Handler handler)
|
||||
{
|
||||
return make_hook (HookImpl::HandlerType (handler));
|
||||
}
|
||||
|
||||
virtual Hook make_hook (HookImpl::HandlerType const& handler) = 0;
|
||||
/** @} */
|
||||
|
||||
/** Create a counter with the specified name.
|
||||
@see Counter
|
||||
*/
|
||||
/** @{ */
|
||||
virtual Counter make_counter (std::string const& name) = 0;
|
||||
|
||||
Counter make_counter (std::string const& prefix, std::string const& name)
|
||||
{
|
||||
if (prefix.empty ())
|
||||
return make_counter (name);
|
||||
return make_counter (prefix + "." + name);
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Create an event with the specified name.
|
||||
@see Event
|
||||
*/
|
||||
/** @{ */
|
||||
virtual Event make_event (std::string const& name) = 0;
|
||||
|
||||
Event make_event (std::string const& prefix, std::string const& name)
|
||||
{
|
||||
if (prefix.empty ())
|
||||
return make_event (name);
|
||||
return make_event (prefix + "." + name);
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Create a gauge with the specified name.
|
||||
@see Gauge
|
||||
*/
|
||||
/** @{ */
|
||||
virtual Gauge make_gauge (std::string const& name) = 0;
|
||||
|
||||
Gauge make_gauge (std::string const& prefix, std::string const& name)
|
||||
{
|
||||
if (prefix.empty ())
|
||||
return make_gauge (name);
|
||||
return make_gauge (prefix + "." + name);
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Create a meter with the specified name.
|
||||
@see Meter
|
||||
*/
|
||||
/** @{ */
|
||||
virtual Meter make_meter (std::string const& name) = 0;
|
||||
|
||||
Meter make_meter (std::string const& prefix, std::string const& name)
|
||||
{
|
||||
if (prefix.empty ())
|
||||
return make_meter (name);
|
||||
return make_meter (prefix + "." + name);
|
||||
}
|
||||
/** @} */
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user