cpp-mirai-client  v2.6.1
cpp client for mirai-api-http
Mirai::ForwardMessage类 参考final

合并转发消息 更多...

#include <ForwardMessage.hpp>

类 Mirai::ForwardMessage 继承关系图:
[图例]
Mirai::ForwardMessage 的协作图:
[图例]

class  Node
 转发消息节点,代表一条转发消息 更多...
 

Public 成员函数

 ForwardMessage ()
 
 ForwardMessage (const ForwardMessage &)
 
ForwardMessageoperator= (const ForwardMessage &)
 
 ForwardMessage (ForwardMessage &&)
 
ForwardMessageoperator= (ForwardMessage &&)
 
 ~ForwardMessage () final
 
std::optional< std::string > GetDisplayTitle () const
 获取合并转发消息的标题("xxx的聊天记录"),为空代表默认值 更多...
 
std::optional< std::string > GetDisplayBrief () const
 获取合并转发消息的简略信息("[聊天记录]"),为空代表默认值 更多...
 
std::optional< std::string > GetDisplaySource () const
 获取合并转发消息的来源显示("聊天记录"),为空代表默认值 更多...
 
std::optional< std::vector< std::string > > GetDisplayPreview () const
 获取合并转发消息的内容预览,为空代表默认值 更多...
 
std::optional< std::string > GetDisplaySummary () const
 获取合并转发消息的内容总结("查看x条转发消息"),为空代表默认值 更多...
 
void SetDisplayTitle (std::string title)
 设置合并转发消息的标题("xxx的聊天记录") 更多...
 
void SetDisplayBrief (std::string brief)
 设置合并转发消息的简略信息("[聊天记录]") 更多...
 
void SetDisplaySource (std::string source)
 设置合并转发消息的来源显示("聊天记录") 更多...
 
void SetDisplayPreview (std::vector< std::string > preview)
 设置合并转发消息的内容预览 更多...
 
void SetDisplaySummary (std::string summary)
 设置合并转发消息的内容总结("查看x条转发消息") 更多...
 
- Public 成员函数 继承自 Mirai::IMessageImpl< ForwardMessage >
std::unique_ptr< IMessageclone () const override
 
- Public 成员函数 继承自 Mirai::IMessage
virtual ~IMessage ()=default
 
virtual std::unique_ptr< IMessageclone () const =0
 
MessageTypes type () const
 Return the type of the class 更多...
 
bool allowSend () const
 检查消息是否可以用于发送 更多...
 
bool valid () const
 检查消息是否有效 更多...
 

Protected 类型

using NodeList = std::vector< Node >
 

Protected 成员函数

bool isValid_ () const final
 
- Protected 成员函数 继承自 Mirai::IMessageImpl< ForwardMessage >
 IMessageImpl ()=default
 
MessageTypes GetType_ () const override
 
bool isSendSupported_ () const override
 
- Protected 成员函数 继承自 Mirai::IMessage
 IMessage ()=default
 
virtual MessageTypes GetType_ () const =0
 
virtual bool isSendSupported_ () const =0
 
virtual bool isValid_ () const =0
 

Protected 属性

NodeList NodeList_
 
std::optional< std::string > title_
 
std::optional< std::string > brief_
 
std::optional< std::string > source_
 
std::optional< std::vector< std::string > > preview_
 
std::optional< std::string > summary_
 

静态 Protected 属性

static constexpr MessageTypes TYPE_ = MessageTypes::FORWARD
 
static constexpr bool SUPPORT_SEND_ = true
 
using value_type = NodeList::value_type
 STL-like interface 更多...
 
using allocator_type = NodeList::allocator_type
 STL-like interface 更多...
 
using size_type = NodeList::size_type
 STL-like interface 更多...
 
using difference_type = NodeList::difference_type
 STL-like interface 更多...
 
using reference = NodeList::reference
 STL-like interface 更多...
 
using const_reference = NodeList::const_reference
 STL-like interface 更多...
 
using pointer = NodeList::pointer
 STL-like interface 更多...
 
using const_pointer = NodeList::const_pointer
 STL-like interface 更多...
 
using reverse_iterator = NodeList::reverse_iterator
 STL-like interface 更多...
 
using const_reverse_iterator = NodeList::const_reverse_iterator
 STL-like interface 更多...
 
using iterator = NodeList::iterator
 STL-like interface 更多...
 
