mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
Compare commits
199 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
14
.travis.yml
14
.travis.yml
@@ -3,8 +3,18 @@ compiler:
|
||||
- gcc
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq libboost1.48-all-dev protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags
|
||||
script: scons && npm install && npm test
|
||||
- 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 libboost1.54-all-dev protobuf-compiler libprotobuf-dev libssl-dev exuberant-ctags
|
||||
- sudo apt-get install -qq gcc-4.8
|
||||
- sudo apt-get install -qq g++-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
|
||||
- g++ -v
|
||||
|
||||
script: scons && ./build/rippled --unittest && npm install && npm test
|
||||
notifications:
|
||||
email:
|
||||
false
|
||||
|
||||
@@ -65,13 +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/resource/ripple_resource.cpp \
|
||||
../../src/ripple/rpc/ripple_rpc.cpp \
|
||||
../../src/ripple/sitefiles/ripple_sitefiles.cpp \
|
||||
../../src/ripple/sophia/ripple_sophia.c \
|
||||
../../src/ripple/sslutil/ripple_sslutil.cpp \
|
||||
../../src/ripple/testoverlay/ripple_testoverlay.cpp \
|
||||
../../src/ripple/types/ripple_types.cpp \
|
||||
@@ -95,7 +95,6 @@ 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_websocket/ripple_websocket.cpp
|
||||
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
<ClCompile Include="..\..\build\proto\ripple.pb.cc" />
|
||||
<ClCompile Include="..\..\src\ripple\beast\ripple_beast.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple\beast\ripple_beastc.c" />
|
||||
<ClCompile Include="..\..\src\ripple\common\functional\impl\counted_bind.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="..\..\src\ripple\common\ripple_common.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple\http\impl\Port.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -164,6 +171,445 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\resource\ripple_resource.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\ripple_rocksdb.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\builder.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\dbformat.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\db_bench.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\db_filesnapshot.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\db_impl.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\db_impl_readonly.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\db_iter.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\db_stats_logger.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\filename.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\log_reader.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\log_writer.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\memtable.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\memtablelist.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\merge_helper.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\merge_operator.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\repair.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\table_cache.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\table_properties_collector.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\transaction_log_impl.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\version_edit.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\version_set.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\version_set_reduce_num_levels.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\db\write_batch.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\helpers\memenv\memenv.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\port\port_posix.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\port\stack_trace.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\block.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_builder.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_factory.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_reader.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\block_builder.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\block_test.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\filter_block.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\filter_block_test.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\flush_block_policy.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\format.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\iterator.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\merger.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\table\two_level_iterator.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\arena_impl.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\auto_roll_logger.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\blob_store.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\bloom.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\cache.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\coding.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\comparator.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\crc32c.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\env.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\env_hdfs.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\env_posix.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\env_test.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\filelock_test.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\filter_policy.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\hash.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\hash_skiplist_rep.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\histogram.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\ldb_cmd.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\ldb_tool.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\logging.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\murmurhash.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\options.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\perf_context.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\signal_test.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\skiplistrep.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\slice.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\statistics.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\status.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\string_util.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\testharness.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\testutil.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\transformrep.cc">
|
||||
<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="..\..\src\ripple\rocksdb\rocksdb\util\vectorrep.cc">
|
||||
<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="..\..\src\ripple\rpc\impl\ErrorCodes.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="..\..\src\ripple\rpc\impl\Handler.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -202,7 +648,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\sitefiles\ripple_sitefiles.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple\sophia\ripple_sophia.c" />
|
||||
<ClCompile Include="..\..\src\ripple\sslutil\impl\CBigNum.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -253,6 +698,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\types\impl\RippleAssets.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="..\..\src\ripple\types\impl\RippleIdentifierTests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -393,12 +844,24 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\ledger\DirectoryEntryIterator.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="..\..\src\ripple_app\ledger\Ledger.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="..\..\src\ripple_app\ledger\LedgerCleaner.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="..\..\src\ripple_app\ledger\LedgerMaster.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -459,12 +922,24 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\ledger\OrderBookIterator.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="..\..\src\ripple_app\ledger\SerializedValidation.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="..\..\src\ripple_app\main\CollectorManager.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="..\..\src\ripple_app\main\IoServicePool.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -633,6 +1108,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\paths\PathRequests.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="..\..\src\ripple_app\paths\PathState.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -657,6 +1138,9 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\NameResolver.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\PackedMessage.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -754,6 +1238,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\shamap\FetchPackTests.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="..\..\src\ripple_app\shamap\SHAMap.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -796,6 +1286,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\shamap\RadixMapTest.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="..\..\src\ripple_app\shamap\SHAMapTreeNode.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -922,6 +1418,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_basics\containers\KeyCache.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="..\..\src\ripple_basics\containers\RangeSet.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -946,12 +1448,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_basics\log\LogJournal.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="..\..\src\ripple_basics\log\LogPartition.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1049,24 +1545,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\KeyvaDBFactory.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="..\..\src\ripple_core\nodestore\backend\LevelDBFactory.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="..\..\src\ripple_core\nodestore\backend\MdbFactory.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="..\..\src\ripple_core\nodestore\backend\MemoryFactory.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1079,7 +1563,13 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\SophiaFactory.cpp">
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\RocksDBFactory.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="..\..\src\ripple_core\nodestore\impl\Backend.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>
|
||||
@@ -1091,6 +1581,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Database.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="..\..\src\ripple_core\nodestore\impl\DecodedBlob.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1109,12 +1605,36 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Factory.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="..\..\src\ripple_core\nodestore\impl\Manager.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="..\..\src\ripple_core\nodestore\impl\NodeObject.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="..\..\src\ripple_core\nodestore\impl\Scheduler.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="..\..\src\ripple_core\nodestore\impl\Task.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="..\..\src\ripple_core\nodestore\NodeStore.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1236,6 +1756,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_data\protocol\STParsedJSON.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="..\..\src\ripple_data\protocol\TER.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1251,7 +1777,6 @@
|
||||
<ClCompile Include="..\..\src\ripple_data\ripple_data.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple_hyperleveldb\ripple_hyperleveldb.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple_leveldb\ripple_leveldb.cpp" />
|
||||
<ClCompile Include="..\..\src\ripple_mdb\ripple_mdb.c" />
|
||||
<ClCompile Include="..\..\src\ripple_net\basics\RippleSSLContext.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1680,7 +2205,9 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\CycledSet.h" />
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\DecayingSample.h" />
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\DiscreteClock.h" />
|
||||
<ClInclude Include="..\..\src\ripple\common\functional\counted_bind.h" />
|
||||
<ClInclude Include="..\..\src\ripple\http\api\Handler.h" />
|
||||
<ClInclude Include="..\..\src\ripple\http\api\Server.h" />
|
||||
<ClInclude Include="..\..\src\ripple\http\api\Port.h" />
|
||||
@@ -1732,15 +2259,104 @@
|
||||
<ClInclude Include="..\..\src\ripple\resource\api\LegacyFees.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\api\Manager.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\api\Types.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\DecayingSample.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Entry.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Import.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Key.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Kind.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Logic.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\LogicType.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Tuning.h" />
|
||||
<ClInclude Include="..\..\src\ripple\resource\ripple_resource.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\ripple_rocksdb.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\builder.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\dbformat.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_impl.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_impl_readonly.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_iter.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_statistics.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\filename.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\log_format.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\log_reader.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\log_writer.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\memtable.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\memtablelist.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\merge_helper.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\prefix_filter_iterator.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\skiplist.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\snapshot.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\table_cache.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\table_properties_collector.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\transaction_log_impl.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\version_edit.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\version_set.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\write_batch_internal.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\helpers\memenv\memenv.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\arena.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\c.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\cache.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\compaction_filter.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\comparator.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\db.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\env.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\filter_policy.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\flush_block_policy.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\iterator.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\ldb_tool.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\memtablerep.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\merge_operator.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\options.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\perf_context.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\slice.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\slice_transform.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\statistics.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\status.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\table.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\table_properties.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\transaction_log.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\types.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\universal_compaction.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\write_batch.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\utilities\stackable_db.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\utilities\utility_db.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\atomic_pointer.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\port.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\port_posix.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\win\stdint.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_builder.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_factory.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_reader.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_builder.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\filter_block.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\format.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\iterator_wrapper.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\iter_heap.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\merger.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\two_level_iterator.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\arena_impl.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\auto_roll_logger.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\bit_set.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\blob_store.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\build_version.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\coding.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\crc32c.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\hash.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\histogram.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\ldb_cmd.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\ldb_cmd_execute_result.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\logging.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\murmurhash.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\mutexlock.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\perf_context_imp.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\posix_logger.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\random.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stack_trace.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stats_logger.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stl_wrappers.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stop_watch.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\string_util.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\testharness.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\testutil.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rpc\api\ErrorCodes.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rpc\api\Handler.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rpc\api\Manager.h" />
|
||||
<ClInclude Include="..\..\src\ripple\rpc\api\Service.h" />
|
||||
@@ -1753,7 +2369,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\sitefiles\impl\Logic.h" />
|
||||
<ClInclude Include="..\..\src\ripple\sitefiles\impl\Site.h" />
|
||||
<ClInclude Include="..\..\src\ripple\sitefiles\ripple_sitefiles.h" />
|
||||
<ClInclude Include="..\..\src\ripple\sophia\ripple_sophia.h" />
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\bignum_error.h" />
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\CAutoBN_CTX.h" />
|
||||
<ClInclude Include="..\..\src\ripple\sslutil\api\CBigNum.h" />
|
||||
@@ -1785,6 +2400,7 @@
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RippleAccountPrivateKey.h" />
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RippleAccountPublicKey.h" />
|
||||
<ClInclude Include="..\..\src\ripple\types\api\CryptoIdentifier.h" />
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RippleAssets.h" />
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RippleLedgerHash.h" />
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RipplePrivateKey.h" />
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RipplePublicKey.h" />
|
||||
@@ -1822,10 +2438,13 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\data\DatabaseCon.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\data\DBInit.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\data\SqliteDatabase.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\DirectoryEntryIterator.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\Ledger.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerCleaner.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerMaster.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerProposal.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerTiming.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerHolder.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\OrderBookDB.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\AcceptedLedger.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\AcceptedLedgerTx.h" />
|
||||
@@ -1833,7 +2452,9 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\InboundLedgers.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerEntrySet.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerHistory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\OrderBookIterator.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\SerializedValidation.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\main\CollectorManager.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\main\IoServicePool.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\main\NodeStoreScheduler.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\main\ParameterTable.h" />
|
||||
@@ -1863,10 +2484,12 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\node\SqliteFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\Pathfinder.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\PathRequest.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\PathRequests.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\PathState.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\RippleCalc.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\RippleLineCache.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\RippleState.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\NameResolver.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\PackedMessage.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\PeerDoor.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\ClusterNodeStatus.h" />
|
||||
@@ -1884,6 +2507,7 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\shamap\SHAMapNode.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\shamap\SHAMapSyncFilter.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\shamap\SHAMapSyncFilters.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\shamap\RadixMapTest.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\shamap\SHAMapTreeNode.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\tx\AccountSetTransactor.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\tx\ChangeTransactor.h" />
|
||||
@@ -1904,14 +2528,12 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\websocket\WSConnection.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\websocket\WSDoor.h" />
|
||||
<ClInclude Include="..\..\src\ripple_app\websocket\WSServerHandler.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\containers\BlackList.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\containers\KeyCache.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\containers\RangeSet.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\containers\TaggedCache.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\Log.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogFile.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LoggedTimings.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogJournal.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogPartition.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogSeverity.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogSink.h" />
|
||||
@@ -1926,7 +2548,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_basics\utility\ThreadName.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\utility\Time.h" />
|
||||
<ClInclude Include="..\..\src\ripple_basics\utility\UptimeTimer.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\LoadSource.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\Config.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\ConfigSections.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\LoadFeeTrack.h" />
|
||||
@@ -1939,23 +2560,22 @@
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Database.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\DummyScheduler.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Factory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Manager.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\NodeObject.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Scheduler.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Task.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Types.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\VisitCallback.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\HyperDBFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\KeyvaDBFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\LevelDBFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\MdbFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\MemoryFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\NullFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\SophiaFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\RocksDBFactory.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\BatchWriter.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\DatabaseImp.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\DecodedBlob.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\EncodedBlob.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\Factories.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\Tuning.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\NodeStore.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\tests\TestBase.h" />
|
||||
<ClInclude Include="..\..\src\ripple_core\ripple_core.h" />
|
||||
@@ -1975,6 +2595,7 @@
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\SerializedObjectTemplate.h" />
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\SerializedTypes.h" />
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\Serializer.h" />
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\STParsedJSON.h" />
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\TER.h" />
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\TxFlags.h" />
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\TxFormats.h" />
|
||||
@@ -1982,7 +2603,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_data\utility\UptimeTimerAdapter.h" />
|
||||
<ClInclude Include="..\..\src\ripple_hyperleveldb\ripple_hyperleveldb.h" />
|
||||
<ClInclude Include="..\..\src\ripple_leveldb\ripple_leveldb.h" />
|
||||
<ClInclude Include="..\..\src\ripple_mdb\ripple_mdb.h" />
|
||||
<ClInclude Include="..\..\src\ripple_net\basics\impl\MultiSocketType.h" />
|
||||
<ClInclude Include="..\..\src\ripple_net\basics\impl\RPCServerImp.h" />
|
||||
<ClInclude Include="..\..\src\ripple_net\basics\RippleSSLContext.h" />
|
||||
@@ -2063,6 +2683,7 @@
|
||||
<ClInclude Include="..\..\src\websocket\src\sha1\sha1.h" />
|
||||
<ClInclude Include="..\..\src\websocket\src\shared_const_buffer.hpp" />
|
||||
<ClInclude Include="..\..\src\websocket\src\sockets\autotls.hpp" />
|
||||
<ClInclude Include="..\..\src\websocket\src\sockets\multitls.hpp" />
|
||||
<ClInclude Include="..\..\src\websocket\src\sockets\plain.hpp" />
|
||||
<ClInclude Include="..\..\src\websocket\src\sockets\socket_base.hpp" />
|
||||
<ClInclude Include="..\..\src\websocket\src\sockets\tls.hpp" />
|
||||
@@ -2088,12 +2709,16 @@
|
||||
<None Include="..\..\doc\Doxyfile" />
|
||||
<None Include="..\..\doc\rippled-example.cfg" />
|
||||
<None Include="..\..\LICENSE" />
|
||||
<None Include="..\..\src\ripple\algorithm\README.md" />
|
||||
<None Include="..\..\src\ripple\algorithm\TODO.md" />
|
||||
<None Include="..\..\src\ripple\beast\ripple_beastobjc.mm">
|
||||
<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>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\http\README.md" />
|
||||
<None Include="..\..\src\ripple\http\TODO.md" />
|
||||
<None Include="..\..\src\ripple\json\impl\json_internalarray.inl" />
|
||||
<None Include="..\..\src\ripple\json\impl\json_internalmap.inl" />
|
||||
<None Include="..\..\src\ripple\json\impl\json_valueiterator.inl" />
|
||||
@@ -2101,6 +2726,26 @@
|
||||
<None Include="..\..\src\ripple\json\impl\version" />
|
||||
<None Include="..\..\README.md" />
|
||||
<None Include="..\..\SConstruct" />
|
||||
<None Include="..\..\src\ripple\json\README.md" />
|
||||
<None Include="..\..\src\ripple\json\TODO.md" />
|
||||
<None Include="..\..\src\ripple\peerfinder\README.md" />
|
||||
<None Include="..\..\src\ripple\peerfinder\TODO.md" />
|
||||
<None Include="..\..\src\ripple\resource\README.md" />
|
||||
<None Include="..\..\src\ripple\resource\TODO.md" />
|
||||
<None Include="..\..\src\ripple\rpc\README.md" />
|
||||
<None Include="..\..\src\ripple\rpc\TODO.md" />
|
||||
<None Include="..\..\src\ripple\sitefiles\README.md" />
|
||||
<None Include="..\..\src\ripple\sitefiles\TODO.md" />
|
||||
<None Include="..\..\src\ripple\sslutil\README.md" />
|
||||
<None Include="..\..\src\ripple\sslutil\TODO.md" />
|
||||
<None Include="..\..\src\ripple\testoverlay\README.md" />
|
||||
<None Include="..\..\src\ripple\testoverlay\TODO.md" />
|
||||
<None Include="..\..\src\ripple\types\README.md" />
|
||||
<None Include="..\..\src\ripple\types\TODO.md" />
|
||||
<None Include="..\..\src\ripple\validators\TODO.md" />
|
||||
<None Include="..\..\src\ripple\validators\README.md" />
|
||||
<None Include="..\..\src\ripple_app\ledger\TODO.md" />
|
||||
<None Include="..\..\src\ripple_app\TODO.md" />
|
||||
<None Include="..\QtCreator\rippled.pro" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -130,9 +130,6 @@
|
||||
<Filter Include="[2] Old Ripple\ripple_net\rpc">
|
||||
<UniqueIdentifier>{045285aa-9043-4cee-b8ca-cc8881e52f6a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[2] Old Ripple\ripple_mdb">
|
||||
<UniqueIdentifier>{6a769530-8edf-4836-afc8-8836fe315603}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[2] Old Ripple\ripple_hyperleveldb">
|
||||
<UniqueIdentifier>{571acd5b-065c-4202-8de3-8692735171dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -166,9 +163,6 @@
|
||||
<Filter Include="[1] Ripple\beast">
|
||||
<UniqueIdentifier>{458b9099-fcf6-49fe-b3fb-a27beb2ee070}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\sophia">
|
||||
<UniqueIdentifier>{29b20c8e-267a-487a-9086-fb0c85a922f6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\json">
|
||||
<UniqueIdentifier>{d95b931f-b5fd-4d15-a040-e832ac1e2f87}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -262,6 +256,48 @@
|
||||
<Filter Include="[1] Ripple\sitefiles\impl">
|
||||
<UniqueIdentifier>{5609ad93-0654-41db-8ecb-7dfcde58d2e6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb">
|
||||
<UniqueIdentifier>{b244f110-0549-40d2-963b-8c0af87de917}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb">
|
||||
<UniqueIdentifier>{514156a8-2473-4bf3-940f-bd7c166e726f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\db">
|
||||
<UniqueIdentifier>{9e7aee3c-76bf-408c-8577-b055919b9f8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\memenv">
|
||||
<UniqueIdentifier>{7e693c99-fcae-4f60-a6d4-e4fe27119959}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\port">
|
||||
<UniqueIdentifier>{d2a35ae6-6911-4b77-966d-cac44fccb429}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\port\win">
|
||||
<UniqueIdentifier>{076ca841-0b06-400a-a87c-8d1df126f43f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\table">
|
||||
<UniqueIdentifier>{17b0a87f-5a62-48af-9cdd-cbe9af7736d2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\util">
|
||||
<UniqueIdentifier>{e4649e1a-07bc-4633-a01f-3615a7da53c7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\include">
|
||||
<UniqueIdentifier>{c02d2b7e-253d-49fb-b0db-b30c861bb2dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\include\rocksdb">
|
||||
<UniqueIdentifier>{424405b5-72c7-4d07-add8-3c81d3da6e5a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\rocksdb\rocksdb\include\utilities">
|
||||
<UniqueIdentifier>{013f0eb9-bf1d-4b11-8c2c-3fd99d4b8ef5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\common">
|
||||
<UniqueIdentifier>{b99052d6-a903-4dfd-9c68-ff767a7d8f63}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\common\functional">
|
||||
<UniqueIdentifier>{70365f6a-d1e6-45f2-a064-0e842b0fdd78}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="[1] Ripple\common\functional\impl">
|
||||
<UniqueIdentifier>{9b8137bd-737d-4825-98bf-897a0635293a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\ripple_basics\containers\RangeSet.cpp">
|
||||
@@ -666,9 +702,6 @@
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\Peers.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\PeerSet.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\UniqueNodeList.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClCompile>
|
||||
@@ -834,9 +867,6 @@
|
||||
<ClCompile Include="..\..\src\ripple_basics\log\LogFile.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_basics\log</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_basics\log\LogJournal.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_basics\log</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_basics\log\LogSink.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_basics\log</Filter>
|
||||
</ClCompile>
|
||||
@@ -906,9 +936,6 @@
|
||||
<ClCompile Include="..\..\src\ripple_hyperleveldb\ripple_hyperleveldb.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_hyperleveldb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_mdb\ripple_mdb.c">
|
||||
<Filter>[2] Old Ripple\ripple_mdb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_net\ripple_net.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_net</Filter>
|
||||
</ClCompile>
|
||||
@@ -933,9 +960,6 @@
|
||||
<ClCompile Include="..\..\src\ripple_app\main\IoServicePool.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\main</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\sophia\ripple_sophia.c">
|
||||
<Filter>[1] Ripple\sophia</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\json\impl\json_reader.cpp">
|
||||
<Filter>[1] Ripple\json\impl</Filter>
|
||||
</ClCompile>
|
||||
@@ -966,24 +990,15 @@
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\tests\TimingTests.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\SophiaFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\NullFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\MemoryFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\MdbFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\LevelDBFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\KeyvaDBFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\HyperDBFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
@@ -1152,6 +1167,285 @@
|
||||
<ClCompile Include="..\..\src\ripple\sitefiles\impl\Manager.cpp">
|
||||
<Filter>[1] Ripple\sitefiles\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\ripple_rocksdb.cpp">
|
||||
<Filter>[1] Ripple\rocksdb</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\builder.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\db_bench.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\db_filesnapshot.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\db_impl.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\db_impl_readonly.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\db_iter.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\db_stats_logger.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\dbformat.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\filename.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\log_reader.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\log_writer.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\memtable.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\memtablelist.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\merge_helper.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\merge_operator.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\repair.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\table_cache.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\table_properties_collector.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\transaction_log_impl.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\version_edit.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\version_set.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\version_set_reduce_num_levels.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\db\write_batch.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\helpers\memenv\memenv.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\memenv</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\port\port_posix.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\port</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\port\stack_trace.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\port</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\block.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_builder.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_factory.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_reader.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\block_builder.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\block_test.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\filter_block.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\filter_block_test.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\flush_block_policy.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\format.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\iterator.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\merger.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\table\two_level_iterator.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\arena_impl.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\auto_roll_logger.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\blob_store.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\bloom.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\cache.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\coding.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\comparator.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\crc32c.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\env.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\env_hdfs.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\env_posix.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\env_test.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\filelock_test.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\filter_policy.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\hash.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\hash_skiplist_rep.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\histogram.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\ldb_cmd.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\ldb_tool.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\logging.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\murmurhash.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\options.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\perf_context.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\signal_test.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\skiplistrep.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\slice.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\statistics.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\status.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\string_util.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\testharness.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\testutil.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\transformrep.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rocksdb\rocksdb\util\vectorrep.cc">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\ledger\LedgerCleaner.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\main\CollectorManager.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\main</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\NameResolver.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\shamap\FetchPackTests.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\shamap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\shamap\RadixMapTest.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\shamap</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\types\impl\RippleAssets.cpp">
|
||||
<Filter>[1] Ripple\types\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\common\ripple_common.cpp">
|
||||
<Filter>[1] Ripple\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\common\functional\impl\counted_bind.cpp">
|
||||
<Filter>[1] Ripple\common\functional\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\backend\RocksDBFactory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_basics\containers\KeyCache.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_basics\containers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Backend.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Factory.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Scheduler.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Task.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Database.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_core\nodestore\impl\Manager.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\peers\PeerSet.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_data\protocol\STParsedJSON.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_data\protocol</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple\rpc\impl\ErrorCodes.cpp">
|
||||
<Filter>[1] Ripple\rpc\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\ripple_app\paths\PathRequests.cpp">
|
||||
<Filter>[2] Old Ripple\ripple_app\paths</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\ripple_basics\containers\KeyCache.h">
|
||||
@@ -1508,6 +1802,9 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerTiming.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerHolder.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\OrderBookDB.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
@@ -1607,9 +1904,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\Peer.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\PeerSet.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\UniqueNodeList.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClInclude>
|
||||
@@ -1706,9 +2000,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\Peers.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\LoadSource.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\functional</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\main\LoadManager.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\main</Filter>
|
||||
</ClInclude>
|
||||
@@ -1739,9 +2030,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_net\basics\RPCDoor.h">
|
||||
<Filter>[2] Old Ripple\ripple_net\basics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\LoadSource.h">
|
||||
<Filter>[1] Ripple\ripple_core\functional</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\main\LoadManager.h">
|
||||
<Filter>[1] Ripple\ripple_app\main</Filter>
|
||||
</ClInclude>
|
||||
@@ -1860,9 +2148,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LoggedTimings.h">
|
||||
<Filter>[2] Old Ripple\ripple_basics\log</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogJournal.h">
|
||||
<Filter>[2] Old Ripple\ripple_basics\log</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_basics\log\LogSink.h">
|
||||
<Filter>[2] Old Ripple\ripple_basics\log</Filter>
|
||||
</ClInclude>
|
||||
@@ -1923,9 +2208,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_leveldb\ripple_leveldb.h">
|
||||
<Filter>[2] Old Ripple\ripple_leveldb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_mdb\ripple_mdb.h">
|
||||
<Filter>[2] Old Ripple\ripple_mdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_net\ripple_net.h">
|
||||
<Filter>[2] Old Ripple\ripple_net</Filter>
|
||||
</ClInclude>
|
||||
@@ -1944,9 +2226,6 @@
|
||||
<ClInclude Include="..\..\src\ripple_app\main\IoServicePool.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\main</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\sophia\ripple_sophia.h">
|
||||
<Filter>[1] Ripple\sophia</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\json\api\json_features.h">
|
||||
<Filter>[1] Ripple\json\api</Filter>
|
||||
</ClInclude>
|
||||
@@ -2007,39 +2286,24 @@
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Factory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\Factories.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\VisitCallback.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\SophiaFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\NullFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\MemoryFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\MdbFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\LevelDBFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\KeyvaDBFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\HyperDBFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\tests\TestBase.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\tests</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\DatabaseImp.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Task.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\api</Filter>
|
||||
</ClInclude>
|
||||
@@ -2184,9 +2448,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\types\api\CryptoIdentifier.h">
|
||||
<Filter>[1] Ripple\types\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_basics\containers\BlackList.h">
|
||||
<Filter>[2] Old Ripple\ripple_basics\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\functional\LoadFeeTrackImp.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\functional</Filter>
|
||||
</ClInclude>
|
||||
@@ -2289,9 +2550,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\resource\api\Manager.h">
|
||||
<Filter>[1] Ripple\resource\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\DecayingSample.h">
|
||||
<Filter>[1] Ripple\resource\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\Kind.h">
|
||||
<Filter>[1] Ripple\resource\impl</Filter>
|
||||
</ClInclude>
|
||||
@@ -2319,9 +2577,6 @@
|
||||
<ClInclude Include="..\..\src\ripple\resource\api\LegacyFees.h">
|
||||
<Filter>[1] Ripple\resource\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\resource\impl\LogicType.h">
|
||||
<Filter>[1] Ripple\resource\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\peerfinder\impl\LogicType.h">
|
||||
<Filter>[1] Ripple\peerfinder\impl</Filter>
|
||||
</ClInclude>
|
||||
@@ -2361,6 +2616,336 @@
|
||||
<ClInclude Include="..\..\src\ripple\sitefiles\api\Listener.h">
|
||||
<Filter>[1] Ripple\sitefiles\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\websocket\src\sockets\multitls.hpp">
|
||||
<Filter>[0] Libraries\websocket</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\ripple_rocksdb.h">
|
||||
<Filter>[1] Ripple\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\builder.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_impl.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_impl_readonly.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_iter.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\db_statistics.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\dbformat.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\filename.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\log_format.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\log_reader.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\log_writer.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\memtable.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\memtablelist.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\merge_helper.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\prefix_filter_iterator.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\skiplist.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\snapshot.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\table_cache.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\table_properties_collector.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\transaction_log_impl.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\version_edit.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\version_set.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\db\write_batch_internal.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\helpers\memenv\memenv.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\memenv</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\atomic_pointer.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\port</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\port.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\port</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\port_posix.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\port</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\port\win\stdint.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\port\win</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_builder.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_factory.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_based_table_reader.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\block_builder.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\filter_block.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\format.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\iter_heap.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\iterator_wrapper.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\merger.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\table\two_level_iterator.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\table</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\arena_impl.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\auto_roll_logger.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\bit_set.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\blob_store.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\build_version.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\coding.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\crc32c.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\hash.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\histogram.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\ldb_cmd.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\ldb_cmd_execute_result.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\logging.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\murmurhash.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\mutexlock.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\perf_context_imp.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\posix_logger.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\random.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stack_trace.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stats_logger.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stl_wrappers.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\stop_watch.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\string_util.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\testharness.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\util\testutil.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\arena.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\c.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\cache.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\compaction_filter.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\comparator.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\db.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\env.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\filter_policy.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\flush_block_policy.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\iterator.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\ldb_tool.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\memtablerep.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\merge_operator.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\options.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\perf_context.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\slice.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\slice_transform.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\statistics.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\status.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\table.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\table_properties.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\transaction_log.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\types.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\universal_compaction.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\rocksdb\write_batch.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\rocksdb</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\utilities\stackable_db.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rocksdb\rocksdb\include\utilities\utility_db.h">
|
||||
<Filter>[1] Ripple\rocksdb\rocksdb\include\utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\LedgerCleaner.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\algorithm\api\DecayingSample.h">
|
||||
<Filter>[1] Ripple\algorithm\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\main\CollectorManager.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\main</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\NameResolver.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\shamap\RadixMapTest.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\shamap</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\types\api\RippleAssets.h">
|
||||
<Filter>[1] Ripple\types\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\common\functional\counted_bind.h">
|
||||
<Filter>[1] Ripple\common\functional</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\backend\RocksDBFactory.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\backend</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\api\Manager.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\DatabaseImp.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_core\nodestore\impl\Tuning.h">
|
||||
<Filter>[2] Old Ripple\ripple_core\nodestore\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\DirectoryEntryIterator.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\OrderBookIterator.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\DirectoryEntryIterator.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\ledger\OrderBookIterator.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\peers\PeerSet.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\peers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_data\protocol\STParsedJSON.h">
|
||||
<Filter>[2] Old Ripple\ripple_data\protocol</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple\rpc\api\ErrorCodes.h">
|
||||
<Filter>[1] Ripple\rpc\api</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\ripple_app\paths\PathRequests.h">
|
||||
<Filter>[2] Old Ripple\ripple_app\paths</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\src\ripple_data\protocol\ripple.proto">
|
||||
@@ -2404,6 +2989,78 @@
|
||||
<None Include="..\..\LICENSE">
|
||||
<Filter>%28Notes%29</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\peerfinder\README.md">
|
||||
<Filter>[1] Ripple\peerfinder</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\testoverlay\README.md">
|
||||
<Filter>[1] Ripple\testoverlay</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\peerfinder\TODO.md">
|
||||
<Filter>[1] Ripple\peerfinder</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\validators\TODO.md">
|
||||
<Filter>[1] Ripple\validators</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\resource\TODO.md">
|
||||
<Filter>[1] Ripple\resource</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\resource\README.md">
|
||||
<Filter>[1] Ripple\resource</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\types\README.md">
|
||||
<Filter>[1] Ripple\types</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\types\TODO.md">
|
||||
<Filter>[1] Ripple\types</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\testoverlay\TODO.md">
|
||||
<Filter>[1] Ripple\testoverlay</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\algorithm\README.md">
|
||||
<Filter>[1] Ripple\algorithm</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\algorithm\TODO.md">
|
||||
<Filter>[1] Ripple\algorithm</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\http\README.md">
|
||||
<Filter>[1] Ripple\http</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\http\TODO.md">
|
||||
<Filter>[1] Ripple\http</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\json\README.md">
|
||||
<Filter>[1] Ripple\json</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\json\TODO.md">
|
||||
<Filter>[1] Ripple\json</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\rpc\README.md">
|
||||
<Filter>[1] Ripple\rpc</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\rpc\TODO.md">
|
||||
<Filter>[1] Ripple\rpc</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\sitefiles\README.md">
|
||||
<Filter>[1] Ripple\sitefiles</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\sitefiles\TODO.md">
|
||||
<Filter>[1] Ripple\sitefiles</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\sslutil\README.md">
|
||||
<Filter>[1] Ripple\sslutil</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\sslutil\TODO.md">
|
||||
<Filter>[1] Ripple\sslutil</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple\validators\README.md">
|
||||
<Filter>[1] Ripple\validators</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple_app\TODO.md">
|
||||
<Filter>[2] Old Ripple\ripple_app</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\ripple_app\ledger\TODO.md">
|
||||
<Filter>[2] Old Ripple\ripple_app\ledger</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\doc\todo\NIKB_TODO.txt">
|
||||
|
||||
38
SConstruct
38
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,6 +17,8 @@ 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
|
||||
|
||||
#
|
||||
# We expect this to be set
|
||||
#
|
||||
@@ -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
|
||||
@@ -48,8 +55,8 @@ if OSX:
|
||||
env.Replace(CC= 'clang')
|
||||
env.Replace(CXX= 'clang++')
|
||||
env.Append(CXXFLAGS = ['-std=c++11', '-stdlib=libc++'])
|
||||
env.Append(LINKFLAGS='-stdlib=libc++')
|
||||
env['FRAMEWORKS'] = ['AppKit']
|
||||
env.Append(LINKFLAGS='-stdlib=libc++')
|
||||
env['FRAMEWORKS'] = ['AppKit','Foundation']
|
||||
|
||||
GCC_VERSION = re.split('\.', commands.getoutput(env['CXX'] + ' -dumpversion'))
|
||||
|
||||
@@ -93,13 +100,13 @@ 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 FreeBSD or Ubuntu or Archlinux or OSX:
|
||||
# non-mt libs do link with pthreads.
|
||||
env.Append(
|
||||
LIBS = BOOST_LIBS
|
||||
@@ -156,13 +163,14 @@ COMPILED_FILES.extend (['src/ripple/beast/ripple_beastc.c'])
|
||||
# New-style Ripple unity sources
|
||||
#
|
||||
COMPILED_FILES.extend([
|
||||
'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/resource/ripple_resource.cpp',
|
||||
'src/ripple/rocksdb/ripple_rocksdb.cpp',
|
||||
'src/ripple/rpc/ripple_rpc.cpp',
|
||||
'src/ripple/sitefiles/ripple_sitefiles.cpp',
|
||||
'src/ripple/sophia/ripple_sophia.c',
|
||||
'src/ripple/sslutil/ripple_sslutil.cpp',
|
||||
'src/ripple/testoverlay/ripple_testoverlay.cpp',
|
||||
'src/ripple/types/ripple_types.cpp',
|
||||
@@ -187,7 +195,6 @@ 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_websocket/ripple_websocket.cpp'
|
||||
])
|
||||
@@ -251,10 +258,19 @@ env.Append(CXXFLAGS = ['-O1', '-pthread', '-Wno-invalid-offsetof', '-Wformat']+D
|
||||
#
|
||||
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:
|
||||
|
||||
@@ -655,8 +655,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:
|
||||
@@ -707,6 +707,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.
|
||||
@@ -748,13 +783,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
|
||||
@@ -772,3 +808,17 @@ pool.ntp.org
|
||||
107.21.251.218 51235
|
||||
184.73.226.101 51235
|
||||
23.23.201.55 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
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
"test": "mocha test/*-test.{js,coffee}"
|
||||
"test": "mocha"
|
||||
},
|
||||
|
||||
"repository": {
|
||||
|
||||
@@ -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,6 +163,20 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// 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.
|
||||
//
|
||||
@@ -178,11 +199,4 @@
|
||||
#define RIPPLE_USE_RPC_SERVICE_MANAGER 0
|
||||
#endif
|
||||
|
||||
// Here temporarily
|
||||
// Controls whether or not the new Resource manager replaces the BlackList
|
||||
// and LoadManager for measuring and controlling access to the server
|
||||
#ifndef RIPPLE_USE_RESOURCE_MANAGER
|
||||
#define RIPPLE_USE_RESOURCE_MANAGER 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.
|
||||
|
||||
@@ -83,12 +83,18 @@
|
||||
<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\chrono_io.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\chrono_util.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\CPUMeter.h" />
|
||||
<ClInclude Include="..\..\beast\chrono\abstract_clock.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" />
|
||||
@@ -110,39 +116,48 @@
|
||||
<ClInclude Include="..\..\beast\config\SelectStdlibConfig.h" />
|
||||
<ClInclude Include="..\..\beast\config\StandardConfig.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\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\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\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\make_unique.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\DynamicBuffer.h" />
|
||||
<ClInclude Include="..\..\beast\net\IPAddress.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" />
|
||||
@@ -164,6 +179,7 @@
|
||||
<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" />
|
||||
@@ -187,6 +203,7 @@
|
||||
<ClInclude Include="..\..\beast\utility\Debug.h" />
|
||||
<ClInclude Include="..\..\beast\utility\EnableIf.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" />
|
||||
@@ -244,19 +261,15 @@
|
||||
<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\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\SortedSet.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SparseSet.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\Variant.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FatalError.h" />
|
||||
@@ -278,24 +291,16 @@
|
||||
<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\Random.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Range.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\uint24.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\MemoryAlignment.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\MemoryBlock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\OptionalScopedPointer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\RecycledObjectPool.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedFunction.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedSingleton.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\WeakReference.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" />
|
||||
@@ -342,7 +347,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\ScopedWriteLock.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\SpinDelay.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\DeadlineTimer.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Semaphore.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" />
|
||||
@@ -370,14 +374,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" />
|
||||
@@ -412,12 +408,24 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\boost\Boost.cpp" />
|
||||
<ClCompile Include="..\..\beast\chrono\Chrono.cpp" />
|
||||
<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>
|
||||
@@ -425,6 +433,12 @@
|
||||
<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>
|
||||
@@ -455,6 +469,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>
|
||||
@@ -498,6 +518,37 @@
|
||||
<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\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>
|
||||
@@ -511,6 +562,12 @@
|
||||
<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>
|
||||
@@ -755,12 +812,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>
|
||||
@@ -879,12 +930,6 @@
|
||||
<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\Random.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@@ -1185,12 +1230,6 @@
|
||||
<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\Workers.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
@@ -1317,27 +1356,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>
|
||||
@@ -1482,6 +1500,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>
|
||||
@@ -1510,6 +1530,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>
|
||||
|
||||
@@ -135,18 +135,6 @@
|
||||
<Filter Include="beast_core\diagnostic">
|
||||
<UniqueIdentifier>{69e28551-92ea-420b-a465-75ed248e3b59}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_crypto">
|
||||
<UniqueIdentifier>{62b1f8e3-79e4-46cc-b3fb-a12754aef249}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_crypto\math">
|
||||
<UniqueIdentifier>{1170f2bc-2456-410a-ab2b-c45f6ed37b9e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_db">
|
||||
<UniqueIdentifier>{4834218f-f13f-41bc-a8a0-50314a3a99a3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_db\keyvalue">
|
||||
<UniqueIdentifier>{15a98fee-1b52-45eb-9480-514b8750d755}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_sqlite">
|
||||
<UniqueIdentifier>{cbf5f5a3-5d66-4b6d-996d-20ed14b41793}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -195,12 +183,6 @@
|
||||
<Filter Include="beast_core\thread\impl">
|
||||
<UniqueIdentifier>{91538dcf-b219-4c80-9861-bb4949089775}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_extras">
|
||||
<UniqueIdentifier>{2f5b95a8-1adf-4319-8464-ddc2b2e03f0b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_extras\traits">
|
||||
<UniqueIdentifier>{bf498396-2e1f-4903-be68-3053ba439af5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast_asio\protocol">
|
||||
<UniqueIdentifier>{c0724499-ab69-40c3-90e2-65242dbd2eaa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -255,15 +237,6 @@
|
||||
<Filter Include="beast\config">
|
||||
<UniqueIdentifier>{1fff3bd8-44ae-41df-8dd4-8bb6f07b2908}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\crypto">
|
||||
<UniqueIdentifier>{9c1ef4c4-5623-4500-859f-12d6ce5ae362}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\crypto\impl">
|
||||
<UniqueIdentifier>{fc3d3f14-9ba1-43e4-b086-cbbd2f63b944}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\crypto\impl\sha2">
|
||||
<UniqueIdentifier>{44489531-f44a-439a-a6ea-d32c252b1e8b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\chrono">
|
||||
<UniqueIdentifier>{57dc7059-cbb2-437c-9c52-79825d9a4cf5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -303,14 +276,29 @@
|
||||
<Filter Include="beast\asio\impl">
|
||||
<UniqueIdentifier>{30b0fdfb-02b6-47dd-bdd9-ffc1f57e1f2c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\smart_ptr\impl">
|
||||
<UniqueIdentifier>{df4f2935-13a1-4afe-90cc-d86472ec2466}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\insight">
|
||||
<UniqueIdentifier>{174b9125-76a7-4796-be97-79c2dcc751f1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\insight\impl">
|
||||
<UniqueIdentifier>{04f27818-7843-4ef3-967c-1761dc892342}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\crypto">
|
||||
<UniqueIdentifier>{9c1ef4c4-5623-4500-859f-12d6ce5ae362}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\crypto\impl">
|
||||
<UniqueIdentifier>{fc3d3f14-9ba1-43e4-b086-cbbd2f63b944}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="beast\crypto\impl\sha2">
|
||||
<UniqueIdentifier>{44489531-f44a-439a-a6ea-d32c252b1e8b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\modules\beast_core\beast_core.h">
|
||||
<Filter>beast_core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\AbstractFifo.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\Array.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
@@ -338,9 +326,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\ScopedValueSetter.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SortedSet.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SparseSet.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
@@ -380,9 +365,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\BigInteger.h">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Expression.h">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Random.h">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClInclude>
|
||||
@@ -395,9 +377,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\OptionalScopedPointer.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\WeakReference.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\misc\Result.h">
|
||||
<Filter>beast_core\misc</Filter>
|
||||
</ClInclude>
|
||||
@@ -563,21 +542,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\MemoryAlignment.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicCounter.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicFlag.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicPointer.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\AtomicState.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\LockFreeQueue.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\threads\SpinDelay.h">
|
||||
<Filter>beast_core\threads</Filter>
|
||||
</ClInclude>
|
||||
@@ -587,33 +551,15 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\Throw.h">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\Interval.h">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\UnitTest.h">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_crypto\beast_crypto.h">
|
||||
<Filter>beast_crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\containers\SharedObjectArray.h">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\files\RandomAccessFile.h">
|
||||
<Filter>beast_core\files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\UnitTestUtilities.h">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\RecycledObjectPool.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_db\beast_db.h">
|
||||
<Filter>beast_db</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_db\keyvalue\KeyvaDB.h">
|
||||
<Filter>beast_db\keyvalue</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_sqlite\beast_sqlite.h">
|
||||
<Filter>beast_sqlite</Filter>
|
||||
</ClInclude>
|
||||
@@ -719,9 +665,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\DeadlineTimer.h">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Semaphore.h">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Workers.h">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClInclude>
|
||||
@@ -740,12 +683,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_asio\system\BoostIncludes.h">
|
||||
<Filter>beast_asio\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_extras\traits\BoostLockableTraits.h">
|
||||
<Filter>beast_extras\traits</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_extras\beast_extras.h">
|
||||
<Filter>beast_extras</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BeforeBoost.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
@@ -764,30 +701,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\system\SystemStats.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\intrusive\ForwardList.h">
|
||||
<Filter>beast\intrusive</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\intrusive\PointerTraits.h">
|
||||
<Filter>beast\intrusive</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveConst.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveConstVolatile.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveReference.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\RemoveVolatile.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\AddConst.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\PointerToOther.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_asio\async\ComposedAsyncOperation.h">
|
||||
<Filter>beast_asio\async</Filter>
|
||||
</ClInclude>
|
||||
@@ -902,9 +815,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_asio\http\HTTPParserImpl.h">
|
||||
<Filter>beast_asio\http</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\IfCond.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_asio\basics\BuffersType.h">
|
||||
<Filter>beast_asio\basics</Filter>
|
||||
</ClInclude>
|
||||
@@ -920,15 +830,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\diagnostic\FatalError.h">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_crypto\math\UnsignedInteger.h">
|
||||
<Filter>beast_crypto\math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_crypto\math\UnsignedIntegerCalc.h">
|
||||
<Filter>beast_crypto\math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_crypto\math\BinaryEncoding.h">
|
||||
<Filter>beast_crypto\math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\SharedFunction.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
@@ -992,12 +893,6 @@
|
||||
<ClInclude Include="..\..\beast\intrusive\LockFreeStack.h">
|
||||
<Filter>beast\intrusive</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\intrusive\List.h">
|
||||
<Filter>beast\intrusive</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\mpl\CopyConst.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\http\impl\http-parser\http_parser.h">
|
||||
<Filter>beast\http\impl\http-parser</Filter>
|
||||
</ClInclude>
|
||||
@@ -1079,9 +974,6 @@
|
||||
<ClInclude Include="..\..\beast\FixedArray.h">
|
||||
<Filter>beast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\intrusive\IntrusiveArray.h">
|
||||
<Filter>beast\intrusive</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\Crypto.h">
|
||||
<Filter>beast</Filter>
|
||||
</ClInclude>
|
||||
@@ -1263,11 +1155,95 @@
|
||||
<ClInclude Include="..\..\beast\crypto\MurmurHash.h">
|
||||
<Filter>beast\crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\smart_ptr\AbstractObject.h">
|
||||
<Filter>beast\smart_ptr</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\Insight.h">
|
||||
<Filter>beast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\Collector.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\Counter.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\CounterImpl.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\Event.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\EventImpl.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\Gauge.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\GaugeImpl.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\Meter.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\MeterImpl.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\NullCollector.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\StatsDCollector.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\Hook.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\insight\HookImpl.h">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\cyclic_iterator.h">
|
||||
<Filter>beast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\threads\semaphore.h">
|
||||
<Filter>beast\threads</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\intrusive\List.h">
|
||||
<Filter>beast\intrusive</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\crypto\BinaryEncoding.h">
|
||||
<Filter>beast\crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\crypto\UnsignedInteger.h">
|
||||
<Filter>beast\crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\crypto\UnsignedIntegerCalc.h">
|
||||
<Filter>beast\crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\chrono\abstract_clock.h">
|
||||
<Filter>beast\chrono</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\chrono\manual_clock.h">
|
||||
<Filter>beast\chrono</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\chrono\ratio_io.h">
|
||||
<Filter>beast\chrono</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\chrono\chrono_io.h">
|
||||
<Filter>beast\chrono</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\utility\hash_pair.h">
|
||||
<Filter>beast\utility</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\asio\io_latency_probe.h">
|
||||
<Filter>beast\asio</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\make_unique.h">
|
||||
<Filter>beast</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\beast\chrono\chrono_util.h">
|
||||
<Filter>beast\chrono</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\AbstractFifo.cpp">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\DynamicObject.cpp">
|
||||
<Filter>beast_core\containers</Filter>
|
||||
</ClCompile>
|
||||
@@ -1310,9 +1286,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_core\maths\BigInteger.cpp">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\maths\Expression.cpp">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\maths\Random.cpp">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClCompile>
|
||||
@@ -1514,12 +1487,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\UnitTestUtilities.cpp">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_db\beast_db.cpp">
|
||||
<Filter>beast_db</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_db\keyvalue\KeyvaDB.cpp">
|
||||
<Filter>beast_db\keyvalue</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_sqlite\beast_sqlite.c">
|
||||
<Filter>beast_sqlite</Filter>
|
||||
</ClCompile>
|
||||
@@ -1577,9 +1544,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\DeadlineTimer.cpp">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Semaphore.cpp">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Workers.cpp">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClCompile>
|
||||
@@ -1658,9 +1622,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_asio\http\HTTPParser.cpp">
|
||||
<Filter>beast_asio\http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_crypto\beast_crypto.cpp">
|
||||
<Filter>beast_crypto</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\beast_core.cpp">
|
||||
<Filter>beast_core</Filter>
|
||||
</ClCompile>
|
||||
@@ -1676,15 +1637,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_core\diagnostic\FatalError.cpp">
|
||||
<Filter>beast_core\diagnostic</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_crypto\math\UnsignedInteger.cpp">
|
||||
<Filter>beast_crypto\math</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_crypto\math\BinaryEncoding.cpp">
|
||||
<Filter>beast_crypto\math</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_extras\beast_extras.cpp">
|
||||
<Filter>beast_extras</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\net\Net.cpp">
|
||||
<Filter>beast\net</Filter>
|
||||
</ClCompile>
|
||||
@@ -1817,6 +1769,39 @@
|
||||
<ClCompile Include="..\..\beast\crypto\impl\MurmurHash.cpp">
|
||||
<Filter>beast\crypto\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\smart_ptr\impl\AbstractObject.cpp">
|
||||
<Filter>beast\smart_ptr\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\Insight.cpp">
|
||||
<Filter>beast\insight</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Collector.cpp">
|
||||
<Filter>beast\insight\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Metric.cpp">
|
||||
<Filter>beast\insight\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\NullCollector.cpp">
|
||||
<Filter>beast\insight\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\StatsDCollector.cpp">
|
||||
<Filter>beast\insight\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\insight\impl\Hook.cpp">
|
||||
<Filter>beast\insight\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\chrono\impl\abstract_clock.cpp">
|
||||
<Filter>beast\chrono\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\chrono\impl\chrono_io.cpp">
|
||||
<Filter>beast\chrono\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\crypto\impl\BinaryEncoding.cpp">
|
||||
<Filter>beast\crypto\impl</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\beast\crypto\impl\UnsignedInteger.cpp">
|
||||
<Filter>beast\crypto\impl</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\TODO.txt">
|
||||
|
||||
@@ -52,8 +52,6 @@ BEAST TODO
|
||||
|
||||
- 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
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.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.
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
#ifndef BEAST_CHRONO_H_INCLUDED
|
||||
#define BEAST_CHRONO_H_INCLUDED
|
||||
|
||||
#include "chrono/abstract_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"
|
||||
|
||||
@@ -20,8 +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>
|
||||
|
||||
35
src/beast/beast/Insight.h
Normal file
35
src/beast/beast/Insight.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_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/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 {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "smart_ptr/AbstractObject.h"
|
||||
#include "smart_ptr/ContainerDeletePolicy.h"
|
||||
#include "smart_ptr/SharedObject.h"
|
||||
#include "smart_ptr/SharedPtr.h"
|
||||
|
||||
@@ -34,4 +34,6 @@
|
||||
#include "threads/WaitableEvent.h"
|
||||
#include "threads/ScopedWrapperContext.h"
|
||||
|
||||
#include "threads/semaphore.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,5 +29,7 @@
|
||||
#include "utility/PropertyStream.h"
|
||||
#include "utility/StaticObject.h"
|
||||
|
||||
#include "utility/hash_pair.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
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,5 +19,11 @@
|
||||
|
||||
#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/CPUMeter.cpp"
|
||||
#include "impl/RelativeTime.cpp"
|
||||
|
||||
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 () = 0;
|
||||
|
||||
/** Convert the specified time point to a string. */
|
||||
/** @{ */
|
||||
virtual std::string to_string (time_point const& tp) = 0;
|
||||
|
||||
template <class Duration2>
|
||||
std::string to_string (
|
||||
std::chrono::time_point <abstract_clock, Duration2> const& tp)
|
||||
{
|
||||
return to_string (
|
||||
std::chrono::time_point_cast <Duration> (tp));
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Returning elapsed ticks since the epoch. */
|
||||
rep elapsed ()
|
||||
{
|
||||
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 ()
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
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
|
||||
@@ -256,23 +256,29 @@ std::string RelativeTime::to_string () const
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace beast {
|
||||
|
||||
namespace detail {
|
||||
|
||||
#if BEAST_WINDOWS
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
static double monotonicCurrentTimeInSeconds()
|
||||
{
|
||||
return GetTickCount64() / 1000.0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#elif BEAST_MAC || BEAST_IOS
|
||||
|
||||
#include <time.h>
|
||||
#include <mach/mach_time.h>
|
||||
#include <mach/mach.h>
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
static double monotonicCurrentTimeInSeconds()
|
||||
{
|
||||
@@ -309,20 +315,31 @@ static double monotonicCurrentTimeInSeconds()
|
||||
|
||||
return mach_absolute_time() * data.ratio;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <time.h>
|
||||
|
||||
namespace beast {
|
||||
namespace detail {
|
||||
|
||||
static double monotonicCurrentTimeInSeconds()
|
||||
{
|
||||
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 double getStartupTime()
|
||||
{
|
||||
|
||||
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_;
|
||||
|
||||
}
|
||||
@@ -17,30 +17,25 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_IFCOND_H_INCLUDED
|
||||
#define BEAST_MPL_IFCOND_H_INCLUDED
|
||||
// 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).
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
#include "../chrono_io.h"
|
||||
|
||||
// Ideas based on boost
|
||||
//_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
namespace std {
|
||||
|
||||
/** Select between T1 or T2 depending on Condition. */
|
||||
/** @{ */
|
||||
template <bool Condition, typename T1, typename T2>
|
||||
struct IfCond
|
||||
namespace chrono
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct IfCond <false, T1, T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
/** @} */
|
||||
locale::id
|
||||
durationpunct::id;
|
||||
|
||||
} // chrono
|
||||
|
||||
//_LIBCPP_END_NAMESPACE_STD
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
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 ()
|
||||
{
|
||||
return m_now;
|
||||
}
|
||||
|
||||
std::string to_string (time_point const& tp)
|
||||
{
|
||||
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
|
||||
@@ -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)
|
||||
|
||||
@@ -20,5 +20,4 @@
|
||||
#ifndef BEAST_CRYPTO_BINARYENCODING_H_INCLUDED
|
||||
#define BEAST_CRYPTO_BINARYENCODING_H_INCLUDED
|
||||
|
||||
|
||||
#endif
|
||||
@@ -19,5 +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"
|
||||
|
||||
@@ -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,13 +45,13 @@ 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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
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
|
||||
@@ -130,9 +130,6 @@ extern std::size_t hash_value (beast::URL const& url);
|
||||
|
||||
namespace std {
|
||||
|
||||
template <typename T>
|
||||
struct hash;
|
||||
|
||||
template <>
|
||||
struct hash <beast::URL>
|
||||
{
|
||||
|
||||
97
src/beast/beast/insight/Collector.h
Normal file
97
src/beast/beast/insight/Collector.h
Normal file
@@ -0,0 +1,97 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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;
|
||||
|
||||
/** Create an event with the specified name.
|
||||
@see Event
|
||||
*/
|
||||
virtual Event make_event (std::string const& name) = 0;
|
||||
|
||||
/** Create a gauge with the specified name.
|
||||
@see Gauge
|
||||
*/
|
||||
virtual Gauge make_gauge (std::string const& name) = 0;
|
||||
|
||||
/** Create a meter with the specified name.
|
||||
@see Meter
|
||||
*/
|
||||
virtual Meter make_meter (std::string const& name) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
109
src/beast/beast/insight/Counter.h
Normal file
109
src/beast/beast/insight/Counter.h
Normal file
@@ -0,0 +1,109 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_COUNTER_H_INCLUDED
|
||||
#define BEAST_INSIGHT_COUNTER_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "CounterImpl.h"
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** A metric for measuring an integral value.
|
||||
|
||||
A counter is a gauge calculated at the server. The owner of the counter
|
||||
may increment and decrement the value by an amount.
|
||||
|
||||
This is a lightweight reference wrapper which is cheap to copy and assign.
|
||||
When the last reference goes away, the metric is no longer collected.
|
||||
*/
|
||||
class Counter
|
||||
{
|
||||
public:
|
||||
typedef CounterImpl::value_type value_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
*/
|
||||
Counter ()
|
||||
{
|
||||
}
|
||||
|
||||
/** Create the metric reference the specified implementation.
|
||||
Normally this won't be called directly. Instead, call the appropriate
|
||||
factory function in the Collector interface.
|
||||
@see Collector.
|
||||
*/
|
||||
explicit Counter (std::shared_ptr <CounterImpl> const& impl)
|
||||
: m_impl (impl)
|
||||
{
|
||||
}
|
||||
|
||||
/** Set a handler for polling.
|
||||
If a handler is set, it will be called once per collection interval.
|
||||
This may be used to implement polling style collection instead of
|
||||
push style.
|
||||
|
||||
Handler will be called with this signature:
|
||||
void Handler (Counter const&);
|
||||
*/
|
||||
template <class Handler>
|
||||
void set_handler (Handler handler) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->set_handler (handler);
|
||||
}
|
||||
|
||||
/** Increment the counter. */
|
||||
/** @{ */
|
||||
void increment (value_type amount) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->increment (amount);
|
||||
}
|
||||
|
||||
Counter const& operator+= (value_type amount) const
|
||||
{ increment (amount); return *this; }
|
||||
|
||||
Counter const& operator-= (value_type amount) const
|
||||
{ increment (-amount); return *this; }
|
||||
|
||||
Counter const& operator++ () const
|
||||
{ increment (1); return *this; }
|
||||
|
||||
Counter const& operator++ (int) const
|
||||
{ increment (1); return *this; }
|
||||
|
||||
Counter const& operator-- () const
|
||||
{ increment (-1); return *this; }
|
||||
|
||||
Counter const& operator-- (int) const
|
||||
{ increment (-1); return *this; }
|
||||
/** @} */
|
||||
|
||||
private:
|
||||
std::shared_ptr <CounterImpl> m_impl;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,28 +17,26 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_COPYCONST_H_INCLUDED
|
||||
#define BEAST_MPL_COPYCONST_H_INCLUDED
|
||||
#ifndef BEAST_INSIGHT_COUNTERIMPL_H_INCLUDED
|
||||
#define BEAST_INSIGHT_COUNTERIMPL_H_INCLUDED
|
||||
|
||||
#include "RemoveConst.h"
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
namespace insight {
|
||||
|
||||
/** Copy `const` attribute from T to U if present. */
|
||||
/** @{ */
|
||||
template <typename T, typename U>
|
||||
struct CopyConst
|
||||
{
|
||||
typedef typename RemoveConst<U>::type type;
|
||||
};
|
||||
class Counter;
|
||||
|
||||
template <typename T, typename U>
|
||||
struct CopyConst <T const, U>
|
||||
class CounterImpl : public std::enable_shared_from_this <CounterImpl>
|
||||
{
|
||||
typedef typename RemoveConst<U>::type const type;
|
||||
public:
|
||||
typedef int64 value_type;
|
||||
typedef std::function <void (Counter const&)> HandlerType;
|
||||
|
||||
virtual ~CounterImpl () = 0;
|
||||
virtual void increment (value_type amount) = 0;
|
||||
virtual void set_handler (HandlerType const& handler) = 0;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
}
|
||||
}
|
||||
77
src/beast/beast/insight/Event.h
Normal file
77
src/beast/beast/insight/Event.h
Normal file
@@ -0,0 +1,77 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_EVENT_H_INCLUDED
|
||||
#define BEAST_INSIGHT_EVENT_H_INCLUDED
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
#include "EventImpl.h"
|
||||
|
||||
#include "../chrono/chrono_util.h"
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** A metric for reporting event timing.
|
||||
|
||||
An event is an operation that has an associated millisecond time, or
|
||||
other integral value. Because events happen at a specific moment, the
|
||||
metric only supports a push-style interface.
|
||||
|
||||
This is a lightweight reference wrapper which is cheap to copy and assign.
|
||||
When the last reference goes away, the metric is no longer collected.
|
||||
*/
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
typedef EventImpl::value_type value_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
*/
|
||||
Event ()
|
||||
{ }
|
||||
|
||||
/** Create the metric reference the specified implementation.
|
||||
Normally this won't be called directly. Instead, call the appropriate
|
||||
factory function in the Collector interface.
|
||||
@see Collector.
|
||||
*/
|
||||
explicit Event (std::shared_ptr <EventImpl> const& impl)
|
||||
: m_impl (impl)
|
||||
{ }
|
||||
|
||||
/** Push an event notification. */
|
||||
template <class Rep, class Period>
|
||||
void notify (std::chrono::duration <Rep, Period> const& value) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->notify (ceil <value_type> (value));
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr <EventImpl> m_impl;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,28 +17,24 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_REMOVEREFERENCE_H_INCLUDED
|
||||
#define BEAST_MPL_REMOVEREFERENCE_H_INCLUDED
|
||||
#ifndef BEAST_INSIGHT_EVENTIMPL_H_INCLUDED
|
||||
#define BEAST_INSIGHT_EVENTIMPL_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
namespace insight {
|
||||
|
||||
// Ideas based on boost
|
||||
class Event;
|
||||
|
||||
/** Remove the reference qualifier from a type. */
|
||||
/** @{ */
|
||||
template <class T>
|
||||
struct RemoveReference
|
||||
class EventImpl : public std::enable_shared_from_this <EventImpl>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
public:
|
||||
typedef std::chrono::milliseconds value_type;
|
||||
|
||||
template <class T>
|
||||
struct RemoveReference <T&>
|
||||
{
|
||||
typedef T type;
|
||||
virtual ~EventImpl () = 0;
|
||||
virtual void notify (value_type const& value) = 0;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
}
|
||||
}
|
||||
127
src/beast/beast/insight/Gauge.h
Normal file
127
src/beast/beast/insight/Gauge.h
Normal file
@@ -0,0 +1,127 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_GAUGE_H_INCLUDED
|
||||
#define BEAST_INSIGHT_GAUGE_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "GaugeImpl.h"
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** A metric for measuring an integral value.
|
||||
|
||||
A gauge is an instantaneous measurement of a value, like the gas gauge
|
||||
in a car. The caller directly sets the value, or adjusts it by a
|
||||
specified amount. The value is kept in the client rather than the collector.
|
||||
|
||||
This is a lightweight reference wrapper which is cheap to copy and assign.
|
||||
When the last reference goes away, the metric is no longer collected.
|
||||
*/
|
||||
class Gauge
|
||||
{
|
||||
public:
|
||||
typedef GaugeImpl::value_type value_type;
|
||||
typedef GaugeImpl::difference_type difference_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
*/
|
||||
Gauge ()
|
||||
{
|
||||
}
|
||||
|
||||
/** Create the metric reference the specified implementation.
|
||||
Normally this won't be called directly. Instead, call the appropriate
|
||||
factory function in the Collector interface.
|
||||
@see Collector.
|
||||
*/
|
||||
explicit Gauge (std::shared_ptr <GaugeImpl> const& impl)
|
||||
: m_impl (impl)
|
||||
{
|
||||
}
|
||||
|
||||
/** Set a handler for polling.
|
||||
If a handler is set, it will be called once per collection interval.
|
||||
This may be used to implement polling style collection instead of
|
||||
push style.
|
||||
|
||||
Handler will be called with this signature:
|
||||
void Handler (Gauge const&);
|
||||
*/
|
||||
template <class Handler>
|
||||
void set_handler (Handler handler) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->set_handler (handler);
|
||||
}
|
||||
|
||||
/** Set the value on the gauge.
|
||||
A Collector implementation should combine multiple calls to value
|
||||
changes into a single change if the calls occur within a single
|
||||
collection interval.
|
||||
*/
|
||||
/** @{ */
|
||||
void set (value_type value) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->set (value);
|
||||
}
|
||||
|
||||
Gauge const& operator= (value_type value) const
|
||||
{ set (value); return *this; }
|
||||
/** @} */
|
||||
|
||||
/** Adjust the value of the gauge. */
|
||||
/** @{ */
|
||||
void increment (difference_type amount) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->increment (amount);
|
||||
}
|
||||
|
||||
Gauge const& operator+= (difference_type amount) const
|
||||
{ increment (amount); return *this; }
|
||||
|
||||
Gauge const& operator-= (difference_type amount) const
|
||||
{ increment (-amount); return *this; }
|
||||
|
||||
Gauge const& operator++ () const
|
||||
{ increment (1); return *this; }
|
||||
|
||||
Gauge const& operator++ (int) const
|
||||
{ increment (1); return *this; }
|
||||
|
||||
Gauge const& operator-- () const
|
||||
{ increment (-1); return *this; }
|
||||
|
||||
Gauge const& operator-- (int) const
|
||||
{ increment (-1); return *this; }
|
||||
/** @} */
|
||||
|
||||
private:
|
||||
std::shared_ptr <GaugeImpl> m_impl;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
47
src/beast/beast/insight/GaugeImpl.h
Normal file
47
src/beast/beast/insight/GaugeImpl.h
Normal file
@@ -0,0 +1,47 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_GAUGEIMPL_H_INCLUDED
|
||||
#define BEAST_INSIGHT_GAUGEIMPL_H_INCLUDED
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
class Gauge;
|
||||
|
||||
class GaugeImpl : public std::enable_shared_from_this <GaugeImpl>
|
||||
{
|
||||
public:
|
||||
typedef uint64 value_type;
|
||||
typedef int64 difference_type;
|
||||
typedef std::function <void (Gauge const&)> HandlerType;
|
||||
|
||||
virtual ~GaugeImpl () = 0;
|
||||
virtual void set (value_type value) = 0;
|
||||
virtual void increment (difference_type amount) = 0;
|
||||
virtual void set_handler (HandlerType const& handler) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
57
src/beast/beast/insight/Hook.h
Normal file
57
src/beast/beast/insight/Hook.h
Normal file
@@ -0,0 +1,57 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_HOOK_H_INCLUDED
|
||||
#define BEAST_INSIGHT_HOOK_H_INCLUDED
|
||||
|
||||
#include "HookImpl.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** A reference to a handler for performing polled collection. */
|
||||
class Hook
|
||||
{
|
||||
public:
|
||||
/** Create a null hook.
|
||||
A null hook has no associated handler.
|
||||
*/
|
||||
Hook ()
|
||||
{ }
|
||||
|
||||
/** Create a hook referencing the specified implementation.
|
||||
Normally this won't be called directly. Instead, call the appropriate
|
||||
factory function in the Collector interface.
|
||||
@see Collector.
|
||||
*/
|
||||
explicit Hook (std::shared_ptr <HookImpl> const& impl)
|
||||
: m_impl (impl)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr <HookImpl> m_impl;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,28 +17,22 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_REMOVECONST_H_INCLUDED
|
||||
#define BEAST_MPL_REMOVECONST_H_INCLUDED
|
||||
#ifndef BEAST_INSIGHT_HOOKIMPL_H_INCLUDED
|
||||
#define BEAST_INSIGHT_HOOKIMPL_H_INCLUDED
|
||||
|
||||
// Ideas based on boost
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
namespace insight {
|
||||
|
||||
/** Remove the `const` qualifier from a type. */
|
||||
/** @{ */
|
||||
template <typename T>
|
||||
struct RemoveConst
|
||||
class HookImpl : public std::enable_shared_from_this <HookImpl>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
public:
|
||||
typedef std::function <void (void)> HandlerType;
|
||||
|
||||
template <typename T>
|
||||
struct RemoveConst <T const>
|
||||
{
|
||||
typedef T type;
|
||||
virtual ~HookImpl () = 0;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,20 +19,14 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "beast_db.h"
|
||||
#include "../Config.h"
|
||||
|
||||
#include "../beast_crypto/beast_crypto.h"
|
||||
#include "../../modules/beast_core/beast_core.h" // for UnitTest
|
||||
|
||||
namespace beast
|
||||
{
|
||||
#include "../Insight.h"
|
||||
|
||||
#if BEAST_GCC
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#include "keyvalue/KeyvaDB.cpp"
|
||||
#if BEAST_GCC
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
}
|
||||
#include "impl/Collector.cpp"
|
||||
#include "impl/Hook.cpp"
|
||||
#include "impl/Metric.cpp"
|
||||
#include "impl/NullCollector.cpp"
|
||||
#include "impl/StatsDCollector.cpp"
|
||||
105
src/beast/beast/insight/Meter.h
Normal file
105
src/beast/beast/insight/Meter.h
Normal file
@@ -0,0 +1,105 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_METER_H_INCLUDED
|
||||
#define BEAST_INSIGHT_METER_H_INCLUDED
|
||||
|
||||
#include "MeterImpl.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** A metric for measuring an integral value.
|
||||
|
||||
A meter may be thought of as an increment-only counter.
|
||||
|
||||
This is a lightweight reference wrapper which is cheap to copy and assign.
|
||||
When the last reference goes away, the metric is no longer collected.
|
||||
*/
|
||||
class Meter
|
||||
{
|
||||
public:
|
||||
typedef MeterImpl::value_type value_type;
|
||||
|
||||
/** Create a null metric.
|
||||
A null metric reports no information.
|
||||
*/
|
||||
Meter ()
|
||||
{ }
|
||||
|
||||
/** Create the metric reference the specified implementation.
|
||||
Normally this won't be called directly. Instead, call the appropriate
|
||||
factory function in the Collector interface.
|
||||
@see Collector.
|
||||
*/
|
||||
explicit Meter (std::shared_ptr <MeterImpl> const& impl)
|
||||
: m_impl (impl)
|
||||
{ }
|
||||
|
||||
/** Set a handler for polling.
|
||||
If a handler is set, it will be called once per collection interval.
|
||||
This may be used to implement polling style collection instead of
|
||||
push style.
|
||||
|
||||
Handler will be called with this signature:
|
||||
void Handler (Meter const&);
|
||||
*/
|
||||
template <class Handler>
|
||||
void set_handler (Handler handler) const
|
||||
{
|
||||
m_impl->set_handler (handler);
|
||||
}
|
||||
|
||||
/** Increment the meter. */
|
||||
/** @{ */
|
||||
void increment (value_type amount) const
|
||||
{
|
||||
if (m_impl)
|
||||
m_impl->increment (amount);
|
||||
}
|
||||
|
||||
Meter const& operator+= (value_type amount) const
|
||||
{
|
||||
increment (amount);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Meter const& operator++ () const
|
||||
{
|
||||
increment (1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Meter const& operator++ (int) const
|
||||
{
|
||||
increment (1);
|
||||
return *this;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
private:
|
||||
std::shared_ptr <MeterImpl> m_impl;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
45
src/beast/beast/insight/MeterImpl.h
Normal file
45
src/beast/beast/insight/MeterImpl.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_METERIMPL_H_INCLUDED
|
||||
#define BEAST_INSIGHT_METERIMPL_H_INCLUDED
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
class Meter;
|
||||
|
||||
class MeterImpl : public std::enable_shared_from_this <MeterImpl>
|
||||
{
|
||||
public:
|
||||
typedef uint64 value_type;
|
||||
typedef std::function <void (Meter const&)> HandlerType;
|
||||
|
||||
virtual ~MeterImpl () = 0;
|
||||
virtual void increment (value_type amount) = 0;
|
||||
virtual void set_handler (HandlerType const& handler) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,21 +17,19 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_MPL_ADDCONST_H_INCLUDED
|
||||
#define BEAST_MPL_ADDCONST_H_INCLUDED
|
||||
#ifndef BEAST_INSIGHT_NULLCOLLECTOR_H_INCLUDED
|
||||
#define BEAST_INSIGHT_NULLCOLLECTOR_H_INCLUDED
|
||||
|
||||
#include "RemoveConst.h"
|
||||
|
||||
// Ideas based on boost
|
||||
#include "Collector.h"
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
|
||||
/** Add the `const` qualifier to a type. */
|
||||
template <typename T>
|
||||
struct AddConst
|
||||
namespace insight {
|
||||
|
||||
/** A Collector which does not collect metrics. */
|
||||
class NullCollector : public Collector
|
||||
{
|
||||
typedef typename RemoveConst<T>::type const type;
|
||||
public:
|
||||
static std::shared_ptr <Collector> New ();
|
||||
};
|
||||
|
||||
}
|
||||
49
src/beast/beast/insight/StatsDCollector.h
Normal file
49
src/beast/beast/insight/StatsDCollector.h
Normal file
@@ -0,0 +1,49 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_STATSDCOLLECTOR_H_INCLUDED
|
||||
#define BEAST_INSIGHT_STATSDCOLLECTOR_H_INCLUDED
|
||||
|
||||
#include "Collector.h"
|
||||
|
||||
#include "../net/IPAddress.h"
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
/** A Collector that reports metrics to a StatsD server.
|
||||
Reference:
|
||||
https://github.com/b/statsd_spec
|
||||
*/
|
||||
class StatsDCollector : public Collector
|
||||
{
|
||||
public:
|
||||
/** Create a StatsD collector.
|
||||
@param address The IP address and port of the StatsD server.
|
||||
@param prefix A string pre-pended before each metric name.
|
||||
@param journal Destination for logging output.
|
||||
*/
|
||||
static std::shared_ptr <StatsDCollector> New (IPAddress const& address,
|
||||
std::string const& prefix, Journal journal);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,13 +17,12 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "BeastConfig.h"
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
#include "beast_extras.h"
|
||||
|
||||
namespace beast
|
||||
Collector::~Collector ()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,14 +17,12 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "BeastConfig.h"
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
#include "beast_crypto.h"
|
||||
|
||||
namespace beast
|
||||
HookImpl::~HookImpl ()
|
||||
{
|
||||
|
||||
#include "math/BinaryEncoding.cpp"
|
||||
#include "math/UnsignedInteger.cpp"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
40
src/beast/beast/insight/impl/Metric.cpp
Normal file
40
src/beast/beast/insight/impl/Metric.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
CounterImpl::~CounterImpl ()
|
||||
{
|
||||
}
|
||||
|
||||
EventImpl::~EventImpl ()
|
||||
{
|
||||
}
|
||||
|
||||
GaugeImpl::~GaugeImpl ()
|
||||
{
|
||||
}
|
||||
|
||||
MeterImpl::~MeterImpl ()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
149
src/beast/beast/insight/impl/NullCollector.cpp
Normal file
149
src/beast/beast/insight/impl/NullCollector.cpp
Normal file
@@ -0,0 +1,149 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
namespace detail {
|
||||
|
||||
class NullHookImpl : public HookImpl
|
||||
{
|
||||
private:
|
||||
NullHookImpl& operator= (NullHookImpl const&);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class NullCounterImpl : public CounterImpl
|
||||
{
|
||||
public:
|
||||
void increment (value_type)
|
||||
{
|
||||
}
|
||||
|
||||
void set_handler (HandlerType const&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
NullCounterImpl& operator= (NullCounterImpl const&);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class NullEventImpl : public EventImpl
|
||||
{
|
||||
public:
|
||||
void notify (value_type const&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
NullEventImpl& operator= (NullEventImpl const&);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class NullGaugeImpl : public GaugeImpl
|
||||
{
|
||||
public:
|
||||
void set (value_type)
|
||||
{
|
||||
}
|
||||
|
||||
void increment (difference_type)
|
||||
{
|
||||
}
|
||||
|
||||
void set_handler (HandlerType const&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
NullGaugeImpl& operator= (NullGaugeImpl const&);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class NullMeterImpl : public MeterImpl
|
||||
{
|
||||
public:
|
||||
void increment (value_type)
|
||||
{
|
||||
}
|
||||
|
||||
void set_handler (HandlerType const&)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
NullMeterImpl& operator= (NullMeterImpl const&);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class NullCollectorImp : public NullCollector
|
||||
{
|
||||
private:
|
||||
public:
|
||||
NullCollectorImp ()
|
||||
{
|
||||
}
|
||||
|
||||
~NullCollectorImp ()
|
||||
{
|
||||
}
|
||||
|
||||
Hook make_hook (HookImpl::HandlerType const&)
|
||||
{
|
||||
return Hook (std::make_shared <detail::NullHookImpl> ());
|
||||
}
|
||||
|
||||
Counter make_counter (std::string const&)
|
||||
{
|
||||
return Counter (std::make_shared <detail::NullCounterImpl> ());
|
||||
}
|
||||
|
||||
Event make_event (std::string const&)
|
||||
{
|
||||
return Event (std::make_shared <detail::NullEventImpl> ());
|
||||
}
|
||||
|
||||
Gauge make_gauge (std::string const&)
|
||||
{
|
||||
return Gauge (std::make_shared <detail::NullGaugeImpl> ());
|
||||
}
|
||||
|
||||
Meter make_meter (std::string const&)
|
||||
{
|
||||
return Meter (std::make_shared <detail::NullMeterImpl> ());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
std::shared_ptr <Collector> NullCollector::New ()
|
||||
{
|
||||
return std::make_shared <detail::NullCollectorImp> ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
715
src/beast/beast/insight/impl/StatsDCollector.cpp
Normal file
715
src/beast/beast/insight/impl/StatsDCollector.cpp
Normal file
@@ -0,0 +1,715 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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 "../../asio/IPAddressConversion.h"
|
||||
#include "../../threads/SharedData.h"
|
||||
|
||||
#include <deque>
|
||||
#include <climits>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/move/move.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#ifndef BEAST_STATSDCOLLECTOR_TRACING_ENABLED
|
||||
#define BEAST_STATSDCOLLECTOR_TRACING_ENABLED 0
|
||||
#endif
|
||||
|
||||
namespace beast {
|
||||
namespace insight {
|
||||
|
||||
namespace detail {
|
||||
|
||||
class StatsDCollectorImp;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDMetricBase : public List <StatsDMetricBase>::Node
|
||||
{
|
||||
public:
|
||||
virtual void do_process () = 0;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDHookImpl
|
||||
: public HookImpl
|
||||
, public StatsDMetricBase
|
||||
{
|
||||
public:
|
||||
StatsDHookImpl (
|
||||
HandlerType const& handler,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl);
|
||||
|
||||
~StatsDHookImpl ();
|
||||
|
||||
void do_process ();
|
||||
|
||||
private:
|
||||
StatsDHookImpl& operator= (StatsDHookImpl const&);
|
||||
|
||||
std::shared_ptr <StatsDCollectorImp> m_impl;
|
||||
HandlerType m_handler;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDCounterImpl
|
||||
: public CounterImpl
|
||||
, public StatsDMetricBase
|
||||
{
|
||||
public:
|
||||
StatsDCounterImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl);
|
||||
|
||||
~StatsDCounterImpl ();
|
||||
|
||||
void increment (CounterImpl::value_type amount);
|
||||
void set_handler (HandlerType const& handler);
|
||||
|
||||
void flush ();
|
||||
void do_increment (CounterImpl::value_type amount);
|
||||
void do_process ();
|
||||
|
||||
private:
|
||||
StatsDCounterImpl& operator= (StatsDCounterImpl const&);
|
||||
|
||||
std::shared_ptr <StatsDCollectorImp> m_impl;
|
||||
std::string m_name;
|
||||
CounterImpl::value_type m_value;
|
||||
bool m_dirty;
|
||||
HandlerType m_handler;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDEventImpl
|
||||
: public EventImpl
|
||||
{
|
||||
public:
|
||||
StatsDEventImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl);
|
||||
|
||||
~StatsDEventImpl ();
|
||||
|
||||
void notify (EventImpl::value_type const& alue);
|
||||
|
||||
void do_notify (EventImpl::value_type const& value);
|
||||
void do_process ();
|
||||
|
||||
private:
|
||||
StatsDEventImpl& operator= (StatsDEventImpl const&);
|
||||
|
||||
std::shared_ptr <StatsDCollectorImp> m_impl;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDGaugeImpl
|
||||
: public GaugeImpl
|
||||
, public StatsDMetricBase
|
||||
{
|
||||
public:
|
||||
StatsDGaugeImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl);
|
||||
|
||||
~StatsDGaugeImpl ();
|
||||
|
||||
void set (GaugeImpl::value_type value);
|
||||
void increment (GaugeImpl::difference_type amount);
|
||||
void set_handler (HandlerType const& handler);
|
||||
|
||||
void flush ();
|
||||
void do_set (GaugeImpl::value_type value);
|
||||
void do_increment (GaugeImpl::difference_type amount);
|
||||
void do_process ();
|
||||
|
||||
private:
|
||||
StatsDGaugeImpl& operator= (StatsDGaugeImpl const&);
|
||||
|
||||
std::shared_ptr <StatsDCollectorImp> m_impl;
|
||||
std::string m_name;
|
||||
GaugeImpl::value_type m_last_value;
|
||||
GaugeImpl::value_type m_value;
|
||||
bool m_dirty;
|
||||
HandlerType m_handler;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDMeterImpl
|
||||
: public MeterImpl
|
||||
, public StatsDMetricBase
|
||||
{
|
||||
public:
|
||||
explicit StatsDMeterImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl);
|
||||
|
||||
~StatsDMeterImpl ();
|
||||
|
||||
void increment (MeterImpl::value_type amount);
|
||||
void set_handler (HandlerType const& handler);
|
||||
|
||||
void flush ();
|
||||
void do_increment (MeterImpl::value_type amount);
|
||||
void do_process ();
|
||||
|
||||
private:
|
||||
StatsDMeterImpl& operator= (StatsDMeterImpl const&);
|
||||
|
||||
std::shared_ptr <StatsDCollectorImp> m_impl;
|
||||
std::string m_name;
|
||||
MeterImpl::value_type m_value;
|
||||
bool m_dirty;
|
||||
HandlerType m_handler;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class StatsDCollectorImp
|
||||
: public StatsDCollector
|
||||
, public std::enable_shared_from_this <StatsDCollectorImp>
|
||||
{
|
||||
private:
|
||||
enum
|
||||
{
|
||||
//max_packet_size = 484
|
||||
max_packet_size = 1472
|
||||
};
|
||||
|
||||
struct StateType
|
||||
{
|
||||
List <StatsDMetricBase> metrics;
|
||||
};
|
||||
|
||||
typedef SharedData <StateType> State;
|
||||
|
||||
Journal m_journal;
|
||||
IPAddress m_address;
|
||||
std::string m_prefix;
|
||||
boost::asio::io_service m_io_service;
|
||||
boost::optional <boost::asio::io_service::work> m_work;
|
||||
boost::asio::deadline_timer m_timer;
|
||||
boost::asio::ip::udp::socket m_socket;
|
||||
std::deque <std::string> m_data;
|
||||
State m_state;
|
||||
|
||||
// Must come last for order of init
|
||||
std::thread m_thread;
|
||||
|
||||
static boost::asio::ip::udp::endpoint to_endpoint (
|
||||
IPAddress const &address)
|
||||
{
|
||||
if (address.isV4 ())
|
||||
{
|
||||
return boost::asio::ip::udp::endpoint (
|
||||
boost::asio::ip::address_v4 (
|
||||
address.v4().value), address.port ());
|
||||
}
|
||||
|
||||
// VFALCO TODO IPv6 support
|
||||
bassertfalse;
|
||||
return boost::asio::ip::udp::endpoint (
|
||||
boost::asio::ip::address_v6 (), 0);
|
||||
}
|
||||
|
||||
public:
|
||||
StatsDCollectorImp (
|
||||
IPAddress const& address,
|
||||
std::string const& prefix,
|
||||
Journal journal)
|
||||
: m_journal (journal)
|
||||
, m_address (address)
|
||||
, m_prefix (prefix)
|
||||
, m_work (boost::ref (m_io_service))
|
||||
, m_timer (m_io_service)
|
||||
, m_socket (m_io_service)
|
||||
, m_thread (&StatsDCollectorImp::run, this)
|
||||
{
|
||||
}
|
||||
|
||||
~StatsDCollectorImp ()
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
m_timer.cancel (ec);
|
||||
|
||||
m_work = boost::none;
|
||||
m_thread.join ();
|
||||
}
|
||||
|
||||
Hook make_hook (HookImpl::HandlerType const& handler)
|
||||
{
|
||||
return Hook (std::make_shared <detail::StatsDHookImpl> (
|
||||
handler, shared_from_this ()));
|
||||
}
|
||||
|
||||
Counter make_counter (std::string const& name)
|
||||
{
|
||||
return Counter (std::make_shared <detail::StatsDCounterImpl> (
|
||||
name, shared_from_this ()));
|
||||
}
|
||||
|
||||
Event make_event (std::string const& name)
|
||||
{
|
||||
return Event (std::make_shared <detail::StatsDEventImpl> (
|
||||
name, shared_from_this ()));
|
||||
}
|
||||
|
||||
Gauge make_gauge (std::string const& name)
|
||||
{
|
||||
return Gauge (std::make_shared <detail::StatsDGaugeImpl> (
|
||||
name, shared_from_this ()));
|
||||
}
|
||||
|
||||
Meter make_meter (std::string const& name)
|
||||
{
|
||||
return Meter (std::make_shared <detail::StatsDMeterImpl> (
|
||||
name, shared_from_this ()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void add (StatsDMetricBase& metric)
|
||||
{
|
||||
State::Access state (m_state);
|
||||
state->metrics.push_back (metric);
|
||||
}
|
||||
|
||||
void remove (StatsDMetricBase& metric)
|
||||
{
|
||||
State::Access state (m_state);
|
||||
state->metrics.erase (state->metrics.iterator_to (metric));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
boost::asio::io_service& get_io_service ()
|
||||
{
|
||||
return m_io_service;
|
||||
}
|
||||
|
||||
std::string const& prefix () const
|
||||
{
|
||||
return m_prefix;
|
||||
}
|
||||
|
||||
void do_post_buffer (std::string const& buffer)
|
||||
{
|
||||
#if BEAST_STATSDCOLLECTOR_TRACING_ENABLED
|
||||
m_journal.trace << std::endl << buffer;
|
||||
#endif
|
||||
m_data.emplace_back (buffer);
|
||||
}
|
||||
|
||||
void post_buffer (std::string&& buffer)
|
||||
{
|
||||
m_io_service.dispatch (std::bind (
|
||||
&StatsDCollectorImp::do_post_buffer, this,
|
||||
std::move (buffer)));
|
||||
}
|
||||
|
||||
void on_send (boost::system::error_code ec, std::size_t)
|
||||
{
|
||||
if (ec == boost::asio::error::operation_aborted)
|
||||
return;
|
||||
|
||||
if (ec)
|
||||
{
|
||||
m_journal.error <<
|
||||
"async_send failed: " << ec.message();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Send what we have
|
||||
void send_buffers ()
|
||||
{
|
||||
// Break up the array of strings into blocks
|
||||
// that each fit into one UDP packet.
|
||||
//
|
||||
boost::system::error_code ec;
|
||||
std::vector <boost::asio::const_buffer> buffers;
|
||||
buffers.reserve (m_data.size ());
|
||||
std::size_t size (0);
|
||||
for (std::deque <std::string>::const_iterator iter (m_data.begin());
|
||||
iter != m_data.end(); ++iter)
|
||||
{
|
||||
std::string const& buffer (*iter);
|
||||
std::size_t const length (buffer.size ());
|
||||
check_precondition (! buffer.empty ());
|
||||
if (! buffers.empty () && (size + length) > max_packet_size)
|
||||
{
|
||||
m_socket.async_send (buffers, boost::bind (
|
||||
&StatsDCollectorImp::on_send, this,
|
||||
boost::asio::placeholders::error,
|
||||
boost::asio::placeholders::bytes_transferred));
|
||||
buffers.clear ();
|
||||
size = 0;
|
||||
}
|
||||
buffers.emplace_back (&buffer[0], length);
|
||||
size += length;
|
||||
}
|
||||
if (! buffers.empty ())
|
||||
{
|
||||
m_socket.async_send (buffers, boost::bind (
|
||||
&StatsDCollectorImp::on_send, this,
|
||||
boost::asio::placeholders::error,
|
||||
boost::asio::placeholders::bytes_transferred));
|
||||
}
|
||||
m_data.clear ();
|
||||
}
|
||||
|
||||
void set_timer ()
|
||||
{
|
||||
m_timer.expires_from_now (boost::posix_time::seconds (1));
|
||||
m_timer.async_wait (boost::bind (
|
||||
&StatsDCollectorImp::on_timer, this,
|
||||
boost::asio::placeholders::error));
|
||||
}
|
||||
|
||||
void on_timer (boost::system::error_code ec)
|
||||
{
|
||||
if (ec == boost::asio::error::operation_aborted)
|
||||
return;
|
||||
|
||||
if (ec)
|
||||
{
|
||||
m_journal.error <<
|
||||
"on_timer failed: " << ec.message();
|
||||
return;
|
||||
}
|
||||
|
||||
State::Access state (m_state);
|
||||
|
||||
for (List <StatsDMetricBase>::iterator iter (state->metrics.begin());
|
||||
iter != state->metrics.end(); ++iter)
|
||||
iter->do_process();
|
||||
|
||||
send_buffers ();
|
||||
|
||||
set_timer ();
|
||||
}
|
||||
|
||||
void run ()
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
|
||||
if (m_socket.connect (to_endpoint (m_address), ec))
|
||||
{
|
||||
m_journal.error <<
|
||||
"Connect failed: " << ec.message();
|
||||
return;
|
||||
}
|
||||
|
||||
set_timer ();
|
||||
|
||||
m_io_service.run ();
|
||||
|
||||
m_socket.shutdown (
|
||||
boost::asio::ip::udp::socket::shutdown_send, ec);
|
||||
|
||||
m_socket.close ();
|
||||
|
||||
m_io_service.poll ();
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
StatsDHookImpl::StatsDHookImpl (HandlerType const& handler,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl)
|
||||
: m_impl (impl)
|
||||
, m_handler (handler)
|
||||
{
|
||||
m_impl->add (*this);
|
||||
}
|
||||
|
||||
StatsDHookImpl::~StatsDHookImpl ()
|
||||
{
|
||||
m_impl->remove (*this);
|
||||
}
|
||||
|
||||
void StatsDHookImpl::do_process ()
|
||||
{
|
||||
m_handler ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
StatsDCounterImpl::StatsDCounterImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl)
|
||||
: m_impl (impl)
|
||||
, m_name (name)
|
||||
, m_value (0)
|
||||
, m_dirty (false)
|
||||
{
|
||||
m_impl->add (*this);
|
||||
}
|
||||
|
||||
StatsDCounterImpl::~StatsDCounterImpl ()
|
||||
{
|
||||
m_impl->remove (*this);
|
||||
}
|
||||
|
||||
void StatsDCounterImpl::increment (CounterImpl::value_type amount)
|
||||
{
|
||||
m_impl->get_io_service().dispatch (std::bind (
|
||||
&StatsDCounterImpl::do_increment,
|
||||
std::static_pointer_cast <StatsDCounterImpl> (
|
||||
shared_from_this ()), amount));
|
||||
}
|
||||
|
||||
void StatsDCounterImpl::set_handler (HandlerType const& handler)
|
||||
{
|
||||
m_handler = handler;
|
||||
}
|
||||
|
||||
void StatsDCounterImpl::flush ()
|
||||
{
|
||||
if (m_dirty)
|
||||
{
|
||||
m_dirty = false;
|
||||
std::stringstream ss;
|
||||
ss <<
|
||||
m_impl->prefix() << "." <<
|
||||
m_name << ":" <<
|
||||
m_value << "|c" <<
|
||||
"\n";
|
||||
m_value = 0;
|
||||
m_impl->post_buffer (ss.str ());
|
||||
}
|
||||
}
|
||||
|
||||
void StatsDCounterImpl::do_increment (CounterImpl::value_type amount)
|
||||
{
|
||||
m_value += amount;
|
||||
m_dirty = true;
|
||||
}
|
||||
|
||||
void StatsDCounterImpl::do_process ()
|
||||
{
|
||||
if (m_handler)
|
||||
m_handler (Counter (shared_from_this ()));
|
||||
flush ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
StatsDEventImpl::StatsDEventImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl)
|
||||
: m_impl (impl)
|
||||
, m_name (name)
|
||||
{
|
||||
}
|
||||
|
||||
StatsDEventImpl::~StatsDEventImpl ()
|
||||
{
|
||||
}
|
||||
|
||||
void StatsDEventImpl::notify (EventImpl::value_type const& value)
|
||||
{
|
||||
m_impl->get_io_service().dispatch (std::bind (
|
||||
&StatsDEventImpl::do_notify,
|
||||
std::static_pointer_cast <StatsDEventImpl> (
|
||||
shared_from_this ()), value));
|
||||
}
|
||||
|
||||
void StatsDEventImpl::do_notify (EventImpl::value_type const& value)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss <<
|
||||
m_impl->prefix() << "." <<
|
||||
m_name << ":" <<
|
||||
value.count() << "|ms" <<
|
||||
"\n";
|
||||
m_impl->post_buffer (ss.str ());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
StatsDGaugeImpl::StatsDGaugeImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl)
|
||||
: m_impl (impl)
|
||||
, m_name (name)
|
||||
, m_last_value (0)
|
||||
, m_value (0)
|
||||
, m_dirty (false)
|
||||
{
|
||||
m_impl->add (*this);
|
||||
}
|
||||
|
||||
StatsDGaugeImpl::~StatsDGaugeImpl ()
|
||||
{
|
||||
m_impl->remove (*this);
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::set (GaugeImpl::value_type value)
|
||||
{
|
||||
m_impl->get_io_service().dispatch (std::bind (
|
||||
&StatsDGaugeImpl::do_set,
|
||||
std::static_pointer_cast <StatsDGaugeImpl> (
|
||||
shared_from_this ()), value));
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::increment (GaugeImpl::difference_type amount)
|
||||
{
|
||||
m_impl->get_io_service().dispatch (std::bind (
|
||||
&StatsDGaugeImpl::do_increment,
|
||||
std::static_pointer_cast <StatsDGaugeImpl> (
|
||||
shared_from_this ()), amount));
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::set_handler (HandlerType const& handler)
|
||||
{
|
||||
m_handler = handler;
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::flush ()
|
||||
{
|
||||
if (m_dirty)
|
||||
{
|
||||
m_dirty = false;
|
||||
std::stringstream ss;
|
||||
ss <<
|
||||
m_impl->prefix() << "." <<
|
||||
m_name << ":" <<
|
||||
m_value << "|c" <<
|
||||
"\n";
|
||||
m_impl->post_buffer (ss.str ());
|
||||
}
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::do_set (GaugeImpl::value_type value)
|
||||
{
|
||||
m_value = value;
|
||||
|
||||
if (m_value != m_last_value)
|
||||
{
|
||||
m_last_value = m_value;
|
||||
m_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::do_increment (GaugeImpl::difference_type amount)
|
||||
{
|
||||
GaugeImpl::value_type value (m_value);
|
||||
|
||||
if (amount > 0)
|
||||
{
|
||||
GaugeImpl::value_type const d (
|
||||
static_cast <GaugeImpl::value_type> (amount));
|
||||
value +=
|
||||
(d >= std::numeric_limits <GaugeImpl::value_type>::max() - m_value)
|
||||
? std::numeric_limits <GaugeImpl::value_type>::max() - m_value
|
||||
: d;
|
||||
}
|
||||
else if (amount < 0)
|
||||
{
|
||||
GaugeImpl::value_type const d (
|
||||
static_cast <GaugeImpl::value_type> (-amount));
|
||||
value = (d >= value) ? 0 : value - d;
|
||||
}
|
||||
|
||||
do_set (value);
|
||||
}
|
||||
|
||||
void StatsDGaugeImpl::do_process ()
|
||||
{
|
||||
if (m_handler)
|
||||
m_handler (Gauge (shared_from_this ()));
|
||||
flush ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
StatsDMeterImpl::StatsDMeterImpl (std::string const& name,
|
||||
std::shared_ptr <StatsDCollectorImp> const& impl)
|
||||
: m_impl (impl)
|
||||
, m_name (name)
|
||||
, m_value (0)
|
||||
, m_dirty (false)
|
||||
{
|
||||
m_impl->add (*this);
|
||||
}
|
||||
|
||||
StatsDMeterImpl::~StatsDMeterImpl ()
|
||||
{
|
||||
m_impl->remove (*this);
|
||||
}
|
||||
|
||||
void StatsDMeterImpl::increment (MeterImpl::value_type amount)
|
||||
{
|
||||
m_impl->get_io_service().dispatch (std::bind (
|
||||
&StatsDMeterImpl::do_increment,
|
||||
std::static_pointer_cast <StatsDMeterImpl> (
|
||||
shared_from_this ()), amount));
|
||||
}
|
||||
|
||||
void StatsDMeterImpl::set_handler (HandlerType const& handler)
|
||||
{
|
||||
m_handler = handler;
|
||||
}
|
||||
|
||||
void StatsDMeterImpl::flush ()
|
||||
{
|
||||
if (m_dirty)
|
||||
{
|
||||
m_dirty = false;
|
||||
std::stringstream ss;
|
||||
ss <<
|
||||
m_impl->prefix() << "." <<
|
||||
m_name << ":" <<
|
||||
m_value << "|m" <<
|
||||
"\n";
|
||||
m_value = 0;
|
||||
m_impl->post_buffer (ss.str ());
|
||||
}
|
||||
}
|
||||
|
||||
void StatsDMeterImpl::do_increment (MeterImpl::value_type amount)
|
||||
{
|
||||
m_value += amount;
|
||||
m_dirty = true;
|
||||
}
|
||||
|
||||
void StatsDMeterImpl::do_process ()
|
||||
{
|
||||
if (m_handler)
|
||||
m_handler (Meter (shared_from_this ()));
|
||||
flush ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
std::shared_ptr <StatsDCollector> StatsDCollector::New (
|
||||
IPAddress const& address, std::string const& prefix, Journal journal)
|
||||
{
|
||||
return std::make_shared <detail::StatsDCollectorImp> (
|
||||
address, prefix, journal);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,448 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_INTRUSIVE_FORWARDLIST_H_INCLUDED
|
||||
#define BEAST_INTRUSIVE_FORWARDLIST_H_INCLUDED
|
||||
|
||||
#include "../Config.h"
|
||||
|
||||
#include "PointerTraits.h"
|
||||
|
||||
#include "../MPL.h"
|
||||
|
||||
#include <iterator>
|
||||
|
||||
// Ideas based on boost
|
||||
|
||||
namespace beast {
|
||||
namespace intrusive {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Holds the size field
|
||||
struct SizeHolder
|
||||
{
|
||||
public:
|
||||
typedef std::size_t size_type;
|
||||
|
||||
inline size_type size () const noexcept
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
inline void set (size_type new_size) noexcept
|
||||
{
|
||||
m_size = new_size;
|
||||
}
|
||||
|
||||
inline void increment () noexcept
|
||||
{
|
||||
++m_size;
|
||||
}
|
||||
|
||||
inline void decrement () noexcept
|
||||
{
|
||||
--m_size;
|
||||
}
|
||||
|
||||
private:
|
||||
size_type m_size;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class VoidPointer>
|
||||
struct ForwardListNode
|
||||
{
|
||||
typedef typename PointerTraits <VoidPointer>::template rebind_pointer <ForwardListNode>::type node_ptr;
|
||||
|
||||
node_ptr next;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Provides value_traits for when T derives from Node
|
||||
template <class T, class NodeTraits>
|
||||
struct DerivedValueTraits
|
||||
{
|
||||
typedef NodeTraits node_traits;
|
||||
typedef T value_type;
|
||||
typedef typename node_traits::node node;
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename node_traits::const_node_ptr const_node_ptr;
|
||||
typedef typename mpl::PointerToOther <node_ptr, T>::type pointer;
|
||||
typedef typename mpl::PointerToOther <node_ptr, const T>::type const_pointer;
|
||||
typedef typename PointerTraits <pointer>::reference reference;
|
||||
typedef typename PointerTraits <const_pointer>::reference const_reference;
|
||||
|
||||
static node_ptr to_node_ptr (reference value)
|
||||
{
|
||||
return node_ptr (&value);
|
||||
}
|
||||
|
||||
static const_node_ptr to_node_ptr (const_reference value)
|
||||
{
|
||||
return node_ptr (&value);
|
||||
}
|
||||
|
||||
static pointer to_value_ptr (node_ptr const& n)
|
||||
{
|
||||
return pointer (&static_cast <value_type&> (*n));
|
||||
}
|
||||
|
||||
static const_pointer to_value_ptr (const_node_ptr const &n)
|
||||
{
|
||||
return const_pointer (&static_cast <value_type const&> (*n));
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class VoidPointer, typename Tag>
|
||||
struct ForwardListNodeTraits
|
||||
{
|
||||
typedef ForwardListNode <VoidPointer> node;
|
||||
|
||||
typedef typename PointerTraits <VoidPointer>::
|
||||
template rebind_pointer <node> node_ptr;
|
||||
|
||||
typedef typename PointerTraits <VoidPointer>::
|
||||
template rebind_pointer <node const> const_node_ptr;
|
||||
|
||||
static node_ptr get_next (const_node_ptr const& n)
|
||||
{
|
||||
return n->m_next;
|
||||
}
|
||||
|
||||
static node_ptr get_next (node_ptr const& n)
|
||||
{
|
||||
return n->m_next;
|
||||
}
|
||||
|
||||
static void set_next (node_ptr const& n, node_ptr const& next)
|
||||
{
|
||||
n->m_next = next;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class Container, bool IsConst>
|
||||
class ForwardListIterator
|
||||
: public std::iterator <
|
||||
std::forward_iterator_tag,
|
||||
typename Container::value_type,
|
||||
typename Container::difference_type,
|
||||
typename mpl::IfCond <IsConst,
|
||||
typename Container::const_pointer,
|
||||
typename Container::pointer>::type,
|
||||
typename mpl::IfCond <IsConst,
|
||||
typename Container::const_reference,
|
||||
typename Container::reference>::type>
|
||||
{
|
||||
protected:
|
||||
typedef typename Container::value_traits value_traits;
|
||||
typedef typename Container::node_traits node_traits;
|
||||
typedef typename node_traits::node node;
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename PointerTraits <node_ptr>::
|
||||
template rebind_pointer <void>::type void_pointer;
|
||||
|
||||
public:
|
||||
typedef typename Container::value_type value_type;
|
||||
typedef typename mpl::IfCond <IsConst,
|
||||
typename Container::const_pointer,
|
||||
typename Container::pointer>::type pointer;
|
||||
typedef typename mpl::IfCond <IsConst,
|
||||
typename Container::const_reference,
|
||||
typename Container::reference>::type reference;
|
||||
|
||||
ForwardListIterator ()
|
||||
: m_node ()
|
||||
{
|
||||
}
|
||||
|
||||
explicit ForwardListIterator (ForwardListIterator <Container, false> const& other)
|
||||
: m_node (other.pointed_node ())
|
||||
{
|
||||
}
|
||||
|
||||
node_ptr const& pointed_node () const noexcept
|
||||
{
|
||||
return m_node;
|
||||
}
|
||||
|
||||
ForwardListIterator& operator= (node_ptr const& node)
|
||||
{
|
||||
m_node = node;
|
||||
return static_cast <ForwardListIterator&> (*this);
|
||||
}
|
||||
|
||||
ForwardListIterator& operator++ ()
|
||||
{
|
||||
m_node = node_traits::get_next (m_node);
|
||||
return static_cast <ForwardListIterator&> (*this);
|
||||
}
|
||||
|
||||
ForwardListIterator operator++ (int)
|
||||
{
|
||||
ForwardListIterator result (*this);
|
||||
m_node = node_traits::get_next (m_node);
|
||||
return result;
|
||||
}
|
||||
|
||||
friend bool operator== (ForwardListIterator const& lhs,
|
||||
ForwardListIterator const& rhs)
|
||||
{
|
||||
return lhs.m_node == rhs.m_node;
|
||||
}
|
||||
|
||||
friend bool operator!= (ForwardListIterator const& lhs,
|
||||
ForwardListIterator const& rhs)
|
||||
{
|
||||
return ! (lhs == rhs);
|
||||
}
|
||||
|
||||
reference operator* () const
|
||||
{
|
||||
return *this->operator-> ();
|
||||
}
|
||||
|
||||
pointer operator-> () const
|
||||
{
|
||||
return value_traits::to_value_ptr (m_node);
|
||||
}
|
||||
|
||||
private:
|
||||
node_ptr m_node;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class NodeTraits>
|
||||
class ForwardListAlgorithms
|
||||
{
|
||||
public:
|
||||
typedef typename NodeTraits::node node;
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
typedef NodeTraits node_traits;
|
||||
|
||||
static void init (node_ptr const& n)
|
||||
{
|
||||
NodeTraits::set_next (n, node_ptr());
|
||||
}
|
||||
|
||||
static bool unique (const_node_ptr const& this_node)
|
||||
{
|
||||
node_ptr next = NodeTraits::get_next (this_node);
|
||||
return !next || next == this_node;
|
||||
}
|
||||
|
||||
static void link_after (node_ptr const& prev_node, node_ptr const& this_node)
|
||||
{
|
||||
NodeTraits::set_next (this_node, NodeTraits::get_next (prev_node));
|
||||
NodeTraits::set_next (prev_node, this_node);
|
||||
}
|
||||
|
||||
static void unlink_after (node_ptr const& prev_node)
|
||||
{
|
||||
const_node_ptr this_node (NodeTraits::get_next (prev_node));
|
||||
NodeTraits::set_next (prev_node, NodeTraits::get_next (this_node));
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Singly-linked intrusive list. */
|
||||
template <typename T, typename Tag = void>
|
||||
class ForwardList
|
||||
{
|
||||
public:
|
||||
typedef DerivedValueTraits <T, ForwardListNodeTraits <T, Tag> >
|
||||
value_traits;
|
||||
typedef typename value_traits::pointer pointer;
|
||||
typedef typename value_traits::const_pointer const_pointer;
|
||||
typedef typename PointerTraits <pointer>::element_type value_type;
|
||||
typedef typename PointerTraits <pointer>::reference reference;
|
||||
typedef typename PointerTraits <pointer>::const_reference const_reference;
|
||||
typedef typename PointerTraits <pointer>::difference_type difference_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef ForwardListIterator <ForwardList, false> iterator;
|
||||
typedef ForwardListIterator <ForwardList, true> const_iterator;
|
||||
typedef typename value_traits::node_traits node_traits;
|
||||
typedef typename node_traits::node node;
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename node_traits::const_node_ptr const_node_ptr;
|
||||
typedef ForwardListAlgorithms <node_traits> node_algorithms;
|
||||
|
||||
typedef node Node;
|
||||
|
||||
private:
|
||||
typedef detail::SizeHolder size_traits;
|
||||
|
||||
void default_construct ()
|
||||
{
|
||||
get_size_traits ().set (size_type (0));
|
||||
node_algorithms::init (this->get_root_node ());
|
||||
}
|
||||
|
||||
node_ptr get_end_node ()
|
||||
{
|
||||
return node_ptr ();
|
||||
}
|
||||
|
||||
const_node_ptr get_end_node () const
|
||||
{
|
||||
return const_node_ptr ();
|
||||
}
|
||||
|
||||
node_ptr get_root_node ()
|
||||
{
|
||||
return PointerTraits <node_ptr>::pointer_to (m_root);
|
||||
}
|
||||
|
||||
const_node_ptr get_root_node () const
|
||||
{
|
||||
return PointerTraits <const_node_ptr>::pointer_to (m_root);
|
||||
}
|
||||
|
||||
size_traits& get_size_traits () noexcept
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
size_traits const& get_size_traits () const noexcept
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
static node_ptr uncast (const_node_ptr const& ptr)
|
||||
{
|
||||
return PointerTraits <node_ptr>::const_cast_from (ptr);
|
||||
}
|
||||
|
||||
public:
|
||||
ForwardList ()
|
||||
{
|
||||
default_construct ();
|
||||
}
|
||||
|
||||
void clear ()
|
||||
{
|
||||
default_construct ();
|
||||
}
|
||||
|
||||
void push_front (reference value)
|
||||
{
|
||||
node_ptr this_node (value_traits::to_node_ptr (value));
|
||||
node_algorithms::link_after (this->get_root_node (), this_node);
|
||||
this->get_size_traits ().increment ();
|
||||
}
|
||||
|
||||
void pop_front ()
|
||||
{
|
||||
//node_ptr this_node (node_traits::get_next (this->get_root ()));
|
||||
node_algorithms::unlink_after (this->get_root_node ());
|
||||
this->get_size_traits ().decrement ();
|
||||
}
|
||||
|
||||
reference front ()
|
||||
{
|
||||
return *value_traits::to_value_ptr (node_traits::get_next (this->get_root_node ()));
|
||||
}
|
||||
|
||||
const_reference front () const
|
||||
{
|
||||
return *value_traits::to_value_ptr (uncat (node_traits::get_next (this->get_root_node ())));
|
||||
}
|
||||
|
||||
iterator begin ()
|
||||
{
|
||||
return iterator (node_traits::get_next (this->get_root_node (), this));
|
||||
}
|
||||
|
||||
const_iterator begin () const
|
||||
{
|
||||
return const_iterator (node_traits::get_next (this->get_root_node (), this));
|
||||
}
|
||||
|
||||
const_iterator cbegin () const
|
||||
{
|
||||
return this->begin ();
|
||||
}
|
||||
|
||||
iterator end ()
|
||||
{
|
||||
return iterator (this->get_end_node (), this);
|
||||
}
|
||||
|
||||
const_iterator end () const
|
||||
{
|
||||
return const_iterator (this->get_end_node (), this);
|
||||
}
|
||||
|
||||
const_iterator cend () const
|
||||
{
|
||||
return this->end ();
|
||||
}
|
||||
|
||||
iterator before_begin ()
|
||||
{
|
||||
return iterator (this->get_root_node (), this);
|
||||
}
|
||||
|
||||
const_iterator before_begin () const
|
||||
{
|
||||
return const_iterator (this->get_root_node (), this);
|
||||
}
|
||||
|
||||
const_iterator cbefore_begin () const
|
||||
{
|
||||
return before_begin ();
|
||||
}
|
||||
|
||||
bool empty () const
|
||||
{
|
||||
return node_algorithms::unique (this->get_root_node ());
|
||||
}
|
||||
|
||||
iterator iterator_to (reference value)
|
||||
{
|
||||
return iterator (value_traits::to_node_ptr (value), this);
|
||||
}
|
||||
|
||||
const_iterator iterator_to (const_reference value) const
|
||||
{
|
||||
return const_iterator (value_traits::to_node_ptr (const_cast <reference> (value)), this);
|
||||
}
|
||||
|
||||
private:
|
||||
node m_root;
|
||||
size_traits m_size;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,187 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_INTRUSIVE_INTRUSIVEARRAY_H_INCLUDED
|
||||
#define BEAST_INTRUSIVE_INTRUSIVEARRAY_H_INCLUDED
|
||||
|
||||
#include "../Config.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
namespace beast {
|
||||
|
||||
/** A run-time fixed size array that references outside storage.
|
||||
The interface tries to follow std::vector as closely as possible within
|
||||
the limitations of a fixed size and unowned storage.
|
||||
*/
|
||||
template <class T>
|
||||
class IntrusiveArray
|
||||
{
|
||||
private:
|
||||
T* m_begin;
|
||||
T* m_end;
|
||||
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef T* iterator;
|
||||
typedef T const* const_iterator;
|
||||
typedef T& reference;
|
||||
typedef T const& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
// Calling methods on a default constructed
|
||||
// array results in undefined behavior!
|
||||
//
|
||||
IntrusiveArray ()
|
||||
: m_begin (nullptr), m_end (nullptr)
|
||||
{ }
|
||||
IntrusiveArray (T* begin, T* end)
|
||||
: m_begin (begin), m_end (end)
|
||||
{ }
|
||||
IntrusiveArray (IntrusiveArray const& other)
|
||||
: m_begin (other.m_begin), m_end (other.m_end)
|
||||
{ }
|
||||
IntrusiveArray (std::vector <T> const& v)
|
||||
: m_begin (&v.front()), m_end (&v.back()+1)
|
||||
{ }
|
||||
IntrusiveArray (std::vector <T>& v)
|
||||
: m_begin (&v.front()), m_end (&v.back()+1)
|
||||
{ }
|
||||
IntrusiveArray& operator= (IntrusiveArray const& other)
|
||||
{
|
||||
m_begin = other.m_begin;
|
||||
m_end = other.m_end;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// iterators
|
||||
iterator begin() { return m_begin; }
|
||||
const_iterator begin() const { return m_begin; }
|
||||
const_iterator cbegin() const { return m_begin; }
|
||||
iterator end() { return m_end; }
|
||||
const_iterator end() const { return m_end; }
|
||||
const_iterator cend() const { return m_end; }
|
||||
|
||||
typedef std::reverse_iterator <iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator <const_iterator> const_reverse_iterator;
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
|
||||
const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); }
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
|
||||
const_reverse_iterator crend() const { return const_reverse_iterator(begin()); }
|
||||
|
||||
reference operator[](size_type i)
|
||||
{
|
||||
bassert (i < size());
|
||||
return m_begin[i];
|
||||
}
|
||||
|
||||
const_reference operator[](size_type i) const
|
||||
{
|
||||
bassert (i < size());
|
||||
return m_begin[i];
|
||||
}
|
||||
|
||||
reference at(size_type i) { rangecheck(i); return m_begin[i]; }
|
||||
const_reference at(size_type i) const { rangecheck(i); return m_begin[i]; }
|
||||
|
||||
reference front() { return m_begin[0]; }
|
||||
reference back() { return m_end[-1]; }
|
||||
const_reference front () const { return m_begin; }
|
||||
const_reference back() const { return m_end[-1]; }
|
||||
|
||||
size_type size() const { return std::distance (m_begin, m_end); }
|
||||
bool empty() const { return m_begin == m_end; }
|
||||
|
||||
T const* data() const { return m_begin; }
|
||||
T* data() { return m_begin; }
|
||||
T* c_array() { return m_begin; }
|
||||
|
||||
void assign (T const& value) { fill (value); }
|
||||
|
||||
void fill (T const& value)
|
||||
{
|
||||
std::fill_n (begin(), size(), value);
|
||||
}
|
||||
|
||||
void clear ()
|
||||
{
|
||||
fill (T ());
|
||||
}
|
||||
|
||||
void rangecheck (size_type i)
|
||||
{
|
||||
if (i >= size())
|
||||
throw std::out_of_range ("IntrusiveArray<>: index out of range");
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
template <class T>
|
||||
bool operator== (IntrusiveArray <T> const& lhs, IntrusiveArray <T> const& rhs)
|
||||
{
|
||||
if ((lhs.begin() == rhs.begin()) && (lhs.end() == rhs.end()))
|
||||
return true;
|
||||
if (lhs.size() != rhs.size())
|
||||
return false;
|
||||
return std::equal (lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool operator!= (IntrusiveArray <T> const& lhs, IntrusiveArray <T> const& rhs)
|
||||
{
|
||||
return !(lhs==rhs);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool operator< (IntrusiveArray <T> const& lhs, IntrusiveArray <T> const& rhs)
|
||||
{
|
||||
if ((lhs.begin() == rhs.begin()) && (lhs.end() == rhs.end()))
|
||||
return false;
|
||||
return std::lexicographical_compare (lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool operator> (IntrusiveArray <T> const& lhs, IntrusiveArray <T> const& rhs)
|
||||
{
|
||||
return rhs<lhs;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool operator<= (IntrusiveArray <T> const& lhs, IntrusiveArray <T> const& rhs)
|
||||
{
|
||||
return !(rhs<lhs);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool operator>= (IntrusiveArray <T> const& lhs, IntrusiveArray <T> const& rhs)
|
||||
{
|
||||
return !(lhs<rhs);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -21,20 +21,32 @@
|
||||
#define BEAST_INTRUSIVE_LIST_H_INCLUDED
|
||||
|
||||
#include "../Config.h"
|
||||
|
||||
#include "../mpl/CopyConst.h"
|
||||
|
||||
#include "../Uncopyable.h"
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <typename, typename>
|
||||
class List;
|
||||
|
||||
namespace detail
|
||||
namespace detail {
|
||||
|
||||
/** Copy `const` attribute from T to U if present. */
|
||||
/** @{ */
|
||||
template <typename T, typename U>
|
||||
struct CopyConst
|
||||
{
|
||||
typedef typename std::remove_const <U>::type type;
|
||||
};
|
||||
|
||||
template <typename T, typename U>
|
||||
struct CopyConst <T const, U>
|
||||
{
|
||||
typedef typename std::remove_const <U>::type const type;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
// This is the intrusive portion of the doubly linked list.
|
||||
// One derivation per list that the object may appear on
|
||||
@@ -62,11 +74,11 @@ class ListIterator : public std::iterator <
|
||||
std::bidirectional_iterator_tag, std::size_t>
|
||||
{
|
||||
public:
|
||||
typedef typename mpl::CopyConst<N, typename N::value_type>::type
|
||||
value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef typename detail::CopyConst <
|
||||
N, typename N::value_type>::type value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
ListIterator (N* node = nullptr) noexcept
|
||||
: m_node (node)
|
||||
|
||||
@@ -20,11 +20,12 @@
|
||||
#ifndef BEAST_INTRUSIVE_LOCKFREESTACK_H_INCLUDED
|
||||
#define BEAST_INTRUSIVE_LOCKFREESTACK_H_INCLUDED
|
||||
|
||||
#include <iterator>
|
||||
#include "../mpl/IfCond.h"
|
||||
#include "../Atomic.h"
|
||||
#include "../Uncopyable.h"
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -35,23 +36,24 @@ class LockFreeStackIterator
|
||||
std::forward_iterator_tag,
|
||||
typename Container::value_type,
|
||||
typename Container::difference_type,
|
||||
typename mpl::IfCond <IsConst,
|
||||
typename std::conditional <IsConst,
|
||||
typename Container::const_pointer,
|
||||
typename Container::pointer>::type,
|
||||
typename mpl::IfCond <IsConst,
|
||||
typename std::conditional <IsConst,
|
||||
typename Container::const_reference,
|
||||
typename Container::reference>::type>
|
||||
{
|
||||
protected:
|
||||
typedef typename Container::Node Node;
|
||||
typedef typename mpl::IfCond <IsConst, Node const*, Node*>::type NodePtr;
|
||||
typedef typename std::conditional <
|
||||
IsConst, Node const*, Node*>::type NodePtr;
|
||||
|
||||
public:
|
||||
typedef typename Container::value_type value_type;
|
||||
typedef typename mpl::IfCond <IsConst,
|
||||
typedef typename std::conditional <IsConst,
|
||||
typename Container::const_pointer,
|
||||
typename Container::pointer>::type pointer;
|
||||
typedef typename mpl::IfCond <IsConst,
|
||||
typedef typename std::conditional <IsConst,
|
||||
typename Container::const_reference,
|
||||
typename Container::reference>::type reference;
|
||||
|
||||
@@ -199,6 +201,7 @@ public:
|
||||
@return `true` if the stack was previously empty. If multiple threads
|
||||
are attempting to push, only one will receive `true`.
|
||||
*/
|
||||
// VFALCO NOTE Fix this, shouldn't it be a reference like intrusive list?
|
||||
bool push_front (Node* node)
|
||||
{
|
||||
bool first;
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_INTRUSIVE_POINTERTRAITS_H_INCLUDED
|
||||
#define BEAST_INTRUSIVE_POINTERTRAITS_H_INCLUDED
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace beast {
|
||||
namespace intrusive {
|
||||
|
||||
// an unspecialized PointerTraits is ill-defined
|
||||
template <typename P>
|
||||
struct PointerTraits;
|
||||
|
||||
// specializations to remove cv-qualifiers
|
||||
template <typename P>
|
||||
struct PointerTraits <P const> : PointerTraits <P> { };
|
||||
template <typename P>
|
||||
struct PointerTraits <P volatile> : PointerTraits <P> { };
|
||||
template <typename P>
|
||||
struct PointerTraits <P const volatile> : PointerTraits <P> { };
|
||||
// specialization to remove a reference attribute
|
||||
template <typename P>
|
||||
struct PointerTraits <P&> : PointerTraits <P> { };
|
||||
|
||||
// specialization for raw pointers
|
||||
template <typename T>
|
||||
struct PointerTraits <T*>
|
||||
{
|
||||
typedef T element_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
template <class U>
|
||||
struct rebind_pointer
|
||||
{
|
||||
typedef U* type;
|
||||
};
|
||||
|
||||
static pointer pointer_to (reference r)
|
||||
{
|
||||
return static_cast <pointer> (
|
||||
static_cast <void*> (
|
||||
const_cast <char*> (
|
||||
&reinterpret_cast <const char&> (
|
||||
r))));
|
||||
}
|
||||
|
||||
template <class U>
|
||||
static pointer static_cast_from (U* u)
|
||||
{
|
||||
return static_cast <pointer> (u);
|
||||
}
|
||||
|
||||
template <class U>
|
||||
static pointer const_cast_from (U* u)
|
||||
{
|
||||
return const_cast <pointer> (u);
|
||||
}
|
||||
|
||||
template <class U>
|
||||
static pointer dynamic_cast_from (U* u)
|
||||
{
|
||||
return dynamic_cast <pointer> (u);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
99
src/beast/beast/make_unique.h
Normal file
99
src/beast/beast/make_unique.h
Normal file
@@ -0,0 +1,99 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_MAKE_UNIQUE_H_INCLUDED
|
||||
#define BEAST_MAKE_UNIQUE_H_INCLUDED
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace std {
|
||||
|
||||
#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# ifdef _MSC_VER
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
|
||||
template <class T>
|
||||
std::unique_ptr <T> make_unique ()
|
||||
{
|
||||
return std::unique_ptr <T> (new T);
|
||||
}
|
||||
|
||||
template <class T, class P1>
|
||||
std::unique_ptr <T> make_unique (P1&& p1)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (std::forward <P1> (p1)));
|
||||
}
|
||||
|
||||
template <class T, class P1, class P2>
|
||||
std::unique_ptr <T> make_unique (P1&& p1, P2&& p2)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (
|
||||
std::forward <P1> (p1), std::forward <P2> (p2)));
|
||||
}
|
||||
|
||||
template <class T, class P1, class P2, class P3>
|
||||
std::unique_ptr <T> make_unique (P1&& p1, P2&& p2, P3&& p3)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (
|
||||
std::forward <P1> (p1), std::forward <P2> (p2), std::forward <P3> (p3)));
|
||||
}
|
||||
|
||||
template <class T, class P1, class P2, class P3, class P4>
|
||||
std::unique_ptr <T> make_unique (P1&& p1, P2&& p2, P3&& p3, P4&& p4)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (
|
||||
std::forward <P1> (p1), std::forward <P2> (p2), std::forward <P3> (p3),
|
||||
std::forward <P4> (p4)));
|
||||
}
|
||||
|
||||
template <class T, class P1, class P2, class P3, class P4, class P5>
|
||||
std::unique_ptr <T> make_unique (P1&& p1, P2&& p2, P3&& p3, P4&& p4, P5&& p5)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (
|
||||
std::forward <P1> (p1), std::forward <P2> (p2), std::forward <P3> (p3),
|
||||
std::forward <P4> (p4), std::forward <P5> (p5)));
|
||||
}
|
||||
|
||||
template <class T, class P1, class P2, class P3, class P4, class P5, class P6>
|
||||
std::unique_ptr <T> make_unique (P1&& p1, P2&& p2, P3&& p3, P4&& p4, P5&& p5, P6&& p6)
|
||||
{
|
||||
return std::unique_ptr <T> (new T (
|
||||
std::forward <P1> (p1), std::forward <P2> (p2), std::forward <P3> (p3),
|
||||
std::forward <P4> (p4), std::forward <P5> (p5), std::forward <P6> (p6)));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#else
|
||||
|
||||
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
|
||||
@@ -1,68 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_MPL_POINTERTOOTHERH_INCLUDED
|
||||
#define BEAST_MPL_POINTERTOOTHERH_INCLUDED
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
|
||||
// Ideas based on boost
|
||||
|
||||
/** Declares a type which is a pointer or smart pointer to U, depending on T.
|
||||
This works for smart pointer containers with up to three template
|
||||
parameters. More specializations can be added for containers with
|
||||
more than three template parameters.
|
||||
*/
|
||||
/** @{ */
|
||||
template <class T, class U>
|
||||
struct PointerToOther;
|
||||
|
||||
template <class T, class U,
|
||||
template <class> class SmartPointer>
|
||||
struct PointerToOther <SmartPointer <T>, U>
|
||||
{
|
||||
typedef SmartPointer <U> type;
|
||||
};
|
||||
|
||||
template <class T, class T2, class U,
|
||||
template <class, class> class SmartPointer>
|
||||
struct PointerToOther <SmartPointer <T, T2>, U>
|
||||
{
|
||||
typedef SmartPointer <U, T2> type;
|
||||
};
|
||||
|
||||
template <class T, class T2, class T3, class U,
|
||||
template<class, class, class> class SmartPointer>
|
||||
struct PointerToOther <SmartPointer <T, T2, T3>, U>
|
||||
{
|
||||
typedef SmartPointer <U, T2, T3> type;
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
struct PointerToOther <T*, U>
|
||||
{
|
||||
typedef U* type;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,43 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_MPL_REMOVECONSTVOLATILE_H_INCLUDED
|
||||
#define BEAST_MPL_REMOVECONSTVOLATILE_H_INCLUDED
|
||||
|
||||
#include "RemoveConst.h"
|
||||
#include "RemoveVolatile.h"
|
||||
|
||||
// Ideas based on boost
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
|
||||
/** Remove both the `const` and `volatile` qualifiers from a type. */
|
||||
template <typename T>
|
||||
struct RemoveConstVolatile
|
||||
{
|
||||
typedef typename RemoveConst <
|
||||
typename RemoveVolatile <T>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,46 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_MPL_REMOVEVOLATILE_H_INCLUDED
|
||||
#define BEAST_MPL_REMOVEVOLATILE_H_INCLUDED
|
||||
|
||||
// Ideas based on boost
|
||||
|
||||
namespace beast {
|
||||
namespace mpl {
|
||||
|
||||
/** Remove the `volatile` qualifier from a type. */
|
||||
/** @{ */
|
||||
template <typename T>
|
||||
struct RemoveVolatile
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct RemoveVolatile <T volatile>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
/** @} */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BEAST_NET_BASICS_BUFFERTYPE_H_INCLUDED
|
||||
#define BEAST_NET_BASICS_BUFFERTYPE_H_INCLUDED
|
||||
|
||||
#include "../mpl/IfCond.h"
|
||||
#include <type_traits>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -34,13 +34,11 @@ template <bool IsConst>
|
||||
class BufferType
|
||||
{
|
||||
private:
|
||||
typedef typename mpl::IfCond <IsConst,
|
||||
void const*,
|
||||
void*>::type pointer_type;
|
||||
typedef typename std::conditional <IsConst,
|
||||
void const*, void*>::type pointer_type;
|
||||
|
||||
typedef typename mpl::IfCond <IsConst,
|
||||
uint8 const,
|
||||
uint8>::type byte_type;
|
||||
typedef typename std::conditional <IsConst,
|
||||
uint8 const, uint8>::type byte_type;
|
||||
|
||||
public:
|
||||
typedef std::size_t size_type;
|
||||
|
||||
@@ -25,17 +25,6 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "../CStdInt.h"
|
||||
#include "../mpl/IfCond.h"
|
||||
|
||||
namespace std {
|
||||
|
||||
template <typename T>
|
||||
struct hash;
|
||||
|
||||
//template <>
|
||||
//struct hash <beast::IPAddress>;
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -115,7 +104,8 @@ public:
|
||||
class Proxy
|
||||
{
|
||||
public:
|
||||
typedef typename mpl::IfCond <IsConst, uint32 const*, uint32*>::type Pointer;
|
||||
typedef typename std::conditional <
|
||||
IsConst, uint32 const*, uint32*>::type Pointer;
|
||||
|
||||
Proxy (int shift, Pointer value)
|
||||
: m_shift (shift)
|
||||
@@ -325,6 +315,18 @@ public:
|
||||
|
||||
struct key_equal;
|
||||
|
||||
/** LessThanComparable functor that ignores the port. */
|
||||
struct LessWithoutPort
|
||||
{
|
||||
bool operator() (IPAddress const& lhs, IPAddress const& rhs) const;
|
||||
};
|
||||
|
||||
/** EqualityComparable functor that ignores the port. */
|
||||
struct EqualWithoutPort
|
||||
{
|
||||
bool operator() (IPAddress const& lhs, IPAddress const& rhs) const;
|
||||
};
|
||||
|
||||
private:
|
||||
Type m_type;
|
||||
uint16 m_port;
|
||||
@@ -334,7 +336,6 @@ private:
|
||||
|
||||
/** Comparison. */
|
||||
/** @{ */
|
||||
int compare (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
bool operator== (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
bool operator!= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
bool operator< (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
@@ -342,7 +343,6 @@ bool operator<= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
bool operator> (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
bool operator>= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs);
|
||||
|
||||
int compare (IPAddress const& lhs, IPAddress const& rhs);
|
||||
bool operator== (IPAddress const& lhs, IPAddress const& rhs);
|
||||
bool operator!= (IPAddress const& lhs, IPAddress const& rhs);
|
||||
bool operator< (IPAddress const& lhs, IPAddress const& rhs);
|
||||
@@ -372,15 +372,24 @@ struct IPAddress::key_equal
|
||||
}
|
||||
};
|
||||
|
||||
inline bool IPAddress::LessWithoutPort::operator() (
|
||||
IPAddress const& lhs, IPAddress const& rhs) const
|
||||
{
|
||||
return lhs.withPort (0) < rhs.withPort (0);
|
||||
}
|
||||
|
||||
inline bool IPAddress::EqualWithoutPort::operator() (
|
||||
IPAddress const& lhs, IPAddress const& rhs) const
|
||||
{
|
||||
return lhs.withPort (0) == rhs.withPort (0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace std {
|
||||
|
||||
template <typename T>
|
||||
struct hash;
|
||||
|
||||
template <>
|
||||
struct hash <beast::IPAddress>
|
||||
{
|
||||
|
||||
@@ -554,58 +554,81 @@ IPAddress IPAddress::from_string_altform (std::string const& s)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int compare (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
bool operator== (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
{ return lhs.value == rhs.value; }
|
||||
|
||||
bool operator< (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
{ return lhs.value < rhs.value; }
|
||||
|
||||
bool operator!= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
{ return ! (lhs == rhs); }
|
||||
|
||||
bool operator> (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
{ return rhs < lhs; }
|
||||
|
||||
bool operator<= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
{ return ! (rhs < lhs); }
|
||||
|
||||
bool operator>= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs)
|
||||
{ return ! (lhs < rhs); }
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
bool operator== (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{
|
||||
if (lhs.value < rhs.value)
|
||||
return -1;
|
||||
else if (lhs.value > rhs.value)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool operator== (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs) { return compare (lhs, rhs) == 0; }
|
||||
bool operator!= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs) { return compare (lhs, rhs) != 0; }
|
||||
bool operator< (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs) { return compare (lhs, rhs) < 0; }
|
||||
bool operator<= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs) { return compare (lhs, rhs) <= 0; }
|
||||
bool operator> (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs) { return compare (lhs, rhs) > 0; }
|
||||
bool operator>= (IPAddress::V4 const& lhs, IPAddress::V4 const& rhs) { return compare (lhs, rhs) >= 0; }
|
||||
|
||||
static int type_compare (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{
|
||||
if (lhs.type() < rhs.type())
|
||||
return -1;
|
||||
else if (lhs.type() > rhs.type())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int compare (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{
|
||||
int const tc (type_compare (lhs, rhs));
|
||||
|
||||
if (tc < 0)
|
||||
return -1;
|
||||
else if (tc > 0)
|
||||
return 1;
|
||||
|
||||
if (lhs.type() != rhs.type())
|
||||
return false;
|
||||
switch (lhs.type())
|
||||
{
|
||||
case IPAddress::none: return 0;
|
||||
case IPAddress::ipv4: return compare (lhs.v4(), rhs.v4());
|
||||
default:
|
||||
case IPAddress::none: return true;
|
||||
case IPAddress::ipv4:
|
||||
if (lhs.v4() != rhs.v4())
|
||||
return false;
|
||||
if (lhs.port() != rhs.port())
|
||||
return false;
|
||||
return true;
|
||||
case IPAddress::ipv6:
|
||||
break;
|
||||
};
|
||||
bassertfalse;
|
||||
return 0;
|
||||
default:
|
||||
bassertfalse;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator== (IPAddress const& lhs, IPAddress const& rhs) { return compare (lhs, rhs) == 0; }
|
||||
bool operator!= (IPAddress const& lhs, IPAddress const& rhs) { return compare (lhs, rhs) != 0; }
|
||||
bool operator< (IPAddress const& lhs, IPAddress const& rhs) { return compare (lhs, rhs) < 0; }
|
||||
bool operator<= (IPAddress const& lhs, IPAddress const& rhs) { return compare (lhs, rhs) <= 0; }
|
||||
bool operator> (IPAddress const& lhs, IPAddress const& rhs) { return compare (lhs, rhs) > 0; }
|
||||
bool operator>= (IPAddress const& lhs, IPAddress const& rhs) { return compare (lhs, rhs) >= 0; }
|
||||
bool operator< (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{
|
||||
if (lhs.type() > rhs.type())
|
||||
return false;
|
||||
if (lhs.type() < rhs.type())
|
||||
return true;
|
||||
switch (lhs.type())
|
||||
{
|
||||
case IPAddress::none: return true;
|
||||
case IPAddress::ipv4:
|
||||
if (lhs.v4() < rhs.v4())
|
||||
return true;
|
||||
if (lhs.v4() > rhs.v4())
|
||||
return false;
|
||||
return lhs.port() < rhs.port();
|
||||
case IPAddress::ipv6:
|
||||
default:
|
||||
bassertfalse;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator!= (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{ return ! (lhs == rhs); }
|
||||
|
||||
bool operator> (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{ return rhs < lhs; }
|
||||
|
||||
bool operator<= (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{ return ! (rhs < lhs); }
|
||||
|
||||
bool operator>= (IPAddress const& lhs, IPAddress const& rhs)
|
||||
{ return ! (lhs < rhs); }
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
std::ostream& operator<< (std::ostream &os, IPAddress::V4 const& addr)
|
||||
{
|
||||
|
||||
255
src/beast/beast/smart_ptr/AbstractObject.h
Normal file
255
src/beast/beast/smart_ptr/AbstractObject.h
Normal file
@@ -0,0 +1,255 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.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_ABSTRACTOBJECT_H_INCLUDED
|
||||
#define BEAST_SMARTPTR_ABSTRACTOBJECT_H_INCLUDED
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include <typeinfo>
|
||||
#include "../Atomic.h"
|
||||
#include "../Config.h"
|
||||
#include "../Uncopyable.h"
|
||||
#include "../intrusive/LockFreeStack.h"
|
||||
|
||||
namespace beast {
|
||||
namespace abstract {
|
||||
|
||||
/** Base for all abstract interfaces. */
|
||||
class BasicInterface
|
||||
{
|
||||
public:
|
||||
virtual ~BasicInterface() { }
|
||||
|
||||
/** Returns the unique ID of this interface type.
|
||||
The ID must be the same for all instances of the
|
||||
derived interface.
|
||||
*/
|
||||
virtual std::size_t id () const = 0;
|
||||
|
||||
/** Returns the unique ID associated with the Derived type. */
|
||||
template <typename Derived>
|
||||
static std::size_t type_id ()
|
||||
{
|
||||
static std::size_t const value (next_id ());
|
||||
return value;
|
||||
}
|
||||
|
||||
private:
|
||||
// Returns a new unique id
|
||||
static std::size_t next_id ()
|
||||
{
|
||||
static Atomic <std::size_t> value;
|
||||
return ++value;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Base for a derived interface. */
|
||||
template <typename Derived>
|
||||
class Interface : public BasicInterface
|
||||
{
|
||||
public:
|
||||
// Returns the unique ID for all instances of Derived
|
||||
std::size_t id () const
|
||||
{
|
||||
return BasicInterface::type_id <Derived> ();
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Factory for producing interfaces on a specific object. */
|
||||
template <typename Object>
|
||||
class Factory
|
||||
{
|
||||
public:
|
||||
class Callback;
|
||||
|
||||
private:
|
||||
struct Item;
|
||||
|
||||
typedef LockFreeStack <Item> Items;
|
||||
|
||||
struct Item : Items::Node
|
||||
{
|
||||
Item (Callback& owner_)
|
||||
: owner (owner_)
|
||||
{ }
|
||||
Callback& owner;
|
||||
};
|
||||
|
||||
Items m_items;
|
||||
|
||||
public:
|
||||
/** Base for hooking object creation. */
|
||||
class Callback
|
||||
{
|
||||
public:
|
||||
/** Create the callback and insert it into the factory. */
|
||||
explicit Callback (Factory& factory)
|
||||
: m_item (*this)
|
||||
{
|
||||
factory.m_items.push_front (&m_item);
|
||||
}
|
||||
|
||||
/** Called when Object is created.
|
||||
Object must be fully constructed. The order of calls to callbacks
|
||||
is not defined.
|
||||
*/
|
||||
virtual void create_interfaces (Object& object) = 0;
|
||||
|
||||
private:
|
||||
Item m_item;
|
||||
};
|
||||
|
||||
/** Invokes the callbacks for an instance of Object.
|
||||
This must be called after the object is fully constructed, for example
|
||||
as the last statement in the constructor.
|
||||
*/
|
||||
void create_interfaces (Object& object)
|
||||
{
|
||||
for (typename Items::iterator iter (m_items.begin());
|
||||
iter != m_items.end(); ++iter)
|
||||
iter->owner.create_interfaces (object);
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** A container of polymorphic interfaces.
|
||||
The Object type associated with the container is used to gain access
|
||||
to the corresponding factory.
|
||||
*/
|
||||
template <typename Object>
|
||||
class Interfaces : public Uncopyable
|
||||
{
|
||||
public:
|
||||
Interfaces ()
|
||||
{
|
||||
}
|
||||
|
||||
/** Returns a reference to the specified interface.
|
||||
The interface must exist in the container or an exception is thrown.
|
||||
Requirements:
|
||||
Derived must be a subclass of Interface
|
||||
*/
|
||||
/** @{ */
|
||||
template <typename Derived>
|
||||
Derived& get_interface()
|
||||
{
|
||||
Derived* derived (find_interface <Derived> ());
|
||||
if (derived == nullptr)
|
||||
throw std::bad_cast ();
|
||||
return *derived;
|
||||
}
|
||||
|
||||
template <typename Derived>
|
||||
Derived const& get_interface() const
|
||||
{
|
||||
Derived const* derived (find_interface <Derived> ());
|
||||
if (derived == nullptr)
|
||||
throw std::bad_cast ();
|
||||
return *derived;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Returns a pointer to the specified interface.
|
||||
If the interface does not exist, `nullptr` is returned.
|
||||
Requirements:
|
||||
Derived must be a subclass of Interface
|
||||
*/
|
||||
/** @{ */
|
||||
template <typename Derived>
|
||||
Derived* find_interface()
|
||||
{
|
||||
std::size_t const id = BasicInterface::type_id <Derived> ();
|
||||
|
||||
for (typename Set::iterator iter (m_set.begin());
|
||||
iter != m_set.end(); ++iter)
|
||||
{
|
||||
if ((*iter)->id() == id)
|
||||
{
|
||||
Derived* const derived (
|
||||
dynamic_cast <Derived*> (iter->get()));
|
||||
check_postcondition (derived != nullptr);
|
||||
return derived;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <typename Derived>
|
||||
Derived const* find_interface() const
|
||||
{
|
||||
std::size_t const id = BasicInterface::type_id <Derived> ();
|
||||
|
||||
for (typename Set::const_iterator iter (m_set.begin());
|
||||
iter != m_set.end(); ++iter)
|
||||
{
|
||||
if ((*iter)->id() == id)
|
||||
{
|
||||
Derived const* const derived (
|
||||
dynamic_cast <Derived const*> (iter->get()));
|
||||
check_postcondition (derived != nullptr);
|
||||
return derived;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <typename Derived>
|
||||
bool has_interface() const
|
||||
{
|
||||
return find_interface <Derived> () != nullptr;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** Adds the specified interface to the container.
|
||||
Ownership of the object, which must be allocated via operator new,
|
||||
is transferred to the container. If the interface already exists,
|
||||
an exception is thrown.
|
||||
Requirements:
|
||||
Derived must be a subclass of Interface
|
||||
*/
|
||||
template <typename Derived>
|
||||
void add_interface (Derived* derived)
|
||||
{
|
||||
std::unique_ptr <BasicInterface> base_interface (
|
||||
derived);
|
||||
if (has_interface <Derived> ())
|
||||
throw std::invalid_argument ("non-unique");
|
||||
m_set.emplace_back (base_interface.release ());
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::list <std::unique_ptr <BasicInterface>> Set;
|
||||
Set m_set;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -185,6 +185,15 @@ public:
|
||||
*/
|
||||
ObjectType* release() { ObjectType* const o = object; object = nullptr; return o; }
|
||||
|
||||
void reset (ObjectType* object_)
|
||||
{
|
||||
if (object != object_)
|
||||
{
|
||||
ContainerDeletePolicy <ObjectType>::destroy (object);
|
||||
object = object_;
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Swaps this object with that of another ScopedPointer.
|
||||
The two objects simply exchange their pointers.
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
#ifndef BEAST_SHAREDOBJECT_H_INCLUDED
|
||||
#define BEAST_SHAREDOBJECT_H_INCLUDED
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "../Config.h"
|
||||
#include "../Atomic.h"
|
||||
#include "../Uncopyable.h"
|
||||
|
||||
namespace beast {
|
||||
@@ -71,7 +72,7 @@ public:
|
||||
This is done automatically by the smart pointer, but is public just
|
||||
in case it's needed for nefarious purposes.
|
||||
*/
|
||||
inline void incReferenceCount() const noexcept
|
||||
void incReferenceCount() const noexcept
|
||||
{
|
||||
++refCount;
|
||||
}
|
||||
@@ -93,15 +94,16 @@ public:
|
||||
}
|
||||
|
||||
/** Returns the object's current reference count. */
|
||||
inline int getReferenceCount() const noexcept
|
||||
int getReferenceCount() const noexcept
|
||||
{
|
||||
return refCount.get();
|
||||
return refCount.load();
|
||||
}
|
||||
|
||||
protected:
|
||||
//==============================================================================
|
||||
/** Creates the reference-counted object (with an initial ref count of zero). */
|
||||
SharedObject()
|
||||
: refCount (0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -125,79 +127,12 @@ protected:
|
||||
*/
|
||||
void resetReferenceCount() noexcept
|
||||
{
|
||||
refCount = 0;
|
||||
refCount.store (0);
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
Atomic <int> mutable refCount;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Adds reference-counting to an object.
|
||||
|
||||
This is effectively a version of the SharedObject class, but which
|
||||
uses a non-atomic counter, and so is not thread-safe (but which will be more
|
||||
efficient).
|
||||
For more details on how to use it, see the SharedObject class notes.
|
||||
|
||||
@see SharedObject, SharedPtr, SharedObjectArray
|
||||
*/
|
||||
class BEAST_API SingleThreadedSharedObject : public Uncopyable
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Increments the object's reference count.
|
||||
|
||||
This is done automatically by the smart pointer, but is public just
|
||||
in case it's needed for nefarious purposes.
|
||||
*/
|
||||
inline void incReferenceCount() noexcept
|
||||
{
|
||||
++refCount;
|
||||
}
|
||||
|
||||
/** Decreases the object's reference count.
|
||||
|
||||
If doDelete is true the object will be deleted when the reference
|
||||
count drops to zero. The delete is performed using the regular
|
||||
operator and does NOT go through the ContainerDeletePolicy.
|
||||
|
||||
The return value indicates if the reference count dropped to zero,
|
||||
so callers who know the derived type can use the ContainerDeletePolicy.
|
||||
*/
|
||||
inline void decReferenceCount ()
|
||||
{
|
||||
bassert (getReferenceCount() > 0);
|
||||
if (--refCount == 0)
|
||||
destroy ();
|
||||
}
|
||||
|
||||
/** Returns the object's current reference count. */
|
||||
inline int getReferenceCount() const noexcept { return refCount; }
|
||||
|
||||
|
||||
protected:
|
||||
//==============================================================================
|
||||
/** Creates the reference-counted object (with an initial ref count of zero). */
|
||||
SingleThreadedSharedObject() : refCount (0) {}
|
||||
|
||||
/** Destructor. */
|
||||
virtual ~SingleThreadedSharedObject()
|
||||
{
|
||||
// it's dangerous to delete an object that's still referenced by something else!
|
||||
bassert (getReferenceCount() == 0);
|
||||
}
|
||||
|
||||
virtual void destroy () const
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
int refCount;
|
||||
std::atomic <int> mutable refCount;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,13 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "../Config.h"
|
||||
|
||||
#include "ContainerDeletePolicy.h"
|
||||
#include "ScopedPointer.h"
|
||||
#include "SharedObject.h"
|
||||
#include "SharedPtr.h"
|
||||
|
||||
#include "../../modules/beast_core/beast_core.h" // for UnitTest
|
||||
|
||||
#include "impl/AbstractObject.cpp"
|
||||
|
||||
147
src/beast/beast/smart_ptr/impl/AbstractObject.cpp
Normal file
147
src/beast/beast/smart_ptr/impl/AbstractObject.cpp
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>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.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 "../AbstractObject.h"
|
||||
|
||||
namespace beast {
|
||||
namespace abstract {
|
||||
|
||||
class AbstractObjectTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
class Object : public Interfaces <Object>
|
||||
{
|
||||
public:
|
||||
explicit Object (UnitTest& test)
|
||||
: m_test (test)
|
||||
{
|
||||
}
|
||||
|
||||
UnitTest& test ()
|
||||
{
|
||||
return m_test;
|
||||
}
|
||||
|
||||
private:
|
||||
UnitTest& m_test;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
class Interface1 : public Interface <Interface1>
|
||||
{
|
||||
public:
|
||||
Interface1 ()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class Callback1 : public Factory <Object>::Callback
|
||||
{
|
||||
public:
|
||||
explicit Callback1 (Factory <Object>& factory)
|
||||
: Factory <Object>::Callback (factory)
|
||||
{
|
||||
}
|
||||
|
||||
void create_interfaces (Object& object)
|
||||
{
|
||||
object.add_interface (new Interface1);
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
class Interface2 : public Interface <Interface2>
|
||||
{
|
||||
public:
|
||||
Interface2 ()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class Callback2 : public Factory <Object>::Callback
|
||||
{
|
||||
public:
|
||||
explicit Callback2 (Factory <Object>& factory)
|
||||
: Factory <Object>::Callback (factory)
|
||||
{
|
||||
}
|
||||
|
||||
void create_interfaces (Object& object)
|
||||
{
|
||||
object.add_interface (new Interface2);
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void runTest ()
|
||||
{
|
||||
beginTestCase ("create");
|
||||
|
||||
Factory <Object> factory;
|
||||
Callback1 callback1 (factory);
|
||||
Callback2 callback2 (factory);
|
||||
|
||||
Object object (*this);
|
||||
factory.create_interfaces (object);
|
||||
|
||||
// find existing interfaces
|
||||
expect (object.find_interface <Interface1> () != nullptr);
|
||||
expect (object.find_interface <Interface2> () != nullptr);
|
||||
|
||||
// add duplicate interface
|
||||
try
|
||||
{
|
||||
object.add_interface (new Interface1);
|
||||
fail ("uncaught exeption");
|
||||
}
|
||||
catch (std::invalid_argument const&)
|
||||
{
|
||||
pass ();
|
||||
}
|
||||
|
||||
// request missing interface
|
||||
try
|
||||
{
|
||||
struct MissingInterface { };
|
||||
object.get_interface <MissingInterface> ();
|
||||
fail ("uncaught exeption");
|
||||
}
|
||||
catch (std::bad_cast const&)
|
||||
{
|
||||
pass ();
|
||||
}
|
||||
}
|
||||
|
||||
AbstractObjectTests () : UnitTest (
|
||||
"AbstractObject", "beast", runManual)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static AbstractObjectTests abstractObjectTests;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "../chrono/CPUMeter.h"
|
||||
#include "../intrusive/List.h"
|
||||
#include "../intrusive/LockFreeStack.h"
|
||||
#include "SharedData.h"
|
||||
#include "ThreadLocalValue.h"
|
||||
#include "WaitableEvent.h"
|
||||
@@ -371,7 +370,7 @@ protected:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
class Waiter : public LockFreeStack <Waiter>::Node
|
||||
class Waiter : public List <Waiter>::Node
|
||||
{
|
||||
public:
|
||||
Waiter()
|
||||
@@ -390,8 +389,8 @@ protected:
|
||||
{
|
||||
// handlers
|
||||
List <Item> handlers;
|
||||
LockFreeStack <Waiter> waiting;
|
||||
LockFreeStack <Waiter> unused;
|
||||
List <Waiter> waiting;
|
||||
List <Waiter> unused;
|
||||
};
|
||||
|
||||
typedef SharedData <State> SharedState;
|
||||
@@ -440,9 +439,8 @@ public:
|
||||
typename Allocator::template rebind <Waiter>::other a (m_alloc);
|
||||
SharedState::Access state (m_state);
|
||||
while (expectedConcurrency--)
|
||||
{
|
||||
state->unused.push_front (new (a.allocate (1)) Waiter);
|
||||
}
|
||||
state->unused.push_front (
|
||||
*new (a.allocate (1)) Waiter);
|
||||
}
|
||||
|
||||
~ServiceQueueType()
|
||||
@@ -456,11 +454,10 @@ public:
|
||||
bassert (state->waiting.empty());
|
||||
|
||||
typename Allocator::template rebind <Waiter>::other a (m_alloc);
|
||||
for(;;)
|
||||
while (! state->unused.empty ())
|
||||
{
|
||||
Waiter* const waiter (state->unused.pop_front());
|
||||
if (waiter == nullptr)
|
||||
break;
|
||||
Waiter* const waiter (&state->unused.front ());
|
||||
state->unused.pop_front ();
|
||||
a.destroy (waiter);
|
||||
a.deallocate (waiter, 1);
|
||||
}
|
||||
|
||||
@@ -119,12 +119,11 @@ void ServiceQueueBase::stop ()
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
m_stopped.set (1);
|
||||
for(;;)
|
||||
while (! state->waiting.empty ())
|
||||
{
|
||||
Waiter* waiting (state->waiting.pop_front());
|
||||
if (waiting == nullptr)
|
||||
break;
|
||||
waiting->signal();
|
||||
Waiter& waiting (state->waiting.front());
|
||||
state->waiting.pop_front ();
|
||||
waiting.signal ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,14 +143,24 @@ void ServiceQueueBase::wait ()
|
||||
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
|
||||
if (stopped ())
|
||||
return;
|
||||
|
||||
if (! state->handlers.empty())
|
||||
return;
|
||||
waiter = state->unused.pop_front();
|
||||
if (! waiter)
|
||||
|
||||
if (state->unused.empty ())
|
||||
{
|
||||
waiter = new_waiter();
|
||||
state->waiting.push_front (waiter);
|
||||
}
|
||||
else
|
||||
{
|
||||
waiter = &state->unused.front ();
|
||||
state->unused.pop_front ();
|
||||
}
|
||||
|
||||
state->waiting.push_front (*waiter);
|
||||
}
|
||||
|
||||
waiter->wait();
|
||||
@@ -160,19 +169,22 @@ void ServiceQueueBase::wait ()
|
||||
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
state->unused.push_front (waiter);
|
||||
state->unused.push_front (*waiter);
|
||||
}
|
||||
}
|
||||
|
||||
void ServiceQueueBase::enqueue (Item* item)
|
||||
{
|
||||
Waiter* waiter;
|
||||
Waiter* waiter (nullptr);
|
||||
|
||||
{
|
||||
SharedState::Access state (m_state);
|
||||
state->handlers.push_back (*item);
|
||||
// Signal a Waiter if one exists
|
||||
waiter = state->waiting.pop_front();
|
||||
if (! state->waiting.empty ())
|
||||
{
|
||||
waiter = &state->waiting.front ();
|
||||
state->waiting.pop_front ();
|
||||
}
|
||||
}
|
||||
|
||||
if (waiter != nullptr)
|
||||
@@ -425,10 +437,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static int const callsPerThread = 10000;
|
||||
static std::size_t const totalCalls = 10000;
|
||||
|
||||
void testThreads (std::size_t n)
|
||||
{
|
||||
std::size_t const callsPerThread (totalCalls / n);
|
||||
beginTestCase (String::fromNumber (n) + " threads");
|
||||
ServiceQueue service (n);
|
||||
std::vector <ScopedPointer <ServiceThread> > threads;
|
||||
|
||||
@@ -439,9 +439,16 @@ void Thread::yield()
|
||||
#if BEAST_BSD
|
||||
// ???
|
||||
#elif BEAST_MAC || BEAST_IOS
|
||||
// Compiles fine without prctl.h
|
||||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#import <objc/message.h>
|
||||
namespace beast{
|
||||
#include "../../../modules/beast_core/native/osx_ObjCHelpers.h"
|
||||
}
|
||||
|
||||
#else
|
||||
# include <sys/prctl.h>
|
||||
|
||||
#endif
|
||||
|
||||
namespace beast {
|
||||
|
||||
86
src/beast/beast/threads/semaphore.h
Normal file
86
src/beast/beast/threads/semaphore.h
Normal file
@@ -0,0 +1,86 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_SEMAPHORE_H_INCLUDED
|
||||
#define BEAST_THREADS_SEMAPHORE_H_INCLUDED
|
||||
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
|
||||
namespace beast {
|
||||
|
||||
template <class Mutex, class CondVar>
|
||||
class basic_semaphore
|
||||
{
|
||||
private:
|
||||
typedef std::unique_lock <Mutex> scoped_lock;
|
||||
|
||||
Mutex m_mutex;
|
||||
CondVar m_cond;
|
||||
std::size_t m_count;
|
||||
|
||||
public:
|
||||
typedef std::size_t size_type;
|
||||
|
||||
/** Create the semaphore, with an optional initial count.
|
||||
If unspecified, the initial count is zero.
|
||||
*/
|
||||
explicit basic_semaphore (size_type count = 0)
|
||||
: m_count (count)
|
||||
{
|
||||
}
|
||||
|
||||
/** Increment the count and unblock one waiting thread. */
|
||||
void notify ()
|
||||
{
|
||||
scoped_lock lock (m_mutex);
|
||||
++m_count;
|
||||
m_cond.notify_one ();
|
||||
}
|
||||
|
||||
// Deprecated, for backward compatibility
|
||||
void signal () { notify (); }
|
||||
|
||||
/** Block until notify is called. */
|
||||
void wait ()
|
||||
{
|
||||
scoped_lock lock (m_mutex);
|
||||
while (m_count == 0)
|
||||
m_cond.wait (lock);
|
||||
--m_count;
|
||||
}
|
||||
|
||||
/** Perform a non-blocking wait.
|
||||
@return `true` If the wait would be satisfied.
|
||||
*/
|
||||
bool try_wait ()
|
||||
{
|
||||
scoped_lock lock (m_mutex);
|
||||
if (m_count == 0)
|
||||
return false;
|
||||
--m_count;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
typedef basic_semaphore <std::mutex, std::condition_variable> semaphore;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,64 +20,82 @@
|
||||
#ifndef BEAST_UTILITY_JOURNAL_H_INCLUDED
|
||||
#define BEAST_UTILITY_JOURNAL_H_INCLUDED
|
||||
|
||||
#include "../SafeBool.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace beast
|
||||
{
|
||||
namespace beast {
|
||||
|
||||
/** A generic endpoint for log messages. */
|
||||
class Journal
|
||||
{
|
||||
public:
|
||||
class Sink;
|
||||
|
||||
private:
|
||||
Sink* m_sink;
|
||||
|
||||
public:
|
||||
/** Severity level of the message. */
|
||||
enum Severity
|
||||
{
|
||||
kLowestSeverity = 0,
|
||||
kTrace = kLowestSeverity,
|
||||
kAll = 0,
|
||||
|
||||
kTrace = kAll,
|
||||
kDebug,
|
||||
kInfo,
|
||||
kWarning,
|
||||
kError,
|
||||
kFatal,
|
||||
|
||||
kDisabled
|
||||
kDisabled,
|
||||
kNone = kDisabled
|
||||
};
|
||||
|
||||
class Sink;
|
||||
|
||||
private:
|
||||
Journal& operator= (Journal const& other); // disallowed
|
||||
|
||||
Sink* m_sink;
|
||||
Severity m_level;
|
||||
|
||||
public:
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/** Abstraction for the underlying message destination. */
|
||||
class Sink
|
||||
{
|
||||
public:
|
||||
virtual ~Sink () { }
|
||||
Sink ();
|
||||
|
||||
/** Write text to the sink at the specified severity. */
|
||||
virtual void write (Severity severity, std::string const& text) = 0;
|
||||
virtual ~Sink () = 0;
|
||||
|
||||
/** Returns `true` if text at the passed severity produces output. */
|
||||
virtual bool active (Severity severity) = 0;
|
||||
virtual bool active (Severity level) const;
|
||||
|
||||
/** Returns `true` if a message is also written to the Output Window (MSVC). */
|
||||
virtual bool console () = 0;
|
||||
|
||||
/** Set the minimum severity this sink will report. */
|
||||
virtual void set_severity (Severity severity) = 0;
|
||||
virtual bool console () const;
|
||||
|
||||
/** Set whether messages are also written to the Output Window (MSVC). */
|
||||
virtual void set_console (bool to_console) = 0;
|
||||
virtual void console (bool output);
|
||||
|
||||
/** Returns the minimum severity level this sink will report. */
|
||||
virtual Severity severity() const;
|
||||
|
||||
/** Set the minimum severity this sink will report. */
|
||||
virtual void severity (Severity level);
|
||||
|
||||
/** Write text to the sink at the specified severity.
|
||||
The caller is responsible for checking the minimum severity level
|
||||
before using this function.
|
||||
*/
|
||||
virtual void write (Severity level, std::string const& text) = 0;
|
||||
|
||||
private:
|
||||
Severity m_level;
|
||||
bool m_console;
|
||||
};
|
||||
|
||||
/** Returns a Sink which does nothing. */
|
||||
static Sink& getNullSink ();
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
|
||||
class Stream;
|
||||
|
||||
/** Scoped ostream-based container for writing messages to a Journal. */
|
||||
@@ -90,23 +108,32 @@ public:
|
||||
template <typename T>
|
||||
ScopedStream (Stream const& stream, T const& t)
|
||||
: m_sink (stream.sink())
|
||||
, m_severity (stream.severity())
|
||||
, m_level (stream.severity())
|
||||
, m_active (stream.active ())
|
||||
{
|
||||
m_ostream << t;
|
||||
if (active ())
|
||||
m_ostream << t;
|
||||
}
|
||||
|
||||
ScopedStream (Stream const& stream, std::ostream& manip (std::ostream&));
|
||||
ScopedStream (Stream const& stream,
|
||||
std::ostream& manip (std::ostream&));
|
||||
|
||||
~ScopedStream ();
|
||||
|
||||
bool active () const
|
||||
{ return m_active; }
|
||||
|
||||
std::ostringstream& ostream () const;
|
||||
|
||||
std::ostream& operator<< (std::ostream& manip (std::ostream&)) const;
|
||||
std::ostream& operator<< (
|
||||
std::ostream& manip (std::ostream&)) const;
|
||||
|
||||
template <typename T>
|
||||
std::ostream& operator<< (T const& t) const
|
||||
{
|
||||
return m_ostream << t;
|
||||
if (active ())
|
||||
m_ostream << t;
|
||||
return m_ostream;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -115,21 +142,25 @@ public:
|
||||
ScopedStream& operator= (ScopedStream const&); // disallowed
|
||||
|
||||
Sink& m_sink;
|
||||
Severity const m_severity;
|
||||
Severity const m_level;
|
||||
bool const m_active;
|
||||
std::ostringstream mutable m_ostream;
|
||||
bool m_toOutputWindow;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
class Stream
|
||||
class Stream : public SafeBool <Stream>
|
||||
{
|
||||
public:
|
||||
/** Construct a stream which produces no logging output. */
|
||||
/** Create a stream which produces no output. */
|
||||
Stream ();
|
||||
|
||||
/** Construct a stream that writes to the Sink at the given Severity. */
|
||||
Stream (Sink& sink, Severity severity);
|
||||
/** Create stream that writes at the given level. */
|
||||
/** @{ */
|
||||
Stream (Sink& sink, Severity level, bool active = true);
|
||||
Stream (Stream const& stream, bool active);
|
||||
/** @} */
|
||||
|
||||
/** Construct or copy another Stream. */
|
||||
/** @{ */
|
||||
@@ -144,7 +175,10 @@ public:
|
||||
Severity severity() const;
|
||||
|
||||
/** Returns `true` if sink logs anything at this stream's severity. */
|
||||
/** @{ */
|
||||
bool active() const;
|
||||
bool asBoolean() const;
|
||||
/** @} */
|
||||
|
||||
/** Output stream support. */
|
||||
/** @{ */
|
||||
@@ -159,24 +193,48 @@ public:
|
||||
|
||||
private:
|
||||
Sink* m_sink;
|
||||
Severity m_severity;
|
||||
Severity m_level;
|
||||
bool m_disabled;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/** Create a journal that writes to the null sink. */
|
||||
Journal ();
|
||||
explicit Journal (Sink& sink);
|
||||
|
||||
/** Create a journal that writes to the specified sink. */
|
||||
/** @{ */
|
||||
explicit Journal (Sink& sink, Severity level = kAll);
|
||||
|
||||
/** Create a journal from another journal.
|
||||
When specifying a new minimum severity level, the effective minimum
|
||||
level will be the higher of the other journal and the specified value.
|
||||
*/
|
||||
/** @{ */
|
||||
Journal (Journal const& other);
|
||||
Journal (Journal const& other, Severity level);
|
||||
/** @} */
|
||||
|
||||
/** Destroy the journal. */
|
||||
~Journal ();
|
||||
|
||||
/** Returns the Sink associated with this Journal. */
|
||||
Sink& sink() const;
|
||||
|
||||
/** Returns a stream for this sink, with the specified severity. */
|
||||
Stream stream (Severity severity) const;
|
||||
Stream stream (Severity level) const;
|
||||
|
||||
/** Returns `true` if any message would be logged at this severity level. */
|
||||
bool active (Severity severity) const;
|
||||
/** Returns `true` if any message would be logged at this severity level.
|
||||
For a message to be logged, the severity must be at or above both
|
||||
the journal's severity level and the sink's severity level.
|
||||
*/
|
||||
bool active (Severity level) const;
|
||||
|
||||
/** Returns this Journal's minimum severity level.
|
||||
If the underlying sink has a higher threshold, there will still
|
||||
be no output at that level.
|
||||
*/
|
||||
Severity severity () const;
|
||||
|
||||
/** Convenience sink streams for each severity level. */
|
||||
Stream const trace;
|
||||
@@ -185,9 +243,6 @@ public:
|
||||
Stream const warning;
|
||||
Stream const error;
|
||||
Stream const fatal;
|
||||
|
||||
private:
|
||||
Journal& operator= (Journal const& other); // disallowed
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ protected:
|
||||
virtual void add (std::string const& key, uint32 value);
|
||||
virtual void add (std::string const& key, int64 value);
|
||||
virtual void add (std::string const& key, uint64 value);
|
||||
virtual void add (std::string const& key, double value);
|
||||
|
||||
virtual void array_begin () = 0;
|
||||
virtual void array_begin (std::string const& key) = 0;
|
||||
@@ -297,8 +298,24 @@ public:
|
||||
will be nullptr and the second value will be undefined.
|
||||
The second value is a boolean indicating whether or not the path string
|
||||
specifies the wildcard character '*' as the last character.
|
||||
|
||||
print statement examples
|
||||
"parent.child" prints child and all of its children
|
||||
"parent.child." start at the parent and print down to child
|
||||
"parent.grandchild" prints nothing- grandchild not direct discendent
|
||||
"parent.grandchild." starts at the parent and prints down to grandchild
|
||||
"parent.grandchild.*" starts at parent, print through grandchild children
|
||||
*/
|
||||
std::pair <Source*, bool> find (std::string const& path);
|
||||
std::pair <Source*, bool> find (std::string path);
|
||||
|
||||
Source* find_one_deep (std::string const& name);
|
||||
PropertyStream::Source* find_path(std::string path);
|
||||
PropertyStream::Source* find_one(std::string const& name);
|
||||
|
||||
static bool peel_leading_slash (std::string* path);
|
||||
static bool peel_trailing_slashstar (std::string* path);
|
||||
static std::string peel_name(std::string* path);
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
|
||||
70
src/beast/beast/utility/hash_pair.h
Normal file
70
src/beast/beast/utility/hash_pair.h
Normal file
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
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_UTILITY_HASH_PAIR_H_INCLUDED
|
||||
#define BEAST_UTILITY_HASH_PAIR_H_INCLUDED
|
||||
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/utility/base_from_member.hpp>
|
||||
|
||||
namespace std {
|
||||
|
||||
/** Specialization of std::hash for any std::pair type. */
|
||||
template <class First, class Second>
|
||||
struct hash <std::pair <First, Second>>
|
||||
: private boost::base_from_member <std::hash <First>, 0>
|
||||
, private boost::base_from_member <std::hash <Second>, 1>
|
||||
{
|
||||
private:
|
||||
typedef boost::base_from_member <std::hash <First>, 0> first_hash;
|
||||
typedef boost::base_from_member <std::hash <Second>, 1> second_hash;
|
||||
|
||||
public:
|
||||
hash ()
|
||||
{
|
||||
}
|
||||
|
||||
hash (std::hash <First> const& first_hash_,
|
||||
std::hash <Second> const& second_hash_)
|
||||
: first_hash (first_hash_)
|
||||
, second_hash (second_hash_)
|
||||
{
|
||||
}
|
||||
|
||||
std::size_t operator() (std::pair <First, Second> const& value)
|
||||
{
|
||||
std::size_t result (first_hash::member (value.first));
|
||||
boost::hash_combine (result, second_hash::member (value.second));
|
||||
return result;
|
||||
}
|
||||
|
||||
std::size_t operator() (std::pair <First, Second> const& value) const
|
||||
{
|
||||
std::size_t result (first_hash::member (value.first));
|
||||
boost::hash_combine (result, second_hash::member (value.second));
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
|
||||
#include "../Journal.h"
|
||||
|
||||
namespace beast
|
||||
{
|
||||
namespace beast {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -28,27 +27,32 @@ namespace beast
|
||||
class NullJournalSink : public Journal::Sink
|
||||
{
|
||||
public:
|
||||
bool active (Journal::Severity) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool console() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void console (bool)
|
||||
{
|
||||
}
|
||||
|
||||
Journal::Severity severity() const
|
||||
{
|
||||
return Journal::kDisabled;
|
||||
}
|
||||
|
||||
void severity (Journal::Severity)
|
||||
{
|
||||
}
|
||||
|
||||
void write (Journal::Severity, std::string const&)
|
||||
{
|
||||
}
|
||||
|
||||
bool active (Journal::Severity)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool console ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void set_severity (Journal::Severity)
|
||||
{
|
||||
}
|
||||
|
||||
void set_console (bool)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -61,34 +65,82 @@ Journal::Sink& Journal::getNullSink ()
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Journal::Sink::Sink ()
|
||||
: m_level (kAll)
|
||||
, m_console (false)
|
||||
{
|
||||
}
|
||||
|
||||
Journal::Sink::~Sink ()
|
||||
{
|
||||
}
|
||||
|
||||
bool Journal::Sink::active (Severity level) const
|
||||
{
|
||||
return level >= m_level;
|
||||
}
|
||||
|
||||
bool Journal::Sink::console () const
|
||||
{
|
||||
return m_console;
|
||||
}
|
||||
|
||||
void Journal::Sink::console (bool output)
|
||||
{
|
||||
m_console = output;
|
||||
}
|
||||
|
||||
Journal::Severity Journal::Sink::severity () const
|
||||
{
|
||||
return m_level;
|
||||
}
|
||||
|
||||
void Journal::Sink::severity (Severity level)
|
||||
{
|
||||
m_level = level;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Journal::ScopedStream::ScopedStream (Stream const& stream)
|
||||
: m_sink (stream.sink())
|
||||
, m_severity (stream.severity())
|
||||
: m_sink (stream.sink ())
|
||||
, m_level (stream.severity ())
|
||||
, m_active (stream.active ())
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
||||
Journal::ScopedStream::ScopedStream (ScopedStream const& other)
|
||||
: m_sink (other.m_sink)
|
||||
, m_severity (other.m_severity)
|
||||
, m_level (other.m_level)
|
||||
, m_active (other.m_active)
|
||||
{
|
||||
init ();
|
||||
}
|
||||
|
||||
Journal::ScopedStream::ScopedStream (Stream const& stream, std::ostream& manip (std::ostream&))
|
||||
: m_sink (stream.sink())
|
||||
, m_severity (stream.severity())
|
||||
Journal::ScopedStream::ScopedStream (
|
||||
Stream const& stream, std::ostream& manip (std::ostream&))
|
||||
: m_sink (stream.sink ())
|
||||
, m_level (stream.severity ())
|
||||
, m_active (stream.active ())
|
||||
{
|
||||
init ();
|
||||
m_ostream << manip;
|
||||
if (active ())
|
||||
m_ostream << manip;
|
||||
}
|
||||
|
||||
Journal::ScopedStream::~ScopedStream ()
|
||||
{
|
||||
if (! m_ostream.str().empty())
|
||||
if (active ())
|
||||
{
|
||||
if (m_sink.active (m_severity))
|
||||
m_sink.write (m_severity, m_ostream.str());
|
||||
std::string const& s (m_ostream.str());
|
||||
if (! s.empty ())
|
||||
{
|
||||
if (s == "\n")
|
||||
m_sink.write (m_level, "");
|
||||
else
|
||||
m_sink.write (m_level, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,20 +169,30 @@ std::ostringstream& Journal::ScopedStream::ostream () const
|
||||
|
||||
Journal::Stream::Stream ()
|
||||
: m_sink (&getNullSink ())
|
||||
, m_severity (kDisabled)
|
||||
, m_level (kDisabled)
|
||||
, m_disabled (true)
|
||||
{
|
||||
}
|
||||
|
||||
Journal::Stream::Stream (Sink& sink, Severity severity)
|
||||
Journal::Stream::Stream (Sink& sink, Severity level, bool active)
|
||||
: m_sink (&sink)
|
||||
, m_severity (severity)
|
||||
, m_level (level)
|
||||
, m_disabled (! active)
|
||||
{
|
||||
bassert (level != kDisabled);
|
||||
}
|
||||
|
||||
Journal::Stream::Stream (Stream const& stream, bool active)
|
||||
: m_sink (&stream.sink ())
|
||||
, m_level (stream.severity ())
|
||||
, m_disabled (! active)
|
||||
{
|
||||
bassert (severity != kDisabled);
|
||||
}
|
||||
|
||||
Journal::Stream::Stream (Stream const& other)
|
||||
: m_sink (other.m_sink)
|
||||
, m_severity (other.m_severity)
|
||||
, m_level (other.m_level)
|
||||
, m_disabled (other.m_disabled)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -141,22 +203,28 @@ Journal::Sink& Journal::Stream::sink () const
|
||||
|
||||
Journal::Severity Journal::Stream::severity () const
|
||||
{
|
||||
return m_severity;
|
||||
return m_level;
|
||||
}
|
||||
|
||||
bool Journal::Stream::active () const
|
||||
{
|
||||
return m_sink->active (m_severity);
|
||||
return ! m_disabled && m_sink->active (m_level);
|
||||
}
|
||||
|
||||
bool Journal::Stream::asBoolean () const
|
||||
{
|
||||
return active();
|
||||
}
|
||||
|
||||
Journal::Stream& Journal::Stream::operator= (Stream const& other)
|
||||
{
|
||||
m_sink = other.m_sink;
|
||||
m_severity = other.m_severity;
|
||||
m_level = other.m_level;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Journal::ScopedStream Journal::Stream::operator<< (std::ostream& manip (std::ostream&)) const
|
||||
Journal::ScopedStream Journal::Stream::operator<< (
|
||||
std::ostream& manip (std::ostream&)) const
|
||||
{
|
||||
return ScopedStream (*this, manip);
|
||||
}
|
||||
@@ -165,6 +233,7 @@ Journal::ScopedStream Journal::Stream::operator<< (std::ostream& manip (std::ost
|
||||
|
||||
Journal::Journal ()
|
||||
: m_sink (&getNullSink())
|
||||
, m_level (kDisabled)
|
||||
, trace (stream (kTrace))
|
||||
, debug (stream (kDebug))
|
||||
, info (stream (kInfo))
|
||||
@@ -174,8 +243,9 @@ Journal::Journal ()
|
||||
{
|
||||
}
|
||||
|
||||
Journal::Journal (Sink& sink)
|
||||
Journal::Journal (Sink& sink, Severity level)
|
||||
: m_sink (&sink)
|
||||
, m_level (level)
|
||||
, trace (stream (kTrace))
|
||||
, debug (stream (kDebug))
|
||||
, info (stream (kInfo))
|
||||
@@ -187,6 +257,19 @@ Journal::Journal (Sink& sink)
|
||||
|
||||
Journal::Journal (Journal const& other)
|
||||
: m_sink (other.m_sink)
|
||||
, m_level (other.m_level)
|
||||
, trace (stream (kTrace))
|
||||
, debug (stream (kDebug))
|
||||
, info (stream (kInfo))
|
||||
, warning (stream (kWarning))
|
||||
, error (stream (kError))
|
||||
, fatal (stream (kFatal))
|
||||
{
|
||||
}
|
||||
|
||||
Journal::Journal (Journal const& other, Severity level)
|
||||
: m_sink (other.m_sink)
|
||||
, m_level (std::max (other.m_level, level))
|
||||
, trace (stream (kTrace))
|
||||
, debug (stream (kDebug))
|
||||
, info (stream (kInfo))
|
||||
@@ -205,15 +288,23 @@ Journal::Sink& Journal::sink() const
|
||||
return *m_sink;
|
||||
}
|
||||
|
||||
Journal::Stream Journal::stream (Severity severity) const
|
||||
Journal::Stream Journal::stream (Severity level) const
|
||||
{
|
||||
return Stream (*m_sink, severity);
|
||||
return Stream (*m_sink, level, level >= m_level);
|
||||
}
|
||||
|
||||
bool Journal::active (Severity severity) const
|
||||
bool Journal::active (Severity level) const
|
||||
{
|
||||
bassert (severity != kDisabled);
|
||||
return m_sink->active (severity);
|
||||
if (level == kDisabled)
|
||||
return false;
|
||||
if (level < m_level)
|
||||
return false;
|
||||
return m_sink->active (level);
|
||||
}
|
||||
|
||||
Journal::Severity Journal::severity () const
|
||||
{
|
||||
return m_level;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "../PropertyStream.h"
|
||||
|
||||
#include <limits>
|
||||
#include <iostream>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -235,7 +236,7 @@ void PropertyStream::Source::write (
|
||||
void PropertyStream::Source::write_one (PropertyStream& stream)
|
||||
{
|
||||
Map map (m_name, stream);
|
||||
//onWrite (map);
|
||||
onWrite (map);
|
||||
}
|
||||
|
||||
void PropertyStream::Source::write (PropertyStream& stream)
|
||||
@@ -266,65 +267,111 @@ void PropertyStream::Source::write (PropertyStream& stream, std::string const& p
|
||||
result.first->write_one (stream);
|
||||
}
|
||||
|
||||
std::pair <PropertyStream::Source*, bool> PropertyStream::Source::find (std::string const& path)
|
||||
std::pair <PropertyStream::Source*, bool> PropertyStream::Source::find (std::string path)
|
||||
{
|
||||
struct Parser
|
||||
{
|
||||
Parser (std::string const& path)
|
||||
: m_first (path.begin())
|
||||
, m_last (path.end())
|
||||
{
|
||||
}
|
||||
|
||||
std::string next ()
|
||||
{
|
||||
std::string::const_iterator pos (
|
||||
std::find (m_first, m_last, '.'));
|
||||
std::string const s (m_first, pos);
|
||||
if (pos != m_last)
|
||||
m_first = pos + 1;
|
||||
else
|
||||
m_first = pos;
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string::const_iterator m_first;
|
||||
std::string::const_iterator m_last;
|
||||
};
|
||||
|
||||
if (path.empty ())
|
||||
return std::make_pair (this, false);
|
||||
|
||||
Parser p (path);
|
||||
bool const deep (peel_trailing_slashstar (&path));
|
||||
bool const rooted (peel_leading_slash (&path));
|
||||
Source* source (this);
|
||||
if (p.next() != this->m_name)
|
||||
return std::make_pair (nullptr, false);
|
||||
|
||||
for (;;)
|
||||
if (! path.empty())
|
||||
{
|
||||
std::string const s (p.next());
|
||||
|
||||
if (s.empty())
|
||||
return std::make_pair (source, false);
|
||||
|
||||
if (s == "*")
|
||||
return std::make_pair (source, true);
|
||||
|
||||
SharedState::Access state (source->m_state);
|
||||
for (List <Item>::iterator iter (state->children.begin());;)
|
||||
if (! rooted)
|
||||
{
|
||||
if (iter == state->children.end())
|
||||
return std::make_pair (nullptr, false);
|
||||
|
||||
if (iter->source().m_name == s)
|
||||
{
|
||||
source = &iter->source();
|
||||
break;
|
||||
}
|
||||
|
||||
++iter;
|
||||
std::string const name (peel_name (&path));
|
||||
source = find_one_deep (name);
|
||||
if (source == nullptr)
|
||||
return std::make_pair (nullptr, deep);
|
||||
}
|
||||
source = source->find_path (path);
|
||||
}
|
||||
return std::make_pair (source, deep);
|
||||
}
|
||||
|
||||
bool PropertyStream::Source::peel_leading_slash (std::string* path)
|
||||
{
|
||||
if (! path->empty() && path->front() == '/')
|
||||
{
|
||||
*path = std::string (path->begin() + 1, path->end());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PropertyStream::Source::peel_trailing_slashstar (std::string* path)
|
||||
{
|
||||
bool found(false);
|
||||
if (path->empty())
|
||||
return false;
|
||||
if (path->back() == '*')
|
||||
{
|
||||
found = true;
|
||||
path->pop_back();
|
||||
}
|
||||
if(! path->empty() && path->back() == '/')
|
||||
path->pop_back();
|
||||
return found;
|
||||
}
|
||||
|
||||
std::string PropertyStream::Source::peel_name (std::string* path)
|
||||
{
|
||||
if (path->empty())
|
||||
return "";
|
||||
|
||||
std::string::const_iterator first = (*path).begin();
|
||||
std::string::const_iterator last = (*path).end();
|
||||
std::string::const_iterator pos (std::find (first, last, '/'));
|
||||
std::string s (first, pos);
|
||||
|
||||
if (pos != last)
|
||||
*path = std::string (pos+1, last);
|
||||
else
|
||||
*path = std::string ();
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
// Recursive search through the whole tree until name is found
|
||||
PropertyStream::Source* PropertyStream::Source::find_one_deep (std::string const& name)
|
||||
{
|
||||
Source* found = find_one (name);
|
||||
if (found != nullptr)
|
||||
return found;
|
||||
SharedState::Access state (this->m_state);
|
||||
for (auto iter : state->children)
|
||||
{
|
||||
found = iter.source().find_one_deep (name);
|
||||
if (found != nullptr)
|
||||
return found;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PropertyStream::Source* PropertyStream::Source::find_path (std::string path)
|
||||
{
|
||||
if (path.empty())
|
||||
return this;
|
||||
Source* source (this);
|
||||
do
|
||||
{
|
||||
std::string const name (peel_name (&path));
|
||||
if(name.empty ())
|
||||
break;
|
||||
source = source->find_one(name);
|
||||
}
|
||||
while (source != nullptr);
|
||||
return source;
|
||||
}
|
||||
|
||||
// This function only looks at immediate children
|
||||
// If no immediate children match, then return nullptr
|
||||
PropertyStream::Source* PropertyStream::Source::find_one (std::string const& name)
|
||||
{
|
||||
SharedState::Access state (this->m_state);
|
||||
for (auto iter : state->children)
|
||||
{
|
||||
if (iter.source().m_name == name)
|
||||
return &iter.source();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void PropertyStream::Source::onWrite (Map&)
|
||||
@@ -390,6 +437,11 @@ void PropertyStream::add (std::string const& key, int64 value)
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyStream::add (std::string const& key, double value)
|
||||
{
|
||||
lexical_add (key, value);
|
||||
}
|
||||
|
||||
void PropertyStream::add (std::string const& key, uint64 value)
|
||||
{
|
||||
if (value <= std::numeric_limits <uint32>::max() &&
|
||||
@@ -439,5 +491,208 @@ void PropertyStream::add (uint64 value)
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class PropertyStreamTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
typedef PropertyStream::Source Source;
|
||||
|
||||
void test_peel_name (std::string s, std::string const& expected,
|
||||
std::string const& expected_remainder)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::string const peeled_name = Source::peel_name (&s);
|
||||
expect (peeled_name == expected);
|
||||
expect (s == expected_remainder);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void test_peel_leading_slash (std::string s, std::string const& expected,
|
||||
bool should_be_found)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool const found (Source::peel_leading_slash (&s));
|
||||
expect (found == should_be_found);
|
||||
expect (s == expected);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void test_peel_trailing_slashstar (std::string s,
|
||||
std::string const& expected_remainder, bool should_be_found)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool const found (Source::peel_trailing_slashstar (&s));
|
||||
expect (found == should_be_found);
|
||||
expect (s == expected_remainder);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void test_find_one (Source& root, Source* expected, std::string const& name)
|
||||
{
|
||||
try
|
||||
{
|
||||
Source* source (root.find_one (name));
|
||||
expect (source == expected);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void test_find_path (Source& root, std::string const& path,
|
||||
Source* expected)
|
||||
{
|
||||
try
|
||||
{
|
||||
Source* source (root.find_path (path));
|
||||
expect (source == expected);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void test_find_one_deep (Source& root, std::string const& name,
|
||||
Source* expected)
|
||||
{
|
||||
try
|
||||
{
|
||||
Source* source (root.find_one_deep (name));
|
||||
expect (source == expected);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void test_find (Source& root, std::string path, Source* expected,
|
||||
bool expected_star)
|
||||
{
|
||||
try
|
||||
{
|
||||
auto const result (root.find (path));
|
||||
expect (result.first == expected);
|
||||
expect (result.second == expected_star);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
failException ();
|
||||
}
|
||||
}
|
||||
|
||||
void runTest()
|
||||
{
|
||||
Source a ("a");
|
||||
Source b ("b");
|
||||
Source c ("c");
|
||||
Source d ("d");
|
||||
Source e ("e");
|
||||
Source f ("f");
|
||||
Source g ("g");
|
||||
|
||||
//
|
||||
// a { b { d { f }, e }, c { g } }
|
||||
//
|
||||
|
||||
a.add ( b );
|
||||
a.add ( c );
|
||||
c.add ( g );
|
||||
b.add ( d );
|
||||
b.add ( e );
|
||||
d.add ( f );
|
||||
|
||||
beginTestCase ("peel_name");
|
||||
test_peel_name ("a", "a", "");
|
||||
test_peel_name ("foo/bar", "foo", "bar");
|
||||
test_peel_name ("foo/goo/bar", "foo", "goo/bar");
|
||||
test_peel_name ("", "", "");
|
||||
|
||||
beginTestCase ("peel_leading_slash");
|
||||
test_peel_leading_slash ("foo/", "foo/", false);
|
||||
test_peel_leading_slash ("foo", "foo", false);
|
||||
test_peel_leading_slash ("/foo/", "foo/", true);
|
||||
test_peel_leading_slash ("/foo", "foo", true);
|
||||
|
||||
beginTestCase ("peel_trailing_slashstar");
|
||||
test_peel_trailing_slashstar ("/foo/goo/*", "/foo/goo", true);
|
||||
test_peel_trailing_slashstar ("foo/goo/*", "foo/goo", true);
|
||||
test_peel_trailing_slashstar ("/foo/goo/", "/foo/goo", false);
|
||||
test_peel_trailing_slashstar ("foo/goo", "foo/goo", false);
|
||||
test_peel_trailing_slashstar ("", "", false);
|
||||
test_peel_trailing_slashstar ("/", "", false);
|
||||
test_peel_trailing_slashstar ("/*", "", true);
|
||||
test_peel_trailing_slashstar ("//", "/", false);
|
||||
test_peel_trailing_slashstar ("**", "*", true);
|
||||
test_peel_trailing_slashstar ("*/", "*", false);
|
||||
|
||||
beginTestCase ("find_one");
|
||||
test_find_one (a, &b, "b");
|
||||
test_find_one (a, nullptr, "d");
|
||||
test_find_one (b, &e, "e");
|
||||
test_find_one (d, &f, "f");
|
||||
|
||||
beginTestCase ("find_path");
|
||||
test_find_path (a, "a", nullptr);
|
||||
test_find_path (a, "e", nullptr);
|
||||
test_find_path (a, "a/b", nullptr);
|
||||
test_find_path (a, "a/b/e", nullptr);
|
||||
test_find_path (a, "b/e/g", nullptr);
|
||||
test_find_path (a, "b/e/f", nullptr);
|
||||
test_find_path (a, "b", &b);
|
||||
test_find_path (a, "b/e", &e);
|
||||
test_find_path (a, "b/d/f", &f);
|
||||
|
||||
beginTestCase ("find_one_deep");
|
||||
test_find_one_deep (a, "z", nullptr);
|
||||
test_find_one_deep (a, "g", &g);
|
||||
test_find_one_deep (a, "b", &b);
|
||||
test_find_one_deep (a, "d", &d);
|
||||
test_find_one_deep (a, "f", &f);
|
||||
|
||||
beginTestCase ("find");
|
||||
test_find (a, "", &a, false);
|
||||
test_find (a, "*", &a, true);
|
||||
test_find (a, "/b", &b, false);
|
||||
test_find (a, "b", &b, false);
|
||||
test_find (a, "d", &d, false);
|
||||
test_find (a, "/b*", &b, true);
|
||||
test_find (a, "b*", &b, true);
|
||||
test_find (a, "d*", &d, true);
|
||||
test_find (a, "/b/*", &b, true);
|
||||
test_find (a, "b/*", &b, true);
|
||||
test_find (a, "d/*", &d, true);
|
||||
test_find (a, "a", nullptr, false);
|
||||
test_find (a, "/d", nullptr, false);
|
||||
test_find (a, "/d*", nullptr, true);
|
||||
test_find (a, "/d/*", nullptr, true);
|
||||
}
|
||||
|
||||
PropertyStreamTests ()
|
||||
: UnitTest ("PropertyStream", "beast")
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static PropertyStreamTests propertyStreamTests;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
/** Config: BEAST_FUNCTIONAL_USES_###
|
||||
<functional> source configuration.
|
||||
Set one of these to manually force a particular implementation of bind().
|
||||
|
||||
@@ -130,7 +130,7 @@ private:
|
||||
|
||||
/** A reference counted, abstract completion handler. */
|
||||
template <typename Signature, class Allocator = std::allocator <char> >
|
||||
class AbstractHandler;
|
||||
struct AbstractHandler;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -64,6 +64,17 @@ public:
|
||||
Derived* m_owner;
|
||||
};
|
||||
|
||||
void addReference ()
|
||||
{
|
||||
++m_pending;
|
||||
}
|
||||
|
||||
void removeReference ()
|
||||
{
|
||||
if (--m_pending)
|
||||
(static_cast <Derived *> (this))->asyncHandlersComplete ();
|
||||
}
|
||||
|
||||
private:
|
||||
// The number of handlers pending.
|
||||
Atomic <int> m_pending;
|
||||
|
||||
@@ -62,14 +62,7 @@ public:
|
||||
virtual void operator() (error_code const&, std::size_t);
|
||||
|
||||
template <typename Function>
|
||||
void invoke (BOOST_ASIO_MOVE_ARG(Function) f)
|
||||
{
|
||||
// The allocator will hold a reference to the SharedHandler
|
||||
// so that we can safely destroy the function object.
|
||||
invoked_type invoked (f,
|
||||
SharedHandlerAllocator <char> (this));
|
||||
invoke (invoked);
|
||||
}
|
||||
void invoke (BEAST_MOVE_ARG(Function) f);
|
||||
|
||||
virtual void invoke (invoked_type& invoked) = 0;
|
||||
virtual void* allocate (std::size_t size) = 0;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
This class is compatible with std::allocator and can be used in any
|
||||
boost interface which takes a template parameter of type Allocator.
|
||||
This includes boost::function and especially boost::asio::streambuf
|
||||
This includes std::function and especially boost::asio::streambuf
|
||||
and relatives. This is vastly more efficient in a variety of situations
|
||||
especially during an upcall and when using stackful coroutines.
|
||||
|
||||
@@ -111,17 +111,13 @@ private:
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if 0
|
||||
template <typename Function>
|
||||
void SharedHandler::invoke (BOOST_ASIO_MOVE_ARG(Function) f)
|
||||
void SharedHandler::invoke (BEAST_MOVE_ARG(Function) f)
|
||||
{
|
||||
// The allocator will hold a reference to the SharedHandler
|
||||
// so that we can safely destroy the function object.
|
||||
invoked_type invoked (BOOST_ASIO_MOVE_CAST(Function)(f),
|
||||
SharedHandlerAllocator <char> (this));
|
||||
invoked_type invoked (f,SharedHandlerAllocator <char> (this));
|
||||
invoke (invoked);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
struct SocketBase
|
||||
{
|
||||
protected:
|
||||
public:
|
||||
typedef boost::system::error_code error_code;
|
||||
|
||||
/** The error returned when a pure virtual is called.
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
namespace beast
|
||||
{
|
||||
|
||||
#include "containers/AbstractFifo.cpp"
|
||||
#include "containers/DynamicObject.cpp"
|
||||
#include "containers/NamedValueSet.cpp"
|
||||
#include "containers/PropertySet.cpp"
|
||||
@@ -155,7 +154,6 @@ namespace beast
|
||||
#include "logging/Logger.cpp"
|
||||
|
||||
#include "maths/BigInteger.cpp"
|
||||
#include "maths/Expression.cpp"
|
||||
#include "maths/Random.cpp"
|
||||
|
||||
#include "memory/MemoryBlock.cpp"
|
||||
@@ -188,7 +186,6 @@ namespace beast
|
||||
|
||||
#include "thread/impl/TrackedMutex.cpp"
|
||||
#include "thread/DeadlineTimer.cpp"
|
||||
#include "thread/Semaphore.cpp"
|
||||
#include "thread/Workers.cpp"
|
||||
|
||||
#include "threads/ChildProcess.cpp"
|
||||
|
||||
@@ -76,10 +76,6 @@ class FileOutputStream;
|
||||
|
||||
#include "diagnostic/Throw.h"
|
||||
#include "system/Functional.h"
|
||||
#include "memory/AtomicCounter.h"
|
||||
#include "memory/AtomicFlag.h"
|
||||
#include "memory/AtomicPointer.h"
|
||||
#include "memory/AtomicState.h"
|
||||
#include "threads/SpinDelay.h"
|
||||
|
||||
#include "time/AtExitHook.h"
|
||||
@@ -154,7 +150,6 @@ class FileOutputStream;
|
||||
#include "logging/Logger.h"
|
||||
#include "diagnostic/FPUFlags.h"
|
||||
#include "memory/SharedFunction.h"
|
||||
#include "containers/AbstractFifo.h"
|
||||
#include "text/Identifier.h"
|
||||
#include "containers/Variant.h"
|
||||
#include "containers/LinkedListPointer.h"
|
||||
@@ -162,13 +157,10 @@ class FileOutputStream;
|
||||
#include "containers/DynamicObject.h"
|
||||
#include "maths/BigInteger.h"
|
||||
#include "maths/Random.h"
|
||||
#include "containers/LockFreeQueue.h"
|
||||
#include "containers/OwnedArray.h"
|
||||
#include "text/StringPairArray.h"
|
||||
#include "containers/PropertySet.h"
|
||||
#include "containers/SharedObjectArray.h"
|
||||
#include "containers/ScopedValueSetter.h"
|
||||
#include "containers/SortedSet.h"
|
||||
#include "maths/Range.h"
|
||||
#include "containers/SparseSet.h"
|
||||
#include "files/DirectoryIterator.h"
|
||||
@@ -185,12 +177,8 @@ class FileOutputStream;
|
||||
#include "json/JSON.h"
|
||||
#include "logging/FileLogger.h"
|
||||
#include "logging/Logger.h"
|
||||
#include "maths/Expression.h"
|
||||
#include "maths/Interval.h"
|
||||
#include "memory/OptionalScopedPointer.h"
|
||||
#include "memory/SharedSingleton.h"
|
||||
#include "memory/WeakReference.h"
|
||||
#include "memory/RecycledObjectPool.h"
|
||||
#include "misc/Main.h"
|
||||
#include "misc/Uuid.h"
|
||||
#include "misc/WindowsRegistry.h"
|
||||
@@ -227,7 +215,6 @@ class FileOutputStream;
|
||||
|
||||
#include "thread/DeadlineTimer.h"
|
||||
|
||||
#include "thread/Semaphore.h"
|
||||
#include "thread/Workers.h"
|
||||
|
||||
}
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.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.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
AbstractFifo::AbstractFifo (const int capacity) noexcept
|
||||
: bufferSize (capacity)
|
||||
{
|
||||
bassert (bufferSize > 0);
|
||||
}
|
||||
|
||||
AbstractFifo::~AbstractFifo() {}
|
||||
|
||||
int AbstractFifo::getTotalSize() const noexcept { return bufferSize; }
|
||||
int AbstractFifo::getFreeSpace() const noexcept { return bufferSize - getNumReady(); }
|
||||
|
||||
int AbstractFifo::getNumReady() const noexcept
|
||||
{
|
||||
const int vs = validStart.get();
|
||||
const int ve = validEnd.get();
|
||||
return ve >= vs ? (ve - vs) : (bufferSize - (vs - ve));
|
||||
}
|
||||
|
||||
void AbstractFifo::reset() noexcept
|
||||
{
|
||||
validEnd = 0;
|
||||
validStart = 0;
|
||||
}
|
||||
|
||||
void AbstractFifo::setTotalSize (int newSize) noexcept
|
||||
{
|
||||
bassert (newSize > 0);
|
||||
reset();
|
||||
bufferSize = newSize;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void AbstractFifo::prepareToWrite (int numToWrite, int& startIndex1, int& blockSize1, int& startIndex2, int& blockSize2) const noexcept
|
||||
{
|
||||
const int vs = validStart.get();
|
||||
const int ve = validEnd.value;
|
||||
|
||||
const int freeSpace = ve >= vs ? (bufferSize - (ve - vs)) : (vs - ve);
|
||||
numToWrite = bmin (numToWrite, freeSpace - 1);
|
||||
|
||||
if (numToWrite <= 0)
|
||||
{
|
||||
startIndex1 = 0;
|
||||
startIndex2 = 0;
|
||||
blockSize1 = 0;
|
||||
blockSize2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
startIndex1 = ve;
|
||||
startIndex2 = 0;
|
||||
blockSize1 = bmin (bufferSize - ve, numToWrite);
|
||||
numToWrite -= blockSize1;
|
||||
blockSize2 = numToWrite <= 0 ? 0 : bmin (numToWrite, vs);
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractFifo::finishedWrite (int numWritten) noexcept
|
||||
{
|
||||
bassert (numWritten >= 0 && numWritten < bufferSize);
|
||||
int newEnd = validEnd.value + numWritten;
|
||||
if (newEnd >= bufferSize)
|
||||
newEnd -= bufferSize;
|
||||
|
||||
validEnd = newEnd;
|
||||
}
|
||||
|
||||
void AbstractFifo::prepareToRead (int numWanted, int& startIndex1, int& blockSize1, int& startIndex2, int& blockSize2) const noexcept
|
||||
{
|
||||
const int vs = validStart.value;
|
||||
const int ve = validEnd.get();
|
||||
|
||||
const int numReady = ve >= vs ? (ve - vs) : (bufferSize - (vs - ve));
|
||||
numWanted = bmin (numWanted, numReady);
|
||||
|
||||
if (numWanted <= 0)
|
||||
{
|
||||
startIndex1 = 0;
|
||||
startIndex2 = 0;
|
||||
blockSize1 = 0;
|
||||
blockSize2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
startIndex1 = vs;
|
||||
startIndex2 = 0;
|
||||
blockSize1 = bmin (bufferSize - vs, numWanted);
|
||||
numWanted -= blockSize1;
|
||||
blockSize2 = numWanted <= 0 ? 0 : bmin (numWanted, ve);
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractFifo::finishedRead (int numRead) noexcept
|
||||
{
|
||||
bassert (numRead >= 0 && numRead <= bufferSize);
|
||||
|
||||
int newStart = validStart.value + numRead;
|
||||
if (newStart >= bufferSize)
|
||||
newStart -= bufferSize;
|
||||
|
||||
validStart = newStart;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
class AbstractFifoTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
AbstractFifoTests() : UnitTest ("Abstract Fifo", "beast")
|
||||
{
|
||||
}
|
||||
|
||||
class WriteThread : public Thread
|
||||
{
|
||||
public:
|
||||
WriteThread (AbstractFifo& fifo_, int* buffer_)
|
||||
: Thread ("fifo writer"), fifo (fifo_), buffer (buffer_)
|
||||
{
|
||||
startThread();
|
||||
}
|
||||
|
||||
~WriteThread()
|
||||
{
|
||||
stopThread (5000);
|
||||
}
|
||||
|
||||
void run()
|
||||
{
|
||||
int n = 0;
|
||||
Random r;
|
||||
|
||||
while (! threadShouldExit())
|
||||
{
|
||||
int num = r.nextInt (2000) + 1;
|
||||
|
||||
int start1, size1, start2, size2;
|
||||
fifo.prepareToWrite (num, start1, size1, start2, size2);
|
||||
|
||||
bassert (size1 >= 0 && size2 >= 0);
|
||||
bassert (size1 == 0 || (start1 >= 0 && start1 < fifo.getTotalSize()));
|
||||
bassert (size2 == 0 || (start2 >= 0 && start2 < fifo.getTotalSize()));
|
||||
|
||||
for (int i = 0; i < size1; ++i)
|
||||
buffer [start1 + i] = n++;
|
||||
|
||||
for (int i = 0; i < size2; ++i)
|
||||
buffer [start2 + i] = n++;
|
||||
|
||||
fifo.finishedWrite (size1 + size2);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
AbstractFifo& fifo;
|
||||
int* buffer;
|
||||
};
|
||||
|
||||
void runTest()
|
||||
{
|
||||
beginTestCase ("AbstractFifo");
|
||||
|
||||
int buffer [5000];
|
||||
AbstractFifo fifo (numElementsInArray (buffer));
|
||||
|
||||
WriteThread writer (fifo, buffer);
|
||||
|
||||
int n = 0;
|
||||
Random r;
|
||||
|
||||
bool failed = false;
|
||||
|
||||
for (int count = 100000; --count >= 0;)
|
||||
{
|
||||
int num = r.nextInt (6000) + 1;
|
||||
|
||||
int start1, size1, start2, size2;
|
||||
fifo.prepareToRead (num, start1, size1, start2, size2);
|
||||
|
||||
if (! (size1 >= 0 && size2 >= 0)
|
||||
&& (size1 == 0 || (start1 >= 0 && start1 < fifo.getTotalSize()))
|
||||
&& (size2 == 0 || (start2 >= 0 && start2 < fifo.getTotalSize())))
|
||||
{
|
||||
expect (false, "prepareToRead returned negative values");
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < size1; ++i)
|
||||
failed = (buffer [start1 + i] != n++) || failed;
|
||||
|
||||
for (int i = 0; i < size2; ++i)
|
||||
failed = (buffer [start2 + i] != n++) || failed;
|
||||
|
||||
if (failed)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
fifo.finishedRead (size1 + size2);
|
||||
}
|
||||
|
||||
expect (! failed, "read values were incorrect");
|
||||
}
|
||||
};
|
||||
|
||||
static AbstractFifoTests abstractFifoTests;
|
||||
@@ -1,212 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.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_ABSTRACTFIFO_H_INCLUDED
|
||||
#define BEAST_ABSTRACTFIFO_H_INCLUDED
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Encapsulates the logic required to implement a lock-free FIFO.
|
||||
|
||||
This class handles the logic needed when building a single-reader,
|
||||
single-writer FIFO.
|
||||
|
||||
It doesn't actually hold any data itself, but your FIFO class can use one of
|
||||
these to manage its position and status when reading or writing to it.
|
||||
|
||||
To use it, you can call prepareToWrite() to determine the position within
|
||||
your own buffer that an incoming block of data should be stored, and
|
||||
prepareToRead() to find out when the next outgoing block should be read from.
|
||||
|
||||
e.g.
|
||||
@code
|
||||
class MyFifo
|
||||
{
|
||||
public:
|
||||
MyFifo() : abstractFifo (1024)
|
||||
{
|
||||
}
|
||||
|
||||
void addToFifo (const int* someData, int numItems)
|
||||
{
|
||||
int start1, size1, start2, size2;
|
||||
abstractFifo.prepareToWrite (numItems, start1, size1, start2, size2);
|
||||
|
||||
if (size1 > 0)
|
||||
copySomeData (myBuffer + start1, someData, size1);
|
||||
|
||||
if (size2 > 0)
|
||||
copySomeData (myBuffer + start2, someData + size1, size2);
|
||||
|
||||
abstractFifo.finishedWrite (size1 + size2);
|
||||
}
|
||||
|
||||
void readFromFifo (int* someData, int numItems)
|
||||
{
|
||||
int start1, size1, start2, size2;
|
||||
abstractFifo.prepareToRead (numSamples, start1, size1, start2, size2);
|
||||
|
||||
if (size1 > 0)
|
||||
copySomeData (someData, myBuffer + start1, size1);
|
||||
|
||||
if (size2 > 0)
|
||||
copySomeData (someData + size1, myBuffer + start2, size2);
|
||||
|
||||
abstractFifo.finishedRead (size1 + size2);
|
||||
}
|
||||
|
||||
private:
|
||||
AbstractFifo abstractFifo;
|
||||
int myBuffer [1024];
|
||||
};
|
||||
@endcode
|
||||
*/
|
||||
class BEAST_API AbstractFifo : LeakChecked <AbstractFifo>, public Uncopyable
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates a FIFO to manage a buffer with the specified capacity. */
|
||||
AbstractFifo (int capacity) noexcept;
|
||||
|
||||
/** Destructor */
|
||||
~AbstractFifo();
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the total size of the buffer being managed. */
|
||||
int getTotalSize() const noexcept;
|
||||
|
||||
/** Returns the number of items that can currently be added to the buffer without it overflowing. */
|
||||
int getFreeSpace() const noexcept;
|
||||
|
||||
/** Returns the number of items that can currently be read from the buffer. */
|
||||
int getNumReady() const noexcept;
|
||||
|
||||
/** Clears the buffer positions, so that it appears empty. */
|
||||
void reset() noexcept;
|
||||
|
||||
/** Changes the buffer's total size.
|
||||
Note that this isn't thread-safe, so don't call it if there's any danger that it
|
||||
might overlap with a call to any other method in this class!
|
||||
*/
|
||||
void setTotalSize (int newSize) noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the location within the buffer at which an incoming block of data should be written.
|
||||
|
||||
Because the section of data that you want to add to the buffer may overlap the end
|
||||
and wrap around to the start, two blocks within your buffer are returned, and you
|
||||
should copy your data into the first one, with any remaining data spilling over into
|
||||
the second.
|
||||
|
||||
If the number of items you ask for is too large to fit within the buffer's free space, then
|
||||
blockSize1 + blockSize2 may add up to a lower value than numToWrite. If this happens, you
|
||||
may decide to keep waiting and re-trying the method until there's enough space available.
|
||||
|
||||
After calling this method, if you choose to write your data into the blocks returned, you
|
||||
must call finishedWrite() to tell the FIFO how much data you actually added.
|
||||
|
||||
e.g.
|
||||
@code
|
||||
void addToFifo (const int* someData, int numItems)
|
||||
{
|
||||
int start1, size1, start2, size2;
|
||||
prepareToWrite (numItems, start1, size1, start2, size2);
|
||||
|
||||
if (size1 > 0)
|
||||
copySomeData (myBuffer + start1, someData, size1);
|
||||
|
||||
if (size2 > 0)
|
||||
copySomeData (myBuffer + start2, someData + size1, size2);
|
||||
|
||||
finishedWrite (size1 + size2);
|
||||
}
|
||||
@endcode
|
||||
|
||||
@param numToWrite indicates how many items you'd like to add to the buffer
|
||||
@param startIndex1 on exit, this will contain the start index in your buffer at which your data should be written
|
||||
@param blockSize1 on exit, this indicates how many items can be written to the block starting at startIndex1
|
||||
@param startIndex2 on exit, this will contain the start index in your buffer at which any data that didn't fit into
|
||||
the first block should be written
|
||||
@param blockSize2 on exit, this indicates how many items can be written to the block starting at startIndex2
|
||||
@see finishedWrite
|
||||
*/
|
||||
void prepareToWrite (int numToWrite, int& startIndex1, int& blockSize1, int& startIndex2, int& blockSize2) const noexcept;
|
||||
|
||||
/** Called after writing from the FIFO, to indicate that this many items have been added.
|
||||
@see prepareToWrite
|
||||
*/
|
||||
void finishedWrite (int numWritten) noexcept;
|
||||
|
||||
/** Returns the location within the buffer from which the next block of data should be read.
|
||||
|
||||
Because the section of data that you want to read from the buffer may overlap the end
|
||||
and wrap around to the start, two blocks within your buffer are returned, and you
|
||||
should read from both of them.
|
||||
|
||||
If the number of items you ask for is greater than the amount of data available, then
|
||||
blockSize1 + blockSize2 may add up to a lower value than numWanted. If this happens, you
|
||||
may decide to keep waiting and re-trying the method until there's enough data available.
|
||||
|
||||
After calling this method, if you choose to read the data, you must call finishedRead() to
|
||||
tell the FIFO how much data you have consumed.
|
||||
|
||||
e.g.
|
||||
@code
|
||||
void readFromFifo (int* someData, int numItems)
|
||||
{
|
||||
int start1, size1, start2, size2;
|
||||
prepareToRead (numSamples, start1, size1, start2, size2);
|
||||
|
||||
if (size1 > 0)
|
||||
copySomeData (someData, myBuffer + start1, size1);
|
||||
|
||||
if (size2 > 0)
|
||||
copySomeData (someData + size1, myBuffer + start2, size2);
|
||||
|
||||
finishedRead (size1 + size2);
|
||||
}
|
||||
@endcode
|
||||
|
||||
@param numWanted indicates how many items you'd like to add to the buffer
|
||||
@param startIndex1 on exit, this will contain the start index in your buffer at which your data should be written
|
||||
@param blockSize1 on exit, this indicates how many items can be written to the block starting at startIndex1
|
||||
@param startIndex2 on exit, this will contain the start index in your buffer at which any data that didn't fit into
|
||||
the first block should be written
|
||||
@param blockSize2 on exit, this indicates how many items can be written to the block starting at startIndex2
|
||||
@see finishedRead
|
||||
*/
|
||||
void prepareToRead (int numWanted, int& startIndex1, int& blockSize1, int& startIndex2, int& blockSize2) const noexcept;
|
||||
|
||||
/** Called after reading from the FIFO, to indicate that this many items have now been consumed.
|
||||
@see prepareToRead
|
||||
*/
|
||||
void finishedRead (int numRead) noexcept;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
int bufferSize;
|
||||
Atomic <int> validStart, validEnd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,856 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.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_SHAREDOBJECTARRAY_H_INCLUDED
|
||||
#define BEAST_SHAREDOBJECTARRAY_H_INCLUDED
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Holds a list of objects derived from SharedObject.
|
||||
|
||||
A SharedObjectArray holds objects derived from SharedObject,
|
||||
and takes care of incrementing and decrementing their ref counts when they
|
||||
are added and removed from the array.
|
||||
|
||||
To make all the array's methods thread-safe, pass in "CriticalSection" as the templated
|
||||
TypeOfCriticalSectionToUse parameter, instead of the default DummyCriticalSection.
|
||||
|
||||
@see Array, OwnedArray, StringArray
|
||||
*/
|
||||
template <class ObjectClass, class TypeOfCriticalSectionToUse = DummyCriticalSection>
|
||||
class SharedObjectArray
|
||||
{
|
||||
public:
|
||||
typedef SharedPtr<ObjectClass> ObjectClassPtr;
|
||||
|
||||
//==============================================================================
|
||||
/** Creates an empty array.
|
||||
@see SharedObject, Array, OwnedArray
|
||||
*/
|
||||
SharedObjectArray() noexcept
|
||||
: numUsed (0)
|
||||
{
|
||||
}
|
||||
|
||||
/** Creates a copy of another array */
|
||||
SharedObjectArray (const SharedObjectArray& other) noexcept
|
||||
{
|
||||
const ScopedLockType lock (other.getLock());
|
||||
numUsed = other.size();
|
||||
data.setAllocatedSize (numUsed);
|
||||
memcpy (data.elements, other.getRawDataPointer(), numUsed * sizeof (ObjectClass*));
|
||||
|
||||
for (int i = numUsed; --i >= 0;)
|
||||
if (ObjectClass* o = data.elements[i])
|
||||
o->incReferenceCount();
|
||||
}
|
||||
|
||||
/** Creates a copy of another array */
|
||||
template <class OtherObjectClass, class OtherCriticalSection>
|
||||
SharedObjectArray (const SharedObjectArray<OtherObjectClass, OtherCriticalSection>& other) noexcept
|
||||
{
|
||||
const typename SharedObjectArray<OtherObjectClass, OtherCriticalSection>::ScopedLockType lock (other.getLock());
|
||||
numUsed = other.size();
|
||||
data.setAllocatedSize (numUsed);
|
||||
memcpy (data.elements, other.getRawDataPointer(), numUsed * sizeof (ObjectClass*));
|
||||
|
||||
for (int i = numUsed; --i >= 0;)
|
||||
if (ObjectClass* o = data.elements[i])
|
||||
o->incReferenceCount();
|
||||
}
|
||||
|
||||
/** Copies another array into this one.
|
||||
Any existing objects in this array will first be released.
|
||||
*/
|
||||
SharedObjectArray& operator= (const SharedObjectArray& other) noexcept
|
||||
{
|
||||
SharedObjectArray otherCopy (other);
|
||||
swapWith (otherCopy);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** Copies another array into this one.
|
||||
Any existing objects in this array will first be released.
|
||||
*/
|
||||
template <class OtherObjectClass>
|
||||
SharedObjectArray<ObjectClass, TypeOfCriticalSectionToUse>& operator= (const SharedObjectArray<OtherObjectClass, TypeOfCriticalSectionToUse>& other) noexcept
|
||||
{
|
||||
SharedObjectArray<ObjectClass, TypeOfCriticalSectionToUse> otherCopy (other);
|
||||
swapWith (otherCopy);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** Destructor.
|
||||
Any objects in the array will be released, and may be deleted if not referenced from elsewhere.
|
||||
*/
|
||||
~SharedObjectArray()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Removes all objects from the array.
|
||||
|
||||
Any objects in the array that are not referenced from elsewhere will be deleted.
|
||||
*/
|
||||
void clear()
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
while (numUsed > 0)
|
||||
if (ObjectClass* o = data.elements [--numUsed])
|
||||
o->decReferenceCount();
|
||||
|
||||
bassert (numUsed == 0);
|
||||
data.setAllocatedSize (0);
|
||||
}
|
||||
|
||||
/** Returns the current number of objects in the array. */
|
||||
inline int size() const noexcept
|
||||
{
|
||||
return numUsed;
|
||||
}
|
||||
|
||||
/** Returns a pointer to the object at this index in the array.
|
||||
|
||||
If the index is out-of-range, this will return a null pointer, (and
|
||||
it could be null anyway, because it's ok for the array to hold null
|
||||
pointers as well as objects).
|
||||
|
||||
@see getUnchecked
|
||||
*/
|
||||
inline ObjectClassPtr operator[] (const int index) const noexcept
|
||||
{
|
||||
return getObjectPointer (index);
|
||||
}
|
||||
|
||||
/** Returns a pointer to the object at this index in the array, without checking
|
||||
whether the index is in-range.
|
||||
|
||||
This is a faster and less safe version of operator[] which doesn't check the index passed in, so
|
||||
it can be used when you're sure the index is always going to be legal.
|
||||
*/
|
||||
inline ObjectClassPtr getUnchecked (const int index) const noexcept
|
||||
{
|
||||
return getObjectPointerUnchecked (index);
|
||||
}
|
||||
|
||||
/** Returns a raw pointer to the object at this index in the array.
|
||||
|
||||
If the index is out-of-range, this will return a null pointer, (and
|
||||
it could be null anyway, because it's ok for the array to hold null
|
||||
pointers as well as objects).
|
||||
|
||||
@see getUnchecked
|
||||
*/
|
||||
inline ObjectClass* getObjectPointer (const int index) const noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
return isPositiveAndBelow (index, numUsed) ? data.elements [index]
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
/** Returns a raw pointer to the object at this index in the array, without checking
|
||||
whether the index is in-range.
|
||||
*/
|
||||
inline ObjectClass* getObjectPointerUnchecked (const int index) const noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
bassert (isPositiveAndBelow (index, numUsed));
|
||||
return data.elements [index];
|
||||
}
|
||||
|
||||
/** Returns a pointer to the first object in the array.
|
||||
|
||||
This will return a null pointer if the array's empty.
|
||||
@see getLast
|
||||
*/
|
||||
inline ObjectClassPtr getFirst() const noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
return numUsed > 0 ? data.elements [0]
|
||||
: static_cast <ObjectClass*> (nullptr);
|
||||
}
|
||||
|
||||
/** Returns a pointer to the last object in the array.
|
||||
|
||||
This will return a null pointer if the array's empty.
|
||||
@see getFirst
|
||||
*/
|
||||
inline ObjectClassPtr getLast() const noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
return numUsed > 0 ? data.elements [numUsed - 1]
|
||||
: static_cast <ObjectClass*> (nullptr);
|
||||
}
|
||||
|
||||
/** Returns a pointer to the actual array data.
|
||||
This pointer will only be valid until the next time a non-const method
|
||||
is called on the array.
|
||||
*/
|
||||
inline ObjectClass** getRawDataPointer() const noexcept
|
||||
{
|
||||
return data.elements;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Returns a pointer to the first element in the array.
|
||||
This method is provided for compatibility with standard C++ iteration mechanisms.
|
||||
*/
|
||||
inline ObjectClass** begin() const noexcept
|
||||
{
|
||||
return data.elements;
|
||||
}
|
||||
|
||||
/** Returns a pointer to the element which follows the last element in the array.
|
||||
This method is provided for compatibility with standard C++ iteration mechanisms.
|
||||
*/
|
||||
inline ObjectClass** end() const noexcept
|
||||
{
|
||||
return data.elements + numUsed;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Finds the index of the first occurrence of an object in the array.
|
||||
|
||||
@param objectToLookFor the object to look for
|
||||
@returns the index at which the object was found, or -1 if it's not found
|
||||
*/
|
||||
int indexOf (const ObjectClass* const objectToLookFor) const noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
ObjectClass** e = data.elements.getData();
|
||||
ObjectClass** const endPointer = e + numUsed;
|
||||
|
||||
while (e != endPointer)
|
||||
{
|
||||
if (objectToLookFor == *e)
|
||||
return static_cast <int> (e - data.elements.getData());
|
||||
|
||||
++e;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/** Returns true if the array contains a specified object.
|
||||
|
||||
@param objectToLookFor the object to look for
|
||||
@returns true if the object is in the array
|
||||
*/
|
||||
bool contains (const ObjectClass* const objectToLookFor) const noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
ObjectClass** e = data.elements.getData();
|
||||
ObjectClass** const endPointer = e + numUsed;
|
||||
|
||||
while (e != endPointer)
|
||||
{
|
||||
if (objectToLookFor == *e)
|
||||
return true;
|
||||
|
||||
++e;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Appends a new object to the end of the array.
|
||||
|
||||
This will increase the new object's reference count.
|
||||
|
||||
@param newObject the new object to add to the array
|
||||
@see set, insert, addIfNotAlreadyThere, addSorted, addArray
|
||||
*/
|
||||
ObjectClass* add (ObjectClass* const newObject) noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
data.ensureAllocatedSize (numUsed + 1);
|
||||
bassert (data.elements != nullptr);
|
||||
data.elements [numUsed++] = newObject;
|
||||
|
||||
if (newObject != nullptr)
|
||||
newObject->incReferenceCount();
|
||||
|
||||
return newObject;
|
||||
}
|
||||
|
||||
/** Inserts a new object into the array at the given index.
|
||||
|
||||
If the index is less than 0 or greater than the size of the array, the
|
||||
element will be added to the end of the array.
|
||||
Otherwise, it will be inserted into the array, moving all the later elements
|
||||
along to make room.
|
||||
|
||||
This will increase the new object's reference count.
|
||||
|
||||
@param indexToInsertAt the index at which the new element should be inserted
|
||||
@param newObject the new object to add to the array
|
||||
@see add, addSorted, addIfNotAlreadyThere, set
|
||||
*/
|
||||
ObjectClass* insert (int indexToInsertAt,
|
||||
ObjectClass* const newObject) noexcept
|
||||
{
|
||||
if (indexToInsertAt >= 0)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (indexToInsertAt > numUsed)
|
||||
indexToInsertAt = numUsed;
|
||||
|
||||
data.ensureAllocatedSize (numUsed + 1);
|
||||
bassert (data.elements != nullptr);
|
||||
|
||||
ObjectClass** const e = data.elements + indexToInsertAt;
|
||||
const int numToMove = numUsed - indexToInsertAt;
|
||||
|
||||
if (numToMove > 0)
|
||||
memmove (e + 1, e, sizeof (ObjectClass*) * (size_t) numToMove);
|
||||
|
||||
*e = newObject;
|
||||
|
||||
if (newObject != nullptr)
|
||||
newObject->incReferenceCount();
|
||||
|
||||
++numUsed;
|
||||
|
||||
return newObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
return add (newObject);
|
||||
}
|
||||
}
|
||||
|
||||
/** Appends a new object at the end of the array as long as the array doesn't
|
||||
already contain it.
|
||||
|
||||
If the array already contains a matching object, nothing will be done.
|
||||
|
||||
@param newObject the new object to add to the array
|
||||
*/
|
||||
void addIfNotAlreadyThere (ObjectClass* const newObject) noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
if (! contains (newObject))
|
||||
add (newObject);
|
||||
}
|
||||
|
||||
/** Replaces an object in the array with a different one.
|
||||
|
||||
If the index is less than zero, this method does nothing.
|
||||
If the index is beyond the end of the array, the new object is added to the end of the array.
|
||||
|
||||
The object being added has its reference count increased, and if it's replacing
|
||||
another object, then that one has its reference count decreased, and may be deleted.
|
||||
|
||||
@param indexToChange the index whose value you want to change
|
||||
@param newObject the new value to set for this index.
|
||||
@see add, insert, remove
|
||||
*/
|
||||
void set (const int indexToChange,
|
||||
ObjectClass* const newObject)
|
||||
{
|
||||
if (indexToChange >= 0)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (newObject != nullptr)
|
||||
newObject->incReferenceCount();
|
||||
|
||||
if (indexToChange < numUsed)
|
||||
{
|
||||
if (ObjectClass* o = data.elements [indexToChange])
|
||||
o->decReferenceCount();
|
||||
|
||||
data.elements [indexToChange] = newObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
data.ensureAllocatedSize (numUsed + 1);
|
||||
bassert (data.elements != nullptr);
|
||||
data.elements [numUsed++] = newObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Adds elements from another array to the end of this array.
|
||||
|
||||
@param arrayToAddFrom the array from which to copy the elements
|
||||
@param startIndex the first element of the other array to start copying from
|
||||
@param numElementsToAdd how many elements to add from the other array. If this
|
||||
value is negative or greater than the number of available elements,
|
||||
all available elements will be copied.
|
||||
@see add
|
||||
*/
|
||||
void addArray (const SharedObjectArray<ObjectClass, TypeOfCriticalSectionToUse>& arrayToAddFrom,
|
||||
int startIndex = 0,
|
||||
int numElementsToAdd = -1) noexcept
|
||||
{
|
||||
const ScopedLockType lock1 (arrayToAddFrom.getLock());
|
||||
|
||||
{
|
||||
const ScopedLockType lock2 (getLock());
|
||||
|
||||
if (startIndex < 0)
|
||||
{
|
||||
bassertfalse;
|
||||
startIndex = 0;
|
||||
}
|
||||
|
||||
if (numElementsToAdd < 0 || startIndex + numElementsToAdd > arrayToAddFrom.size())
|
||||
numElementsToAdd = arrayToAddFrom.size() - startIndex;
|
||||
|
||||
if (numElementsToAdd > 0)
|
||||
{
|
||||
data.ensureAllocatedSize (numUsed + numElementsToAdd);
|
||||
|
||||
while (--numElementsToAdd >= 0)
|
||||
add (arrayToAddFrom.getUnchecked (startIndex++));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Inserts a new object into the array assuming that the array is sorted.
|
||||
|
||||
This will use a comparator to find the position at which the new object
|
||||
should go. If the array isn't sorted, the behaviour of this
|
||||
method will be unpredictable.
|
||||
|
||||
@param comparator the comparator object to use to compare the elements - see the
|
||||
sort() method for details about this object's form
|
||||
@param newObject the new object to insert to the array
|
||||
@returns the index at which the new object was added
|
||||
@see add, sort
|
||||
*/
|
||||
template <class ElementComparator>
|
||||
int addSorted (ElementComparator& comparator, ObjectClass* newObject) noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
const int index = findInsertIndexInSortedArray (comparator, data.elements.getData(), newObject, 0, numUsed);
|
||||
insert (index, newObject);
|
||||
return index;
|
||||
}
|
||||
|
||||
/** Inserts or replaces an object in the array, assuming it is sorted.
|
||||
|
||||
This is similar to addSorted, but if a matching element already exists, then it will be
|
||||
replaced by the new one, rather than the new one being added as well.
|
||||
*/
|
||||
template <class ElementComparator>
|
||||
void addOrReplaceSorted (ElementComparator& comparator,
|
||||
ObjectClass* newObject) noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
const int index = findInsertIndexInSortedArray (comparator, data.elements.getData(), newObject, 0, numUsed);
|
||||
|
||||
if (index > 0 && comparator.compareElements (newObject, data.elements [index - 1]) == 0)
|
||||
set (index - 1, newObject); // replace an existing object that matches
|
||||
else
|
||||
insert (index, newObject); // no match, so insert the new one
|
||||
}
|
||||
|
||||
/** Finds the index of an object in the array, assuming that the array is sorted.
|
||||
|
||||
This will use a comparator to do a binary-chop to find the index of the given
|
||||
element, if it exists. If the array isn't sorted, the behaviour of this
|
||||
method will be unpredictable.
|
||||
|
||||
@param comparator the comparator to use to compare the elements - see the sort()
|
||||
method for details about the form this object should take
|
||||
@param objectToLookFor the object to search for
|
||||
@returns the index of the element, or -1 if it's not found
|
||||
@see addSorted, sort
|
||||
*/
|
||||
template <class ElementComparator>
|
||||
int indexOfSorted (ElementComparator& comparator,
|
||||
const ObjectClass* const objectToLookFor) const noexcept
|
||||
{
|
||||
(void) comparator;
|
||||
const ScopedLockType lock (getLock());
|
||||
int s = 0, e = numUsed;
|
||||
|
||||
while (s < e)
|
||||
{
|
||||
if (comparator.compareElements (objectToLookFor, data.elements [s]) == 0)
|
||||
return s;
|
||||
|
||||
const int halfway = (s + e) / 2;
|
||||
if (halfway == s)
|
||||
break;
|
||||
|
||||
if (comparator.compareElements (objectToLookFor, data.elements [halfway]) >= 0)
|
||||
s = halfway;
|
||||
else
|
||||
e = halfway;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Removes an object from the array.
|
||||
|
||||
This will remove the object at a given index and move back all the
|
||||
subsequent objects to close the gap.
|
||||
|
||||
If the index passed in is out-of-range, nothing will happen.
|
||||
|
||||
The object that is removed will have its reference count decreased,
|
||||
and may be deleted if not referenced from elsewhere.
|
||||
|
||||
@param indexToRemove the index of the element to remove
|
||||
@see removeObject, removeRange
|
||||
*/
|
||||
void remove (const int indexToRemove)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (isPositiveAndBelow (indexToRemove, numUsed))
|
||||
{
|
||||
ObjectClass** const e = data.elements + indexToRemove;
|
||||
|
||||
if (ObjectClass* o = *e)
|
||||
o->decReferenceCount();
|
||||
|
||||
--numUsed;
|
||||
const int numberToShift = numUsed - indexToRemove;
|
||||
|
||||
if (numberToShift > 0)
|
||||
memmove (e, e + 1, sizeof (ObjectClass*) * (size_t) numberToShift);
|
||||
|
||||
if ((numUsed << 1) < data.numAllocated)
|
||||
minimiseStorageOverheads();
|
||||
}
|
||||
}
|
||||
|
||||
/** Removes and returns an object from the array.
|
||||
|
||||
This will remove the object at a given index and return it, moving back all
|
||||
the subsequent objects to close the gap. If the index passed in is out-of-range,
|
||||
nothing will happen and a null pointer will be returned.
|
||||
|
||||
@param indexToRemove the index of the element to remove
|
||||
@see remove, removeObject, removeRange
|
||||
*/
|
||||
ObjectClassPtr removeAndReturn (const int indexToRemove)
|
||||
{
|
||||
ObjectClassPtr removedItem;
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (isPositiveAndBelow (indexToRemove, numUsed))
|
||||
{
|
||||
ObjectClass** const e = data.elements + indexToRemove;
|
||||
|
||||
if (ObjectClass* o = *e)
|
||||
{
|
||||
removedItem = o;
|
||||
o->decReferenceCount();
|
||||
}
|
||||
|
||||
--numUsed;
|
||||
const int numberToShift = numUsed - indexToRemove;
|
||||
|
||||
if (numberToShift > 0)
|
||||
memmove (e, e + 1, sizeof (ObjectClass*) * (size_t) numberToShift);
|
||||
|
||||
if ((numUsed << 1) < data.numAllocated)
|
||||
minimiseStorageOverheads();
|
||||
}
|
||||
|
||||
return removedItem;
|
||||
}
|
||||
|
||||
/** Removes the first occurrence of a specified object from the array.
|
||||
|
||||
If the item isn't found, no action is taken. If it is found, it is
|
||||
removed and has its reference count decreased.
|
||||
|
||||
@param objectToRemove the object to try to remove
|
||||
@see remove, removeRange
|
||||
*/
|
||||
void removeObject (ObjectClass* const objectToRemove)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
remove (indexOf (objectToRemove));
|
||||
}
|
||||
|
||||
/** Removes a range of objects from the array.
|
||||
|
||||
This will remove a set of objects, starting from the given index,
|
||||
and move any subsequent elements down to close the gap.
|
||||
|
||||
If the range extends beyond the bounds of the array, it will
|
||||
be safely clipped to the size of the array.
|
||||
|
||||
The objects that are removed will have their reference counts decreased,
|
||||
and may be deleted if not referenced from elsewhere.
|
||||
|
||||
@param startIndex the index of the first object to remove
|
||||
@param numberToRemove how many objects should be removed
|
||||
@see remove, removeObject
|
||||
*/
|
||||
void removeRange (const int startIndex,
|
||||
const int numberToRemove)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
const int start = blimit (0, numUsed, startIndex);
|
||||
const int endIndex = blimit (0, numUsed, startIndex + numberToRemove);
|
||||
|
||||
if (endIndex > start)
|
||||
{
|
||||
int i;
|
||||
for (i = start; i < endIndex; ++i)
|
||||
{
|
||||
if (ObjectClass* o = data.elements[i])
|
||||
{
|
||||
o->decReferenceCount();
|
||||
data.elements[i] = nullptr; // (in case one of the destructors accesses this array and hits a dangling pointer)
|
||||
}
|
||||
}
|
||||
|
||||
const int rangeSize = endIndex - start;
|
||||
ObjectClass** e = data.elements + start;
|
||||
i = numUsed - endIndex;
|
||||
numUsed -= rangeSize;
|
||||
|
||||
while (--i >= 0)
|
||||
{
|
||||
*e = e [rangeSize];
|
||||
++e;
|
||||
}
|
||||
|
||||
if ((numUsed << 1) < data.numAllocated)
|
||||
minimiseStorageOverheads();
|
||||
}
|
||||
}
|
||||
|
||||
/** Removes the last n objects from the array.
|
||||
|
||||
The objects that are removed will have their reference counts decreased,
|
||||
and may be deleted if not referenced from elsewhere.
|
||||
|
||||
@param howManyToRemove how many objects to remove from the end of the array
|
||||
@see remove, removeObject, removeRange
|
||||
*/
|
||||
void removeLast (int howManyToRemove = 1)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (howManyToRemove > numUsed)
|
||||
howManyToRemove = numUsed;
|
||||
|
||||
while (--howManyToRemove >= 0)
|
||||
remove (numUsed - 1);
|
||||
}
|
||||
|
||||
/** Swaps a pair of objects in the array.
|
||||
|
||||
If either of the indexes passed in is out-of-range, nothing will happen,
|
||||
otherwise the two objects at these positions will be exchanged.
|
||||
*/
|
||||
void swap (const int index1,
|
||||
const int index2) noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (isPositiveAndBelow (index1, numUsed)
|
||||
&& isPositiveAndBelow (index2, numUsed))
|
||||
{
|
||||
std::swap (data.elements [index1],
|
||||
data.elements [index2]);
|
||||
}
|
||||
}
|
||||
|
||||
/** Moves one of the objects to a different position.
|
||||
|
||||
This will move the object to a specified index, shuffling along
|
||||
any intervening elements as required.
|
||||
|
||||
So for example, if you have the array { 0, 1, 2, 3, 4, 5 } then calling
|
||||
move (2, 4) would result in { 0, 1, 3, 4, 2, 5 }.
|
||||
|
||||
@param currentIndex the index of the object to be moved. If this isn't a
|
||||
valid index, then nothing will be done
|
||||
@param newIndex the index at which you'd like this object to end up. If this
|
||||
is less than zero, it will be moved to the end of the array
|
||||
*/
|
||||
void move (const int currentIndex,
|
||||
int newIndex) noexcept
|
||||
{
|
||||
if (currentIndex != newIndex)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
|
||||
if (isPositiveAndBelow (currentIndex, numUsed))
|
||||
{
|
||||
if (! isPositiveAndBelow (newIndex, numUsed))
|
||||
newIndex = numUsed - 1;
|
||||
|
||||
ObjectClass* const value = data.elements [currentIndex];
|
||||
|
||||
if (newIndex > currentIndex)
|
||||
{
|
||||
memmove (data.elements + currentIndex,
|
||||
data.elements + currentIndex + 1,
|
||||
sizeof (ObjectClass*) * (size_t) (newIndex - currentIndex));
|
||||
}
|
||||
else
|
||||
{
|
||||
memmove (data.elements + newIndex + 1,
|
||||
data.elements + newIndex,
|
||||
sizeof (ObjectClass*) * (size_t) (currentIndex - newIndex));
|
||||
}
|
||||
|
||||
data.elements [newIndex] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** This swaps the contents of this array with those of another array.
|
||||
|
||||
If you need to exchange two arrays, this is vastly quicker than using copy-by-value
|
||||
because it just swaps their internal pointers.
|
||||
*/
|
||||
template <class OtherArrayType>
|
||||
void swapWith (OtherArrayType& otherArray) noexcept
|
||||
{
|
||||
const ScopedLockType lock1 (getLock());
|
||||
const typename OtherArrayType::ScopedLockType lock2 (otherArray.getLock());
|
||||
|
||||
data.swapWith (otherArray.data);
|
||||
std::swap (numUsed, otherArray.numUsed);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Compares this array to another one.
|
||||
|
||||
@returns true only if the other array contains the same objects in the same order
|
||||
*/
|
||||
bool operator== (const SharedObjectArray& other) const noexcept
|
||||
{
|
||||
const ScopedLockType lock2 (other.getLock());
|
||||
const ScopedLockType lock1 (getLock());
|
||||
|
||||
if (numUsed != other.numUsed)
|
||||
return false;
|
||||
|
||||
for (int i = numUsed; --i >= 0;)
|
||||
if (data.elements [i] != other.data.elements [i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Compares this array to another one.
|
||||
|
||||
@see operator==
|
||||
*/
|
||||
bool operator!= (const SharedObjectArray<ObjectClass, TypeOfCriticalSectionToUse>& other) const noexcept
|
||||
{
|
||||
return ! operator== (other);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Sorts the elements in the array.
|
||||
|
||||
This will use a comparator object to sort the elements into order. The object
|
||||
passed must have a method of the form:
|
||||
@code
|
||||
int compareElements (ElementType first, ElementType second);
|
||||
@endcode
|
||||
|
||||
..and this method must return:
|
||||
- a value of < 0 if the first comes before the second
|
||||
- a value of 0 if the two objects are equivalent
|
||||
- a value of > 0 if the second comes before the first
|
||||
|
||||
To improve performance, the compareElements() method can be declared as static or const.
|
||||
|
||||
@param comparator the comparator to use for comparing elements.
|
||||
@param retainOrderOfEquivalentItems if this is true, then items
|
||||
which the comparator says are equivalent will be
|
||||
kept in the order in which they currently appear
|
||||
in the array. This is slower to perform, but may
|
||||
be important in some cases. If it's false, a faster
|
||||
algorithm is used, but equivalent elements may be
|
||||
rearranged.
|
||||
|
||||
@see sortArray
|
||||
*/
|
||||
template <class ElementComparator>
|
||||
void sort (ElementComparator& comparator,
|
||||
const bool retainOrderOfEquivalentItems = false) const noexcept
|
||||
{
|
||||
(void) comparator; // if you pass in an object with a static compareElements() method, this
|
||||
// avoids getting warning messages about the parameter being unused
|
||||
|
||||
const ScopedLockType lock (getLock());
|
||||
sortArray (comparator, data.elements.getData(), 0, size() - 1, retainOrderOfEquivalentItems);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Reduces the amount of storage being used by the array.
|
||||
|
||||
Arrays typically allocate slightly more storage than they need, and after
|
||||
removing elements, they may have quite a lot of unused space allocated.
|
||||
This method will reduce the amount of allocated storage to a minimum.
|
||||
*/
|
||||
void minimiseStorageOverheads() noexcept
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
data.shrinkToNoMoreThan (numUsed);
|
||||
}
|
||||
|
||||
/** Increases the array's internal storage to hold a minimum number of elements.
|
||||
|
||||
Calling this before adding a large known number of elements means that
|
||||
the array won't have to keep dynamically resizing itself as the elements
|
||||
are added, and it'll therefore be more efficient.
|
||||
*/
|
||||
void ensureStorageAllocated (const int minNumElements)
|
||||
{
|
||||
const ScopedLockType lock (getLock());
|
||||
data.ensureAllocatedSize (minNumElements);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the CriticalSection that locks this array.
|
||||
To lock, you can call getLock().enter() and getLock().exit(), or preferably use
|
||||
an object of ScopedLockType as an RAII lock for it.
|
||||
*/
|
||||
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return data; }
|
||||
|
||||
/** Returns the type of scoped lock to use for locking this array */
|
||||
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse> data;
|
||||
int numUsed;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user