Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .clang-uml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
compilation_database_dir: ./build
output_directory: ./docs/diagrams
diagrams:
boost_asio:
type: class
generate_method_arguments: none
include_relations_also_as_members: false
glob:
- example/cpp11/http/server/server.cpp
using_namespace:
- boost::asio
include:
namespaces:
- boost::asio
exclude:
namespaces:
- http::server
- std
- boost::asio::detail
- boost::asio::buffer_literals::detail
- boost::asio::execution::detail
- boost::asio::experimental::detail
- boost::asio::impl
- boost::asio::executor::impl
- boost::asio::ip::detail
- boost::asio::posix
- boost::asio::traits
- boost::beast
- boost::redis
elements:
- boost::asio::associator
- boost::asio::async_result
- boost::asio::deferred_init_tag
- boost::asio::is_deferred
- boost::asio::traits::static_query
- boost::asio::is_applicable_property

# Excluding these specializations unfortunately results in a crash of clang-uml
# specializations:
# - boost::asio::associator<T1>
# - boost::asio::associator<T1,T2>
# - boost::asio::asyncresult<T1>
# - boost::asio::asyncresult<T1,T2>
# - boost::asio::is_deferred<T1>
# - boost::asio::is_deferred<T1,T2>
access:
- private
plantuml:
before:
- 'title Class Diagram for boost asio'

19 changes: 19 additions & 0 deletions create_class_diagram.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Expects the BOOST_ROOT environment variable to be set.

# Get and build clang-uml: https://github.com/bkryza/clang-uml
# Expects the CLANG_UML environment variable to be set, containing the path to the clang-uml executable

# Example:
# BOOST_ROOT=~/projects/boost CLANG_UML=~/projects/clang-uml/build/clang-uml ./create_class_diagram.sh

mkdir -p example/cpp11/http/server/build
pushd example/cpp11/http/server/build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1
make -j4
popd

${CLANG_UML} -c .clang-uml -d example/cpp11/http/server/build/compile_commands.json -o ./doc

# Install plantuml & use it to convert to image format
# sudo apt install plantuml
plantuml ./doc/boost_asio.puml -tsvg
Loading