using const_iterator = NodeList::const_iterator
 STL-like interface 更多...
 
bool empty () const noexcept
 STL-like interface 更多...
 
size_type size () const noexcept
 STL-like interface 更多...
 
void reserve (size_type new_cap)
 STL-like interface 更多...
 
void shrink_to_fit () noexcept
 STL-like interface 更多...
 
size_type max_size () const noexcept
 STL-like interface 更多...
 
size_type capacity () const noexcept
 STL-like interface 更多...
 
const_reference at (size_type n) const
 STL-like interface 更多...
 
reference at (size_type n)
 STL-like interface 更多...
 
const_reference operator[] (size_type n) const noexcept
 STL-like interface 更多...
 
reference operator[] (size_type n) noexcept
 STL-like interface 更多...
 
const_reference back () const
 STL-like interface 更多...
 
reference back ()
 STL-like interface 更多...
 
const_reference front () const
 STL-like interface 更多...
 
reference front ()
 STL-like interface 更多...
 
void clear () noexcept
 STL-like interface 更多...
 
iterator insert (const_iterator pos, const_reference value)
 STL-like interface 更多...
 
iterator insert (const_iterator pos, value_type &&value)
 STL-like interface 更多...
 
iterator insert (const_iterator pos, size_type count, const_reference value)
 STL-like interface 更多...
 
template<class InputIt >
iterator insert (const_iterator pos, InputIt first, InputIt last)
 STL-like interface 更多...
 
iterator insert (const_iterator pos, std::initializer_list< value_type > ilist)
 STL-like interface 更多...
 
template<class... Args>
iterator emplace (const_iterator pos, Args &&... args)
 STL-like interface 更多...
 
iterator erase (const_iterator pos)
 STL-like interface 更多...
 
iterator erase (const_iterator first, const_iterator last)
 STL-like interface 更多...
 
void push_back (const_reference node)
 STL-like interface 更多...
 
void push_back (value_type &&node)
 STL-like interface 更多...
 
template<class... Args>
reference emplace_back (Args &&... args)
 STL-like interface 更多...
 
void pop_back ()
 STL-like interface 更多...
 
void resize (size_type count)
 STL-like interface 更多...
 
void resize (size_type count, const value_type &value)
 STL-like interface 更多...
 
iterator begin () noexcept
 STL-like interface 更多...
 
const_iterator begin () const noexcept
 STL-like interface 更多...
 
const_iterator cbegin () const noexcept
 STL-like interface 更多...
 
iterator end () noexcept
 STL-like interface 更多...
 
const_iterator end () const noexcept
 STL-like interface 更多...
 
const_iterator cend () const noexcept
 STL-like interface 更多...
 
reverse_iterator rbegin () noexcept
 STL-like interface 更多...
 
const_reverse_iterator crbegin () const noexcept
 STL-like interface 更多...
 
reverse_iterator rend () noexcept
 STL-like interface 更多...
 
const_reverse_iterator crend () const noexcept
 STL-like interface 更多...
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 Mirai::IMessageImpl< ForwardMessage >
static constexpr MessageTypes GetType ()
 
static constexpr bool isSendSupported ()
 

详细描述

合并转发消息

可以使用类似于STL容器的方式访问各元素

Member Variable Default Value
ForwardMessage::NodeList_ {}
ForwardMessage::title_ std::nullopt
ForwardMessage::brief_ std::nullopt
ForwardMessage::source_ std::nullopt
ForwardMessage::preview_ std::nullopt
ForwardMessage::summary_ std::nullopt

在文件 ForwardMessage.hpp45 行定义.

成员类型定义说明

◆ NodeList

using Mirai::ForwardMessage::NodeList = std::vector<Node>
protected

在文件 ForwardMessage.hpp53 行定义.

◆ value_type

using Mirai::ForwardMessage::value_type = NodeList::value_type

STL-like interface

在文件 ForwardMessage.hpp145 行定义.

◆ allocator_type

using Mirai::ForwardMessage::allocator_type = NodeList::allocator_type

STL-like interface

在文件 ForwardMessage.hpp146 行定义.

◆ size_type

using Mirai::ForwardMessage::size_type = NodeList::size_type

STL-like interface

在文件 ForwardMessage.hpp147 行定义.

◆ difference_type

using Mirai::ForwardMessage::difference_type = NodeList::difference_type

STL-like interface

