cpp-mirai-client  v2.6.1
cpp client for mirai-api-http
ForwardMessage.cpp
浏览该文件的文档.
1// Copyright (C) 2022 Numendacil and contributors
2//
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU Affero General Public License as
5// published by the Free Software Foundation, either version 3 of the
6// License, or (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU Affero General Public License for more details.
12//
13// You should have received a copy of the GNU Affero General Public License
14// along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16#include "ForwardMessage.hpp"
17
19
20namespace Mirai
21{
22
24ForwardMessage::ForwardMessage(const ForwardMessage&) = default;
25ForwardMessage& ForwardMessage::operator= (const ForwardMessage&) = default;
26ForwardMessage::ForwardMessage(ForwardMessage&&) = default;
27ForwardMessage& ForwardMessage::operator= (ForwardMessage&&) = default;
29
31{
32 for (const auto& n : this->NodeList_)
33 if (!n.valid()) return false;
34 return true;
35}
36
37bool ForwardMessage::empty() const noexcept
38{
39 return this->NodeList_.empty();
40}
42{
43 return this->NodeList_.size();
44}
46{
47 return this->NodeList_.reserve(new_cap);
48}
50{
51 return this->NodeList_.shrink_to_fit();
52}
54{
55 return this->NodeList_.max_size();
56}
58{
59 return this->NodeList_.capacity();
60}
61
63{
64 return this->NodeList_.at(n);
65}
67{
68 return this->NodeList_.at(n);
69}
71{
72 return this->NodeList_[n];
73}
75{
76 return this->NodeList_[n];
77}
79{
80 return this->NodeList_.back();
81}
83{
84 return this->NodeList_.back();
85}
87{
88 return this->NodeList_.front();
89}
91{
92 return this->NodeList_.front();
93}
94
95void ForwardMessage::clear() noexcept
96{
97 return this->NodeList_.clear();
98}
100{
101 return this->NodeList_.insert(pos, value);
102}
104{
105 return this->NodeList_.insert(pos, std::move(value));
106}
108{
109 return this->NodeList_.insert(pos, count, value);
110}
111ForwardMessage::iterator ForwardMessage::insert(const_iterator pos, std::initializer_list<value_type> ilist)
112{
113 return this->NodeList_.insert(pos, ilist);
114}
116{
117 return this->NodeList_.erase(pos);
118}
120{
121 return this->NodeList_.erase(first, last);
122}
124{
125 return this->NodeList_.push_back(node);
126}
128{
129 return this->NodeList_.push_back(std::move(node));
130}
132{
133 return this->NodeList_.pop_back();
134}
136{
137 return this->NodeList_.resize(count);
138}
140{
141 return this->NodeList_.resize(count, value);
142}
143
145{
146 return this->NodeList_.begin();
147}
149{
150 return this->NodeList_.begin();
151}
153{
154 return this->NodeList_.cbegin();
155}
157{
158 return this->NodeList_.end();
159}
161{
162 return this->NodeList_.end();
163}
165{
166 return this->NodeList_.cend();
167}
169{
170 return this->NodeList_.rbegin();
171}
173{
174 return this->NodeList_.crbegin();
175}
177{
178 return this->NodeList_.rend();
179}
181{
182 return this->NodeList_.crend();
183}
184
185} // namespace Mirai
size_type size() const noexcept
STL-like interface
NodeList::const_reference const_reference
STL-like interface
size_type capacity() const noexcept
STL-like interface
iterator insert(const_iterator pos, const_reference value)
STL-like interface
iterator begin() noexcept
STL-like interface
void pop_back()
STL-like interface
const_iterator cend() const noexcept
STL-like interface
void push_back(const_reference node)
STL-like interface
reverse_iterator rend() noexcept
STL-like interface
void shrink_to_fit() noexcept
STL-like interface
NodeList::iterator iterator
STL-like interface
bool empty() const noexcept
STL-like interface
const_reverse_iterator crbegin() const noexcept
STL-like interface
void resize(size_type count)
STL-like interface
const_reference front() const
STL-like interface
const_reference at(size_type n) const
STL-like interface
size_type max_size() const noexcept
STL-like interface
iterator erase(const_iterator pos)
STL-like interface
const_iterator cbegin() const noexcept
STL-like interface
const_reference operator[](size_type n) const noexcept
STL-like interface
ForwardMessage & operator=(const ForwardMessage &)
bool isValid_() const final
NodeList::const_iterator const_iterator
STL-like interface
void reserve(size_type new_cap)
STL-like interface
NodeList::value_type value_type
STL-like interface
NodeList::size_type size_type
STL-like interface
NodeList::reverse_iterator reverse_iterator
STL-like interface
reverse_iterator rbegin() noexcept
STL-like interface
const_reference back() const
STL-like interface
void clear() noexcept
STL-like interface
const_reverse_iterator crend() const noexcept
STL-like interface
iterator end() noexcept
STL-like interface
NodeList::reference reference
STL-like interface
NodeList::const_reverse_iterator const_reverse_iterator
STL-like interface
所有mirai相关的对象的命名空间