Browse Source

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

tags/v2.9.7
tearshark 4 years ago
parent
commit
04fde5f355

+ 3
- 3
Doxyfile View File

# included. # included.
# The default value is: NO. # 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 # If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called # extracted and appear in the documentation as a namespace called
# are hidden. # are hidden.
# The default value is: NO. # 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 # 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 # undocumented members inside documented classes or files. If set to NO these
# has no effect if EXTRACT_ALL is enabled. # has no effect if EXTRACT_ALL is enabled.
# The default value is: NO. # 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 # 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 # declarations. If set to NO, these declarations will be included in the

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

#ifndef DOXYGEN_SKIP_PROPERTY #ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


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


template<class _Ty> template<class _Ty>
struct awaitable_impl_t struct awaitable_impl_t

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {
using semaphore_t = channel_t<bool>; using semaphore_t = channel_t<bool>;


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

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

#pragma once #pragma once


#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{ {
#ifndef DOXYGEN_SKIP_PROPERTY
namespace detail namespace detail
{ {
template<class _Ty, class _Opty> template<class _Ty, class _Opty>
size_t capacity() const noexcept; size_t capacity() const noexcept;


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


read_awaiter read() const noexcept; read_awaiter read() const noexcept;


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


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

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {
} }


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

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

#pragma once #pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{ {
#endif //DOXYGEN_SKIP_PROPERTY
template <typename T> template <typename T>
struct counted_ptr struct counted_ptr

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

#pragma once #pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{ {
#endif //DOXYGEN_SKIP_PROPERTY
struct get_current_scheduler_awaitor struct get_current_scheduler_awaitor
{ {

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

#define LIB_RESUMEF_VERSION 20905 // 2.9.5 #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; struct scheduler_t;
template<class _Ty = void> template<class _Ty = void>
struct state_base_t; struct state_base_t;
struct switch_scheduler_t; struct switch_scheduler_t;
#else //DOXYGEN_SKIP_PROPERTY
namespace resumef {
#endif //DOXYGEN_SKIP_PROPERTY #endif //DOXYGEN_SKIP_PROPERTY
template<typename _PromiseT = void> template<typename _PromiseT = void>
extern std::atomic<intptr_t> g_resumef_state_id; extern std::atomic<intptr_t> g_resumef_state_id;
#endif #endif
RESUMEF_NS
namespace resumef
{ {
template<class T> template<class T>
struct remove_cvref struct remove_cvref

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

#include "../librf.h" #include "../librf.h"


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#include "../librf.h" #include "../librf.h"


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


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

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

#pragma once #pragma once
RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


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


enum struct error_code enum struct error_code
{ {

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

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

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

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

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

#pragma once #pragma once


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

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

#include "../librf.h" #include "../librf.h"


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#include "../librf.h" #include "../librf.h"


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


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

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#undef new #undef new


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

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

 
RESUMEF_NS
namespace resumef
{ {
/* /*
Note: the awaiter object is part of coroutine state (as a temporary whose lifetime crosses a suspension point) 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 View File

#include "../librf.h" #include "../librf.h"
RESUMEF_NS
namespace resumef
{ {
task_base_t::~task_base_t() task_base_t::~task_base_t()
{ {

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

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

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

#pragma once #pragma once


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

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

#pragma once #pragma once


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

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

#pragma once #pragma once


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

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

std::atomic<intptr_t> g_resumef_state_id = 0; std::atomic<intptr_t> g_resumef_state_id = 0;
#endif #endif
RESUMEF_NS
namespace resumef
{ {
const char * future_error_string[(size_t)error_code::max__] const char * future_error_string[(size_t)error_code::max__]
{ {

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

#pragma once #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> struct scheduler_t : public std::enable_shared_from_this<scheduler_t>
{ {
private: private:

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

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

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

// //
#pragma once #pragma once
RESUMEF_NS
namespace resumef
{ {
struct scheduler_t;
future_t<> sleep_until_(std::chrono::system_clock::time_point tp_, scheduler_t& scheduler_); 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_) inline future_t<> sleep_for_(std::chrono::system_clock::duration dt_, scheduler_t& scheduler_)

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

#pragma once #pragma once
RESUMEF_NS
namespace resumef
{ {
#if defined(RESUMEF_USE_CUSTOM_SPINLOCK) #if defined(RESUMEF_USE_CUSTOM_SPINLOCK)
using spinlock = RESUMEF_USE_CUSTOM_SPINLOCK; using spinlock = RESUMEF_USE_CUSTOM_SPINLOCK;

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

#include "../librf.h" #include "../librf.h"
RESUMEF_NS
namespace resumef
{ {
state_base_t::~state_base_t() state_base_t::~state_base_t()
{ {

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

#pragma once #pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{ {
#endif //DOXYGEN_SKIP_PROPERTY
struct state_base_t struct state_base_t
{ {
using _Alloc_char = std::allocator<char>; using _Alloc_char = std::allocator<char>;

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

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

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
struct switch_scheduler_awaitor struct switch_scheduler_awaitor
{ {
//{ //{
// return { &sch }; // return { &sch };
//} //}

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

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

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

#include "../librf.h" #include "../librf.h"
RESUMEF_NS
namespace resumef
{ {
timer_manager::timer_manager() timer_manager::timer_manager()
{ {
_added_timers.reserve(128); _added_timers.reserve(128);

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

#pragma once #pragma once
#ifndef DOXYGEN_SKIP_PROPERTY
RESUMEF_NS
namespace resumef
{ {
#endif //DOXYGEN_SKIP_PROPERTY
struct timer_manager; struct timer_manager;
typedef std::shared_ptr<timer_manager> timer_mgr_ptr; typedef std::shared_ptr<timer_manager> timer_mgr_ptr;
typedef std::weak_ptr<timer_manager> timer_mgr_wptr; typedef std::weak_ptr<timer_manager> timer_mgr_wptr;

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

#include <concepts> #include <concepts>
#endif #endif
RESUMEF_NS
namespace resumef
{ {
#if RESUMEF_ENABLE_CONCEPT #if RESUMEF_ENABLE_CONCEPT

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
namespace traits namespace traits
{ {

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

#include "../librf.h" #include "../librf.h"


RESUMEF_NS
namespace resumef
{ {
namespace detail namespace detail
{ {

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

#pragma once #pragma once


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


#ifndef DOXYGEN_SKIP_PROPERTY #ifndef DOXYGEN_SKIP_PROPERTY
inline namespace when_v2 inline namespace when_v2
{ {
#else
struct when
{
#endif #endif


template<_WhenTaskT... _Awaitable template<_WhenTaskT... _Awaitable

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

#pragma once #pragma once


RESUMEF_NS
namespace resumef
{ {
struct yield_awaitor struct yield_awaitor
{ {

Loading…
Cancel
Save