在文件 ForwardMessage.hpp148 行定义.

◆ reference

using Mirai::ForwardMessage::reference = NodeList::reference

STL-like interface

在文件 ForwardMessage.hpp149 行定义.

◆ const_reference

using Mirai::ForwardMessage::const_reference = NodeList::const_reference

STL-like interface

在文件 ForwardMessage.hpp150 行定义.

◆ pointer

using Mirai::ForwardMessage::pointer = NodeList::pointer

STL-like interface

在文件 ForwardMessage.hpp151 行定义.

◆ const_pointer

using Mirai::ForwardMessage::const_pointer = NodeList::const_pointer

STL-like interface

在文件 ForwardMessage.hpp152 行定义.

◆ reverse_iterator

using Mirai::ForwardMessage::reverse_iterator = NodeList::reverse_iterator

STL-like interface

在文件 ForwardMessage.hpp153 行定义.

◆ const_reverse_iterator

using Mirai::ForwardMessage::const_reverse_iterator = NodeList::const_reverse_iterator

STL-like interface

在文件 ForwardMessage.hpp154 行定义.

◆ iterator

using Mirai::ForwardMessage::iterator = NodeList::iterator

STL-like interface

在文件 ForwardMessage.hpp155 行定义.

◆ const_iterator

using Mirai::ForwardMessage::const_iterator = NodeList::const_iterator

STL-like interface

在文件 ForwardMessage.hpp156 行定义.

构造及析构函数说明

◆ ForwardMessage() [1/3]

Mirai::ForwardMessage::ForwardMessage ( )
default

◆ ForwardMessage() [2/3]

Mirai::ForwardMessage::ForwardMessage ( const ForwardMessage )
default

◆ ForwardMessage() [3/3]

Mirai::ForwardMessage::ForwardMessage ( ForwardMessage &&  )
default

◆ ~ForwardMessage()

Mirai::ForwardMessage::~ForwardMessage ( )
finaldefault

成员函数说明

◆ isValid_()

bool Mirai::ForwardMessage::isValid_ ( ) const
finalprotectedvirtual

实现了 Mirai::IMessage.

在文件 ForwardMessage.cpp30 行定义.

◆ operator=() [1/2]

ForwardMessage & Mirai::ForwardMessage::operator= ( const ForwardMessage )
default

◆ operator=() [2/2]

ForwardMessage & Mirai::ForwardMessage::operator= ( ForwardMessage &&  )
default

◆ GetDisplayTitle()

std::optional< std::string > Mirai::ForwardMessage::GetDisplayTitle ( ) const
inline

获取合并转发消息的标题("xxx的聊天记录"),为空代表默认值

在文件 ForwardMessage.hpp76 行定义.

◆ GetDisplayBrief()

std::optional< std::string > Mirai::ForwardMessage::GetDisplayBrief ( ) const
inline

获取合并转发消息的简略信息("[聊天记录]"),为空代表默认值

在文件 ForwardMessage.hpp82 行定义.

◆ GetDisplaySource()

std::optional< std::string > Mirai::ForwardMessage::GetDisplaySource ( ) const
inline

获取合并转发消息的来源显示("聊天记录"),为空代表默认值

在文件 ForwardMessage.hpp88 行定义.

◆ GetDisplayPreview()

std::optional< std::vector< std::string > > Mirai::ForwardMessage::GetDisplayPreview ( ) const
inline

获取合并转发消息的内容预览,为空代表默认值

在文件 ForwardMessage.hpp94 行定义.

◆ GetDisplaySummary()

std::optional< std::string > Mirai::ForwardMessage::GetDisplaySummary ( ) const
inline

获取合并转发消息的内容总结("查看x条转发消息"),为空代表默认值

在文件 ForwardMessage.hpp100 行定义.

◆ SetDisplayTitle()

void Mirai::ForwardMessage::SetDisplayTitle ( std::string  title)
inline

设置合并转发消息的标题("xxx的聊天记录")

在文件 ForwardMessage.hpp107 行定义.

◆ SetDisplayBrief()

void Mirai::ForwardMessage::SetDisplayBrief ( std::string  brief)
inline

设置合并转发消息的简略信息("[聊天记录]")

在文件 ForwardMessage.hpp113 行定义.

◆ SetDisplaySource()

void Mirai::ForwardMessage::SetDisplaySource ( std::string  source)
inline

设置合并转发消息的来源显示("聊天记录")

在文件 ForwardMessage.hpp119 行定义.

◆ SetDisplayPreview()

void Mirai::ForwardMessage::SetDisplayPreview ( std::vector< std::string >  preview)
inline

设置合并转发消息的内容预览

在文件 ForwardMessage.hpp125 行定义.

◆ SetDisplaySummary()

void Mirai::ForwardMessage::SetDisplaySummary ( std::string  summary)
inline

设置合并转发消息的内容总结("查看x条转发消息")

在文件 ForwardMessage.hpp131 行定义.

◆ empty()

bool Mirai::ForwardMessage::empty ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp37 行定义.

◆ size()

ForwardMessage::size_type Mirai::ForwardMessage::size ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp41 行定义.

◆ reserve()

void Mirai::ForwardMessage::reserve ( size_type  new_cap)

STL-like interface

在文件 ForwardMessage.cpp45 行定义.

◆ shrink_to_fit()

void Mirai::ForwardMessage::shrink_to_fit ( )
noexcept

STL-like interface

在文件 ForwardMessage.cpp49 行定义.

◆ max_size()

ForwardMessage::size_type Mirai::ForwardMessage::max_size ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp53 行定义.

◆ capacity()

ForwardMessage::size_type Mirai::ForwardMessage::capacity ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp57 行定义.

◆ at() [1/2]

ForwardMessage::const_reference Mirai::ForwardMessage::at ( size_type  n) const

STL-like interface

在文件 ForwardMessage.cpp62 行定义.

◆ at() [2/2]

ForwardMessage::reference Mirai::ForwardMessage::at ( size_type  n)

STL-like interface

在文件 ForwardMessage.cpp66 行定义.

◆ operator[]() [1/2]

ForwardMessage::const_reference Mirai::ForwardMessage::operator[] ( size_type  n) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp70 行定义.

◆ operator[]() [2/2]

ForwardMessage::reference Mirai::ForwardMessage::operator[] ( size_type  n)
noexcept

STL-like interface

在文件 ForwardMessage.cpp74 行定义.

◆ back() [1/2]

ForwardMessage::const_reference Mirai::ForwardMessage::back ( ) const

STL-like interface

在文件 ForwardMessage.cpp78 行定义.

◆ back() [2/2]

ForwardMessage::reference Mirai::ForwardMessage::back ( )

STL-like interface

在文件 ForwardMessage.cpp82 行定义.

◆ front() [1/2]

ForwardMessage::const_reference Mirai::ForwardMessage::front ( ) const

STL-like interface

在文件 ForwardMessage.cpp86 行定义.

◆ front() [2/2]

ForwardMessage::reference Mirai::ForwardMessage::front ( )

STL-like interface

在文件 ForwardMessage.cpp90 行定义.

◆ clear()

void Mirai::ForwardMessage::clear ( )
noexcept

STL-like interface

在文件 ForwardMessage.cpp95 行定义.

◆ insert() [1/5]

ForwardMessage::iterator Mirai::ForwardMessage::insert ( const_iterator  pos,
const_reference  value 
)

STL-like interface

在文件 ForwardMessage.cpp99 行定义.

◆ insert() [2/5]

ForwardMessage::iterator Mirai::ForwardMessage::insert ( const_iterator  pos,
value_type &&  value 
)

STL-like interface

在文件 ForwardMessage.cpp103 行定义.

◆ insert() [3/5]

ForwardMessage::iterator Mirai::ForwardMessage::insert ( const_iterator  pos,
size_type  count,
const_reference  value 
)

STL-like interface

在文件 ForwardMessage.cpp107 行定义.

◆ insert() [4/5]

template<class InputIt >
iterator Mirai::ForwardMessage::insert ( const_iterator  pos,
InputIt  first,
InputIt  last 
)
inline

STL-like interface

在文件 ForwardMessage.hpp178 行定义.

◆ insert() [5/5]

ForwardMessage::iterator Mirai::ForwardMessage::insert ( const_iterator  pos,
std::initializer_list< value_type ilist 
)

STL-like interface

在文件 ForwardMessage.cpp111 行定义.

◆ emplace()

template<class... Args>
iterator Mirai::ForwardMessage::emplace ( const_iterator  pos,
Args &&...  args 
)
inline

STL-like interface

在文件 ForwardMessage.hpp183 行定义.

◆ erase() [1/2]

