Commit 2e212dd9 authored by Dominik Charousset's avatar Dominik Charousset

Remove doc target from CMake, fix Doxygen warnings

Our CMake setup should care about building the framework, as opposed to
building documentation that we provide online. Similar to the manual,
users that really want to build the API documentation locally can simply
run the Doxygen command.
parent 81a31dcd
......@@ -631,12 +631,6 @@ endif()
message(STATUS "Set release version for all documentation to ${CAF_RELEASE}.")
# -- Setup for building manual and API documentation ---------------------------
if(NOT WIN32)
add_subdirectory(doc)
endif()
################################################################################
# Add additional project files to GUI #
################################################################################
......
......@@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = CAF
PROJECT_NAME = "C++ Actor Framework"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = @CAF_VERSION@
PROJECT_NUMBER = 0.18
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
......@@ -819,8 +819,8 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = "@CMAKE_HOME_DIRECTORY@/libcaf_core/caf" \
"@CMAKE_HOME_DIRECTORY@/libcaf_io/caf"
INPUT = "libcaf_core/caf" \
"libcaf_io/caf"
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......@@ -893,7 +893,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
EXAMPLE_PATH = "@CMAKE_HOME_DIRECTORY@/examples"
EXAMPLE_PATH = "examples"
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
......@@ -913,7 +913,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
IMAGE_PATH = "@CMAKE_HOME_DIRECTORY@/doc/png/"
IMAGE_PATH = "doc/png/"
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
......@@ -2107,7 +2107,9 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = CAF_DOCUMENTATION
PREDEFINED = CAF_DOCUMENTATION, \
CAF_CORE_EXPORT=, \
CAF_IO_EXPORT=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
......
\newcommand{\cafrelease}{@CAF_RELEASE@}
\newcommand{\cafsha}{@CAF_SHA@}
\newcommand{\cafroot}{@PROJECT_SOURCE_DIR@}
......@@ -160,27 +160,21 @@ inline void intrusive_ptr_add_ref(actor_control_block* x) {
/// @relates actor_control_block
CAF_CORE_EXPORT void intrusive_ptr_release(actor_control_block* x);
/// @relates abstract_actor
/// @relates actor_control_block
using strong_actor_ptr = intrusive_ptr<actor_control_block>;
/// @relates strong_actor_ptr
CAF_CORE_EXPORT bool operator==(const strong_actor_ptr&, const abstract_actor*);
/// @relates strong_actor_ptr
CAF_CORE_EXPORT bool operator==(const abstract_actor*, const strong_actor_ptr&);
/// @relates strong_actor_ptr
inline bool operator!=(const strong_actor_ptr& x, const abstract_actor* y) {
return !(x == y);
}
/// @relates strong_actor_ptr
inline bool operator!=(const abstract_actor* x, const strong_actor_ptr& y) {
return !(x == y);
}
/// @relates abstract_actor
/// @relates actor_control_block
using weak_actor_ptr = weak_intrusive_ptr<actor_control_block>;
......
......@@ -135,43 +135,12 @@
///
/// @section Intro Introduction
///
/// This library provides an implementation of the actor model for C++.
/// It uses a network transparent messaging system to ease development
/// of both concurrent and distributed software.
/// This framework provides an implementation of the actor model for C++. It
/// uses network transparent messaging to ease development of concurrent and
/// distributed software.
///
/// `libcaf` uses a thread pool to schedule actors by default.
/// A scheduled actor should not call blocking functions.
/// Individual actors can be spawned (created) with a special flag to run in
/// an own thread if one needs to make use of blocking APIs.
///
/// Writing applications in `libcaf` requires a minimum of gluecode and
/// each context <i>is</i> an actor. Scoped actors allow actor interaction
/// from the context of threads such as main.
///
/// @section GettingStarted Getting Started
///
/// To build `libcaf,` you need `GCC >= 4.8 or <tt>Clang >= 3.2</tt>,
/// and `CMake`.
///
/// The usual build steps on Linux and macOS are:
///
///- `./configure
///- `make
///- `make install (as root, optionally)
///
/// Please run the unit tests as well to verify that `libcaf`
/// works properly.
///
///- `make test
///
/// Please submit a bug report that includes (a) your compiler version,
/// (b) your OS, and (c) the output of the unit tests if an error occurs:
/// https://github.com/actor-framework/actor-framework/issues
///
/// Please read the <b>Manual</b> for an introduction to `libcaf`.
/// It is available online on Read The Docs at
/// https://actor-framework.readthedocs.io or as PDF at
/// http://www.actor-framework.org/pdf/manual.pdf
/// To get started with the framework, please read the
/// [manual](https://actor-framework.readthedocs.io) first.
///
/// @section IntroHelloWorld Hello World Example
///
......
......@@ -22,7 +22,8 @@
namespace caf {
/// Customization point for enabling conversion from an enum type to an ::error.
/// Customization point for enabling conversion from an enum type to an
/// @ref error.
template <class T>
struct error_category;
......
......@@ -40,7 +40,6 @@ enum class inbox_result {
queue_closed,
};
/// @relates inbox_result
CAF_CORE_EXPORT std::string to_string(inbox_result);
} // namespace caf::intrusive
......@@ -41,7 +41,6 @@ enum class task_result {
stop_all,
};
/// @relates task_result
std::string to_string(task_result);
} // namespace caf::intrusive
......@@ -47,8 +47,6 @@ T* intrusive_cow_ptr_unshare(T*& ptr) {
/// An intrusive, reference counting smart pointer implementation with
/// copy-on-write optimization.
/// @relates ref_counted
/// @relates intrusive_ptr
template <class T>
class intrusive_cow_ptr
: detail::comparable<intrusive_cow_ptr<T>>,
......
......@@ -38,7 +38,6 @@ enum class invoke_message_result {
dropped,
};
/// @relates invoke_message_result
CAF_CORE_EXPORT std::string to_string(invoke_message_result);
} // namespace caf
......@@ -399,6 +399,8 @@ public:
message_id new_request_id(message_priority mp);
/// @endcond
protected:
// -- member variables -------------------------------------------------------
......
......@@ -151,7 +151,6 @@ public:
timestamp tstamp;
};
/// Internal representation of format string entities.
enum field_type {
invalid_field,
category_field,
......@@ -373,7 +372,6 @@ private:
std::thread thread_;
};
/// @relates logger::field_type
CAF_CORE_EXPORT std::string to_string(logger::field_type x);
/// @relates logger::field
......
......@@ -24,7 +24,7 @@ namespace caf {
/// Constructs an object of type `T` in an `intrusive_cow_ptr`.
/// @relates ref_counted
/// @relates intrusive_cow_ptr
/// @relatealso intrusive_cow_ptr
template <class T, class... Ts>
intrusive_cow_ptr<T> make_copy_on_write(Ts&&... xs) {
return intrusive_cow_ptr<T>(new T(std::forward<Ts>(xs)...), false);
......
......@@ -28,7 +28,6 @@ namespace caf {
/// Constructs an object of type `T` in an `intrusive_ptr`.
/// @relates ref_counted
/// @relates intrusive_ptr
template <class T, class... Ts>
intrusive_ptr<T> make_counted(Ts&&... xs) {
return intrusive_ptr<T>(new T(std::forward<Ts>(xs)...), false);
......
......@@ -26,21 +26,17 @@
namespace caf {
/// Denotes the urgency of asynchronous messages.
enum class message_priority {
high = 0,
normal = 1,
};
/// @relates message_priority
using high_message_priority_constant
= std::integral_constant<message_priority, message_priority::high>;
/// @relates message_priority
using normal_message_priority_constant
= std::integral_constant<message_priority, message_priority::normal>;
/// @relates message_priority
CAF_CORE_EXPORT std::string to_string(message_priority);
} // namespace caf
......@@ -77,7 +77,6 @@ enum class pec : uint8_t {
invalid_range_expression,
};
/// @relates pec
CAF_CORE_EXPORT std::string to_string(pec);
template <>
......
......@@ -54,7 +54,6 @@ namespace caf::policy {
/// Enables a `response_handle` to pick the first arriving response, ignoring
/// all other results.
/// @relates mixin::requester
/// @relates response_handle
template <class ResponseType>
class select_any {
......
......@@ -29,7 +29,6 @@
namespace caf::policy {
/// Trivial policy for handling a single result in a `response_handler`.
/// @relates mixin::requester
/// @relates response_handle
template <class ResponseType>
class single_response {
......
......@@ -33,14 +33,12 @@ namespace caf {
/// non-null for custom types.
using rtti_pair = std::pair<uint16_t, const std::type_info*>;
/// @relates rtti_pair
template <class T>
typename std::enable_if<type_nr<T>::value == 0, rtti_pair>::type
make_rtti_pair() {
return {0, &typeid(T)};
}
/// @relates rtti_pair
template <class T>
typename std::enable_if<type_nr<T>::value != 0, rtti_pair>::type
make_rtti_pair() {
......@@ -48,7 +46,6 @@ make_rtti_pair() {
return {n, nullptr};
}
/// @relates rtti_pair
CAF_CORE_EXPORT std::string to_string(rtti_pair x);
} // namespace caf
......@@ -102,7 +102,6 @@ CAF_CORE_EXPORT result<message> print_and_drop(scheduled_actor*, message_view&);
CAF_CORE_EXPORT result<message> drop(scheduled_actor*, message_view&);
/// A cooperatively scheduled, event-based actor implementation.
/// @extends local_actor
class CAF_CORE_EXPORT scheduled_actor : public local_actor,
public resumable,
public non_blocking_actor_base {
......
......@@ -147,7 +147,6 @@ enum class sec : uint8_t {
all_requests_failed,
};
/// @relates sec
CAF_CORE_EXPORT std::string to_string(sec);
template <>
......
......@@ -24,9 +24,6 @@ namespace caf {
/// @{
/// Stores options passed to the `spawn` function family.
#ifdef CAF_DOCUMENTATION
class spawn_options {};
#else
enum class spawn_options : int {
no_flags = 0x00,
link_flag = 0x01,
......@@ -36,14 +33,10 @@ enum class spawn_options : int {
priority_aware_flag = 0x20,
lazy_init_flag = 0x40
};
#endif
/// Concatenates two {@link spawn_options}.
/// @relates spawn_options
constexpr spawn_options
operator+(const spawn_options& lhs, const spawn_options& rhs) {
return static_cast<spawn_options>(static_cast<int>(lhs)
| static_cast<int>(rhs));
constexpr spawn_options operator+(spawn_options x, spawn_options y) {
return static_cast<spawn_options>(static_cast<int>(x) | static_cast<int>(y));
}
/// Denotes default settings.
......@@ -68,43 +61,36 @@ constexpr spawn_options hidden = spawn_options::hide_flag;
constexpr spawn_options lazy_init = spawn_options::lazy_init_flag;
/// Checks whether `haystack` contains `needle`.
/// @relates spawn_options
constexpr bool has_spawn_option(spawn_options haystack, spawn_options needle) {
return (static_cast<int>(haystack) & static_cast<int>(needle)) != 0;
}
/// Checks whether the {@link detached} flag is set in `opts`.
/// @relates spawn_options
constexpr bool has_detach_flag(spawn_options opts) {
return has_spawn_option(opts, detached);
}
/// Checks whether the {@link priority_aware} flag is set in `opts`.
/// @relates spawn_options
constexpr bool has_priority_aware_flag(spawn_options) {
return true;
}
/// Checks whether the {@link hidden} flag is set in `opts`.
/// @relates spawn_options
constexpr bool has_hide_flag(spawn_options opts) {
return has_spawn_option(opts, hidden);
}
/// Checks whether the {@link linked} flag is set in `opts`.
/// @relates spawn_options
constexpr bool has_link_flag(spawn_options opts) {
return has_spawn_option(opts, linked);
}
/// Checks whether the {@link monitored} flag is set in `opts`.
/// @relates spawn_options
constexpr bool has_monitor_flag(spawn_options opts) {
return has_spawn_option(opts, monitored);
}
/// Checks whether the {@link lazy_init} flag is set in `opts`.
/// @relates spawn_options
constexpr bool has_lazy_init_flag(spawn_options opts) {
return has_spawn_option(opts, lazy_init);
}
......
......@@ -41,7 +41,6 @@ enum class stream_priority {
/// Stores the number of `stream_priority` classes.
static constexpr size_t stream_priorities = 5;
/// @relates stream_priority
CAF_CORE_EXPORT std::string to_string(stream_priority x);
} // namespace caf
......@@ -25,6 +25,10 @@
namespace caf {
/// @defgroup SumType Sum Types
/// Opt-in sum type concept for `variant`-style types.
/// @{
/// Concept for checking whether `T` supports the sum type API by specializing
/// `sum_type_access`.
template <class T>
......@@ -61,7 +65,6 @@ make_sum_type_token() {
/// Returns a reference to the value of a sum type.
/// @pre `holds_alternative<T>(x)`
/// @relates SumType
template <class T, class U, class Trait = sum_type_access<U>>
auto get(U& x) -> decltype(Trait::get(x, make_sum_type_token<Trait, T>())) {
return Trait::get(x, make_sum_type_token<Trait, T>());
......@@ -69,7 +72,6 @@ auto get(U& x) -> decltype(Trait::get(x, make_sum_type_token<Trait, T>())) {
/// Returns a reference to the value of a sum type.
/// @pre `holds_alternative<T>(x)`
/// @relates SumType
template <class T, class U, class Trait = sum_type_access<U>>
auto get(const U& x)
-> decltype(Trait::get(x, make_sum_type_token<Trait, T>())) {
......@@ -78,7 +80,6 @@ auto get(const U& x)
/// Returns a pointer to the value of a sum type if it is of type `T`,
/// `nullptr` otherwise.
/// @relates SumType
template <class T, class U, class Trait = sum_type_access<U>>
auto get_if(U* x)
-> decltype(Trait::get_if(x, make_sum_type_token<Trait, T>())) {
......@@ -87,7 +88,6 @@ auto get_if(U* x)
/// Returns a pointer to the value of a sum type if it is of type `T`,
/// `nullptr` otherwise.
/// @relates SumType
template <class T, class U, class Trait = sum_type_access<U>>
auto get_if(const U* x)
-> decltype(Trait::get_if(x, make_sum_type_token<Trait, T>())) {
......@@ -95,7 +95,6 @@ auto get_if(const U* x)
}
/// Returns whether a sum type has a value of type `T`.
/// @relates SumType
template <class T, class U>
bool holds_alternative(const U& x) {
using namespace detail;
......@@ -155,7 +154,6 @@ struct visit_impl_continuation {
};
/// Applies the values of any number of sum types to the visitor.
/// @relates SumType
template <class Visitor, class T, class... Ts,
class Result = sum_type_visit_result_t<Visitor, T, Ts...>>
detail::enable_if_t<SumTypes<T, Ts...>(), Result>
......@@ -165,4 +163,6 @@ visit(Visitor&& f, T&& x, Ts&&... xs) {
std::forward<Ts>(xs)...);
}
/// @}
} // namespace caf
......@@ -99,23 +99,23 @@ public:
}
};
/// @relates type_erased_value_impl
/// @relates type_erased_value
CAF_CORE_EXPORT error inspect(serializer& f, const type_erased_value& x);
/// @relates type_erased_value_impl
/// @relates type_erased_value
CAF_CORE_EXPORT error inspect(deserializer& f, type_erased_value& x);
/// @relates type_erased_value_impl
/// @relates type_erased_value
inline auto inspect(binary_serializer& f, const type_erased_value& x) {
return x.save(f);
}
/// @relates type_erased_value_impl
/// @relates type_erased_value
inline auto inspect(binary_deserializer& f, type_erased_value& x) {
return x.load(f);
}
/// @relates type_erased_value_impl
/// @relates type_erased_value
inline auto to_string(const type_erased_value& x) {
return x.stringify();
}
......
......@@ -24,6 +24,7 @@
namespace caf::io::basp {
/// @addtogroup BASP
/// @{
/// Denotes the state of a connection between two BASP nodes. Overlaps with
/// `sec` (these states get converted to an error by the BASP instance).
......@@ -52,7 +53,6 @@ enum connection_state {
/// Returns whether the connection state requries a shutdown of the socket
/// connection.
/// @relates connection_state
inline bool requires_shutdown(connection_state x) {
// Any enum value other than await_header (0) and await_payload (1) signal the
// BASP broker to shutdown the connection.
......@@ -61,7 +61,6 @@ inline bool requires_shutdown(connection_state x) {
/// Converts the connection state to a system error code if it holds one of the
/// overlapping values. Otherwise returns `sec::none`.
/// @relates connection_state
inline sec to_sec(connection_state x) {
switch (x) {
default:
......@@ -81,7 +80,6 @@ inline sec to_sec(connection_state x) {
}
}
/// @relates connection_state
CAF_IO_EXPORT std::string to_string(connection_state x);
/// @}
......
......@@ -31,11 +31,12 @@
namespace caf::io::basp {
/// @addtogroup BASP
/// @{
/// The header of a Binary Actor System Protocol (BASP) message.
/// A BASP header consists of a routing part, i.e., source and
/// destination, as well as an operation and operation data. Several
/// message types consist of only a header.
/// The header of a Binary Actor System Protocol (BASP) message. A BASP header
/// consists of a routing part, i.e., source and destination, as well as an
/// operation and operation data. Several message types consist of only a
/// header.
struct header {
message_type operation;
uint8_t padding1;
......@@ -107,8 +108,9 @@ inline bool is_heartbeat(const header& hdr) {
CAF_IO_EXPORT bool valid(const header& hdr);
/// Size of a BASP header in serialized form
constexpr size_t header_size
= sizeof(actor_id) * 2 + sizeof(uint32_t) * 2 + sizeof(uint64_t);
/// @relates header
constexpr size_t header_size = sizeof(actor_id) * 2 + sizeof(uint32_t) * 2
+ sizeof(uint64_t);
/// @}
......
......@@ -38,6 +38,7 @@
namespace caf::io::basp {
/// @addtogroup BASP
/// @{
/// Describes a protocol instance managing multiple connections.
class CAF_IO_EXPORT instance {
......
......@@ -26,6 +26,7 @@
namespace caf::io::basp {
/// @addtogroup BASP
/// @{
/// Describes the first header field of a BASP message and determines the
/// interpretation of the other header fields.
......@@ -73,7 +74,6 @@ enum class message_type : uint8_t {
heartbeat = 0x06,
};
/// @relates message_type
CAF_IO_EXPORT std::string to_string(message_type);
/// @}
......
......@@ -30,6 +30,7 @@
namespace caf::io::basp {
/// @addtogroup BASP
/// @{
/// Stores routing information for a single broker participating as
/// BASP peer and provides both direct and indirect paths.
......
......@@ -23,6 +23,7 @@
namespace caf::io::basp {
/// @addtogroup BASP
/// @{
/// The current BASP version. Note: BASP is not backwards compatible.
constexpr uint64_t version = 3;
......
......@@ -103,7 +103,7 @@ using middleman_actor = typed_actor<
replies_to<get_atom, node_id>::with<node_id, std::string, uint16_t>>;
/// @relates middleman_actor
/// Spawns the default implementation for the `middleman_actor` interface.
CAF_IO_EXPORT middleman_actor make_middleman_actor(actor_system& sys, actor db);
} // namespace caf::io
......@@ -36,17 +36,14 @@ struct protocol {
network net;
};
/// @relates protocol::transport
inline std::string to_string(protocol::transport x) {
return x == protocol::tcp ? "TCP" : "UDP";
}
/// @relates protocol::network
inline std::string to_string(protocol::network x) {
return x == protocol::ipv4 ? "IPv4" : "IPv6";
}
/// @relates protocol
template <class Inspector>
typename Inspector::result_type inspect(Inspector& f, protocol& x) {
return f(meta::type_name("protocol"), x.trans, x.net);
......@@ -54,7 +51,6 @@ typename Inspector::result_type inspect(Inspector& f, protocol& x) {
/// Converts a protocol into a transport/network string representation, e.g.,
/// "TCP/IPv4".
/// @relates protocol
CAF_IO_EXPORT std::string to_string(const protocol& x);
} // namespace caf::io::network
......@@ -89,11 +89,14 @@ public:
template with<mixin::sender, mixin::requester, mixin::behavior_changer>;
/// @cond PRIVATE
std::set<std::string> message_types() const override {
detail::type_list<typed_actor<Sigs...>> hdl;
return this->system().message_types(hdl);
}
/// @endcond
void initialize() override {
CAF_LOG_TRACE("");
this->init_broker();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment