Sfoglia il codice sorgente

暂缓对modules的支持,优先支持Doxygen。

tags/v2.9.7
tearshark 4 anni fa
parent
commit
04fde5f355

+ 3
- 3
Doxyfile Vedi File

@@ -507,7 +507,7 @@ EXTRACT_LOCAL_CLASSES = YES
# included.
# The default value is: NO.
EXTRACT_LOCAL_METHODS = NO
EXTRACT_LOCAL_METHODS = YES
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
@@ -516,7 +516,7 @@ EXTRACT_LOCAL_METHODS = NO
# are hidden.
# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
EXTRACT_ANON_NSPACES = YES
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
@@ -532,7 +532,7 @@ HIDE_UNDOC_MEMBERS = NO
# has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
HIDE_UNDOC_CLASSES = YES
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
# declarations. If set to NO, these declarations will be included in the

+ 1
- 1
librf/src/_awaker.h Vedi File

@@ -2,7 +2,7 @@
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 3
librf/src/awaitable.h Vedi File

@@ -1,9 +1,7 @@
#pragma once

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY

template<class _Ty>
struct awaitable_impl_t

+ 2
- 2
librf/src/channel_v1.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
namespace detail
{
@@ -240,4 +240,4 @@ namespace channel_v1
using semaphore_t = channel_t<bool>;

} //namespace v1
} //RESUMEF_NS
} //namespace resumef

+ 7
- 5
librf/src/channel_v2.h Vedi File

@@ -1,8 +1,8 @@
#pragma once

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#ifndef DOXYGEN_SKIP_PROPERTY
namespace detail
{
template<class _Ty, class _Opty>
@@ -42,7 +42,8 @@ inline namespace channel_v2
size_t capacity() const noexcept;

/**
* @brief 在协程中从channel_t里读取一个数据。参考read()函数
* @brief 在协程中从channel_t里读取一个数据。
* @see 参考{read}()函数
*/
read_awaiter operator co_await() const noexcept;

@@ -57,7 +58,8 @@ inline namespace channel_v2
read_awaiter read() const noexcept;

/**
* @brief 在协程中向channel_t里写入一个数据。参考write()函数
* @brief 在协程中向channel_t里写入一个数据。
* @see 参考{write}()函数
*/
template<class U
#ifndef DOXYGEN_SKIP_PROPERTY
@@ -121,4 +123,4 @@ inline namespace channel_v2
using semaphore_t = channel_t<bool, false, true>;

} //namespace channel_v2
} //RESUMEF_NS
} //namespace resumef

+ 2
- 2
librf/src/channel_v2.inl Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
namespace detail
{
@@ -505,4 +505,4 @@ inline namespace channel_v2
}

} //namespace channel_v2
} //RESUMEF_NS
} //namespace resumef

+ 1
- 3
librf/src/counted_ptr.h Vedi File

@@ -1,9 +1,7 @@
#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY
template <typename T>
struct counted_ptr

+ 1
- 3
librf/src/current_scheduler.h Vedi File

@@ -1,9 +1,7 @@
#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY
struct get_current_scheduler_awaitor
{

+ 3
- 11
librf/src/def.h Vedi File

@@ -2,15 +2,9 @@
#define LIB_RESUMEF_VERSION 20905 // 2.9.5
#if defined(RESUMEF_MODULE_EXPORT)
#define RESUMEF_NS export namespace resumef
#else
#define RESUMEF_NS namespace resumef
#endif
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#ifndef DOXYGEN_SKIP_PROPERTY
struct scheduler_t;
template<class _Ty = void>
@@ -30,8 +24,6 @@ RESUMEF_NS
struct state_base_t;
struct switch_scheduler_t;
#else //DOXYGEN_SKIP_PROPERTY
namespace resumef {
#endif //DOXYGEN_SKIP_PROPERTY
template<typename _PromiseT = void>
@@ -58,7 +50,7 @@ extern std::atomic<intptr_t> g_resumef_evtctx_count;
extern std::atomic<intptr_t> g_resumef_state_id;
#endif
RESUMEF_NS
namespace resumef
{
template<class T>
struct remove_cvref

+ 1
- 1
librf/src/event_v1.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 1
librf/src/event_v1.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 1
librf/src/event_v2.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 2
- 2
librf/src/event_v2.h Vedi File

@@ -1,8 +1,8 @@
#pragma once

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#ifndef DOXYGEN_SKIP_PROPERTY
namespace detail
{
struct event_v2_impl;

+ 1
- 1
librf/src/event_v2.inl Vedi File

@@ -1,6 +1,6 @@
#pragma once
RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 3
librf/src/exception.inl Vedi File

@@ -1,9 +1,7 @@
#pragma once

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY

enum struct error_code
{

+ 1
- 3
librf/src/future.h Vedi File

@@ -1,10 +1,8 @@

#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY
template<class _Ty>
struct [[nodiscard]] future_t

+ 1
- 4
librf/src/generator.h Vedi File

@@ -9,11 +9,8 @@
#pragma push_macro("new")
#undef new
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY
template <typename _Ty, typename promise_type>
struct generator_iterator;

+ 1
- 1
librf/src/intrusive_link_queue.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
template<class _Node, class _Nodeptr = _Node*, class _Sty = uint32_t>
struct intrusive_link_queue

+ 1
- 1
librf/src/mutex_v1.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 1
librf/src/mutex_v1.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 1
librf/src/mutex_v2.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 4
- 3
librf/src/mutex_v2.h Vedi File

@@ -1,8 +1,8 @@
#pragma once

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#ifndef DOXYGEN_SKIP_PROPERTY
namespace detail
{
struct mutex_v2_impl;
@@ -46,7 +46,8 @@ RESUMEF_NS
awaiter/*batch_unlock_t*/ lock() const noexcept;
/**
* @brief 等同调用 co_await lock()。
* @brief 在协程中加锁。
* @see 等同调用 co_await {lock}()。
* @return [co_await] batch_unlock_t
*/
awaiter/*batch_unlock_t*/ operator co_await() const noexcept;

+ 1
- 1
librf/src/mutex_v2.inl Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 1
- 1
librf/src/promise.h Vedi File

@@ -4,7 +4,7 @@
#undef new

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
struct suspend_on_initial;
struct suspend_on_final;

+ 1
- 1
librf/src/promise.inl Vedi File

@@ -1,5 +1,5 @@

RESUMEF_NS
namespace resumef
{
/*
Note: the awaiter object is part of coroutine state (as a temporary whose lifetime crosses a suspension point)

+ 1
- 1
librf/src/rf_task.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"
RESUMEF_NS
namespace resumef
{
task_base_t::~task_base_t()
{

+ 2
- 2
librf/src/rf_task.h Vedi File

@@ -1,8 +1,8 @@
#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#ifndef DOXYGEN_SKIP_PROPERTY
/**
* @brief 协程任务的基类。
*/

+ 1
- 1
librf/src/ring_queue.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
//使用自旋锁完成的线程安全的环形队列。
//支持多个线程同时push和pop。

+ 1
- 1
librf/src/ring_queue_lockfree.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
//目前无法解决三个索引数值回绕导致的问题
//如果为了避免索引回绕的问题,索引采用uint64_t类型,

+ 1
- 1
librf/src/ring_queue_spinlock.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
//使用自旋锁完成的线程安全的环形队列。
//支持多个线程同时push和pop。

+ 1
- 1
librf/src/scheduler.cpp Vedi File

@@ -8,7 +8,7 @@ std::atomic<intptr_t> g_resumef_evtctx_count = 0;
std::atomic<intptr_t> g_resumef_state_id = 0;
#endif
RESUMEF_NS
namespace resumef
{
const char * future_error_string[(size_t)error_code::max__]
{

+ 1
- 5
librf/src/scheduler.h Vedi File

@@ -1,11 +1,7 @@
#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
struct local_scheduler;
#endif //DOXYGEN_SKIP_PROPERTY
struct scheduler_t : public std::enable_shared_from_this<scheduler_t>
{
private:

+ 1
- 1
librf/src/sleep.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"
RESUMEF_NS
namespace resumef
{
future_t<> sleep_until_(std::chrono::system_clock::time_point tp_, scheduler_t& scheduler_)
{

+ 1
- 3
librf/src/sleep.h Vedi File

@@ -4,10 +4,8 @@
//
#pragma once
RESUMEF_NS
namespace resumef
{
struct scheduler_t;
future_t<> sleep_until_(std::chrono::system_clock::time_point tp_, scheduler_t& scheduler_);
inline future_t<> sleep_for_(std::chrono::system_clock::duration dt_, scheduler_t& scheduler_)

+ 1
- 1
librf/src/spinlock.h Vedi File

@@ -2,7 +2,7 @@
#pragma once
RESUMEF_NS
namespace resumef
{
#if defined(RESUMEF_USE_CUSTOM_SPINLOCK)
using spinlock = RESUMEF_USE_CUSTOM_SPINLOCK;

+ 1
- 1
librf/src/state.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"
RESUMEF_NS
namespace resumef
{
state_base_t::~state_base_t()
{

+ 1
- 4
librf/src/state.h Vedi File

@@ -1,10 +1,7 @@
#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY
struct state_base_t
{
using _Alloc_char = std::allocator<char>;

+ 1
- 1
librf/src/state.inl Vedi File

@@ -1,5 +1,5 @@

RESUMEF_NS
namespace resumef
{
template<class _PromiseT, typename _Enable>
void state_future_t::promise_initial_suspend(coroutine_handle<_PromiseT> handler)

+ 14
- 1
librf/src/switch_scheduler.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
struct switch_scheduler_awaitor
{
@@ -52,10 +52,23 @@ RESUMEF_NS
//{
// return { &sch };
//}

/**
* @fn 将本协程切换到指定调度器上运行。
* @details 由于调度器必然在某个线程里运行,故达到了切换到特定线程里运行的目的。\n
* 如果指定的协程就是本协程的调度器,则协程不暂停直接运行接下来的代码。
* 如果指定的协程不是本协程的调度器,则协程暂停后放入到目的协程的调度队列,等待下一次运行。
* @param sch 将要运行此后代码的协程
*/
inline switch_scheduler_awaitor via(scheduler_t& sch) noexcept
{
return { &sch };
}

/**
* @fn 将本协程切换到指定调度器上运行。
* @see 参考{via}(scheduler_t&)版本。
*/
inline switch_scheduler_awaitor via(scheduler_t* sch) noexcept
{
return { sch };

+ 1
- 2
librf/src/timer.cpp Vedi File

@@ -1,8 +1,7 @@
#include "../librf.h"
RESUMEF_NS
namespace resumef
{
timer_manager::timer_manager()
{
_added_timers.reserve(128);

+ 1
- 4
librf/src/timer.h Vedi File

@@ -1,10 +1,7 @@
#pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#endif //DOXYGEN_SKIP_PROPERTY
struct timer_manager;
typedef std::shared_ptr<timer_manager> timer_mgr_ptr;
typedef std::weak_ptr<timer_manager> timer_mgr_wptr;

+ 1
- 1
librf/src/type_concept.inl Vedi File

@@ -4,7 +4,7 @@
#include <concepts>
#endif
RESUMEF_NS
namespace resumef
{
#if RESUMEF_ENABLE_CONCEPT

+ 1
- 1
librf/src/type_traits.inl Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
namespace traits
{

+ 1
- 1
librf/src/when_v2.cpp Vedi File

@@ -1,6 +1,6 @@
#include "../librf.h"

RESUMEF_NS
namespace resumef
{
namespace detail
{

+ 3
- 6
librf/src/when_v2.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
using any_t = std::any;
using std::any_cast;
@@ -12,9 +12,9 @@ RESUMEF_NS
//最最重要的,要统一ranged when_any的返回值,还得做一个运行时通过下标设置std::variant<>的东西
//std::any除了内存布局不太理想,其他方面几乎没缺点(在此应用下)

#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{
#ifndef DOXYGEN_SKIP_PROPERTY
using when_any_pair = std::pair<intptr_t, any_t>;
using when_any_pair_ptr = std::shared_ptr<when_any_pair>;

@@ -254,9 +254,6 @@ RESUMEF_NS
#ifndef DOXYGEN_SKIP_PROPERTY
inline namespace when_v2
{
#else
struct when
{
#endif

template<_WhenTaskT... _Awaitable

+ 1
- 1
librf/src/yield.h Vedi File

@@ -1,6 +1,6 @@
#pragma once

RESUMEF_NS
namespace resumef
{
struct yield_awaitor
{

Loading…
Annulla
Salva