ForwardMessage::iterator Mirai::ForwardMessage::erase ( const_iterator  pos)

STL-like interface

在文件 ForwardMessage.cpp115 行定义.

◆ erase() [2/2]

ForwardMessage::iterator Mirai::ForwardMessage::erase ( const_iterator  first,
const_iterator  last 
)

STL-like interface

在文件 ForwardMessage.cpp119 行定义.

◆ push_back() [1/2]

void Mirai::ForwardMessage::push_back ( const_reference  node)

STL-like interface

在文件 ForwardMessage.cpp123 行定义.

◆ push_back() [2/2]

void Mirai::ForwardMessage::push_back ( value_type &&  node)

STL-like interface

在文件 ForwardMessage.cpp127 行定义.

◆ emplace_back()

template<class... Args>
reference Mirai::ForwardMessage::emplace_back ( Args &&...  args)
inline

STL-like interface

在文件 ForwardMessage.hpp191 行定义.

◆ pop_back()

void Mirai::ForwardMessage::pop_back ( )

STL-like interface

在文件 ForwardMessage.cpp131 行定义.

◆ resize() [1/2]

void Mirai::ForwardMessage::resize ( size_type  count)

STL-like interface

在文件 ForwardMessage.cpp135 行定义.

◆ resize() [2/2]

void Mirai::ForwardMessage::resize ( size_type  count,
const value_type value 
)

STL-like interface

在文件 ForwardMessage.cpp139 行定义.

◆ begin() [1/2]

ForwardMessage::iterator Mirai::ForwardMessage::begin ( )
noexcept

STL-like interface

在文件 ForwardMessage.cpp144 行定义.

◆ begin() [2/2]

ForwardMessage::const_iterator Mirai::ForwardMessage::begin ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp148 行定义.

◆ cbegin()

ForwardMessage::const_iterator Mirai::ForwardMessage::cbegin ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp152 行定义.

◆ end() [1/2]

ForwardMessage::iterator Mirai::ForwardMessage::end ( )
noexcept

STL-like interface

在文件 ForwardMessage.cpp156 行定义.

◆ end() [2/2]

ForwardMessage::const_iterator Mirai::ForwardMessage::end ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp160 行定义.

◆ cend()

ForwardMessage::const_iterator Mirai::ForwardMessage::cend ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp164 行定义.

◆ rbegin()

ForwardMessage::reverse_iterator Mirai::ForwardMessage::rbegin ( )
noexcept

STL-like interface

在文件 ForwardMessage.cpp168 行定义.

◆ crbegin()

ForwardMessage::const_reverse_iterator Mirai::ForwardMessage::crbegin ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp172 行定义.

◆ rend()

ForwardMessage::reverse_iterator Mirai::ForwardMessage::rend ( )
noexcept

STL-like interface

在文件 ForwardMessage.cpp176 行定义.

◆ crend()

ForwardMessage::const_reverse_iterator Mirai::ForwardMessage::crend ( ) const
noexcept

STL-like interface

在文件 ForwardMessage.cpp180 行定义.

类成员变量说明

◆ NodeList_

NodeList Mirai::ForwardMessage::NodeList_
protected

在文件 ForwardMessage.hpp54 行定义.

◆ title_

std::optional<std::string> Mirai::ForwardMessage::title_
protected

在文件 ForwardMessage.hpp56 行定义.

◆ brief_

std::optional<std::string> Mirai::ForwardMessage::brief_
protected

在文件 ForwardMessage.hpp57 行定义.

◆ source_

std::optional<std::string> Mirai::ForwardMessage::source_
protected

在文件 ForwardMessage.hpp58 行定义.

◆ preview_

std::optional<std::vector<std::string> > Mirai::ForwardMessage::preview_
protected

在文件 ForwardMessage.hpp59 行定义.

◆ summary_

std::optional<std::string> Mirai::ForwardMessage::summary_
protected

在文件 ForwardMessage.hpp60 行定义.

◆ TYPE_

constexpr MessageTypes Mirai::ForwardMessage::TYPE_ = MessageTypes::FORWARD
staticconstexprprotected

在文件 ForwardMessage.hpp62 行定义.

◆ SUPPORT_SEND_

constexpr bool Mirai::ForwardMessage::SUPPORT_SEND_ = true
staticconstexprprotected

在文件 ForwardMessage.hpp63 行定义.


该类的文档由以下文件生成: