msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Beast Translation "
"(zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-24 22:48+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified Han script) <https://"
"insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/"
"doc-qbk-07-concepts-buffersgenerator-qbk/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2026.5\n"

#. type: section title
#: 10
msgid "BuffersGenerator"
msgstr "缓冲区生成器"

#. type: paragraph
#: 12
msgid ""
"A [*BuffersGenerator] provides a generalized interface for generating "
"serialized data for sequential processing."
msgstr "[*缓冲区生成器] 用于提供通用接口，以生成用于顺序处理的序列化数据。"

#. type: paragraph
#: 15
msgid ""
"The generator will be asked to produce buffers. The consuming code will "
"signal how much of the data has been consumed, and repeatedly query for "
"buffers until no more data is available, or the generator indicates an error "
"condition."
msgstr ""
"该生成器将被要求生成缓冲区。调用方代码用于指示已消费的数据量，并重复查询缓冲"
"区，直到无更多数据可用，或该生成器指示错误条件为止。"

#. type: paragraph
#: 19
msgid ""
"In this way, serializers can be adapted as [*BuffersGenerator], for example "
"[link beast.ref.boost__beast__http__message_generator "
"`http::message_generator`] which provides a type-erased interface for a "
"variety of concrete http message types."
msgstr ""
"通过这种方式，序列化器可适配为[*缓冲区生成器]，例如[link "
"beast.ref.boost__beast__http__message_generator `http::message_generator`] 用"
"于为多种具体 HTTP 消息类型提供类型擦除接口。"

#. type: paragraph
#: 24
msgid ""
"Overloads of [link beast.ref.boost__beast__write `write`] and [link "
"beast.ref.boost__beast__async_write `async_write`] operations are provided "
"as free functions. These operations will consume the output of a "
"[*BuffersGenerator] and process the data by writing them to a "
"__SyncWriteStream__ or __AsyncWriteStream__ respectively."
msgstr ""
"[link beast.ref.boost__beast__write write] 与 [link "
"beast.ref.boost__beast__async_write async_write] 操作以自由函数形式提供重载。"
"这些操作用于调用 [*缓冲区生成器] 的输出，并分别将数据写入 SyncWriteStream 或 "
"AsyncWriteStream 进行处理。"

#. type: heading
#: 30
msgid "Associated Types"
msgstr "关联类型"

#. type: list
#: 32
msgid ""
"* [link beast.ref.boost__beast__is_buffers_generator "
"`is_buffers_generator`]\n"
"* __ConstBufferSequence__"
msgstr ""
"* [link beast.ref.boost__beast__is_buffers_generator "
"`is_buffers_generator`]\n"
"* __ConstBufferSequence__"

#. type: heading
#: 35
msgid "Requirements"
msgstr "要求"

#. type: paragraph
#: 37
msgid "In this table:"
msgstr "在下表中:"

#. type: list
#: 39
msgid ""
"* `G` denotes a type meeting the requirements of [*BuffersGenerator].\n"
"* `g` denotes a value of type `G`.\n"
"* `c` denotes a possibly-const value of type `G`.\n"
"* `n` is a value of type `std::size_t`.\n"
"* `ec` is a value of type [link beast.ref.boost__beast__error_code "
"`error_code&`]."
msgstr ""
"- `G` 用于表示满足 [*缓冲区生成器] 要求的类型。\n"
"- `g` 用于表示类型 `G` 的值。\n"
"- `c` 用于表示类型 `G` 的可能为 const 的值。\n"
"- `n` 是类型 `std::size_t` 的值。\n"
"- `ec` 是类型 [link beast.ref.boost__beast__error_code `error_code&`] 的值。"

#. type: table title
#: 45
msgid "Valid expressions"
msgstr "有效表达式"

#. type: table cell
#: 45
msgid "Expression"
msgstr "表达式"

#. type: table cell
#: 45
msgid "Type"
msgstr "类型"

#. type: table cell
#: 45
msgid "Semantics, Pre/Post-conditions"
msgstr "语义、前置/后置条件"

#. type: table cell
#.
#: 45
msgctxt "45"
msgid "`G::const_buffers_type`"
msgstr ""

#. type: table cell
#: 45
msgid ""
"A type which meets the requirements of __ConstBufferSequence__. This is the "
"type of buffer returned by `g.prepare(ec)`."
msgstr ""
"满足 __ConstBufferSequence__ 要求的类型。该类型用于表示 `g.prepare(ec)` 所返"
"回的缓冲区类型。"

#. type: table cell
#: 45
msgid "`c.is_done()`"
msgstr "`c.is_done()`"

#. type: table cell
#: 45
msgid "`bool`"
msgstr "`bool`（布尔值）"

#. type: table cell
#: 45
msgid ""
"Called to ask the generator for its completion status.\n"
"\n"
"A generator has completed when no new buffer will be produced and previously "
"produced buffers have been fully consumed.\n"
"\n"
"[*Note:] The result of invoking `prepare` on `g` once it has completed is "
"unspecified."
msgstr ""
"调用此函数以向生成器（generator）查询其完成状态。\n"
"\n"
"当生成器不再产生新的缓冲区，且之前已产生的缓冲区已被完全消费时，即表示生成器"
"已完成。\n"
"\n"
"[*注意：] 在生成器 g 完成后，对其调用 prepare 的结果是未定义的（unspecified）"
"。"

#. type: table cell
#: 45
msgid "`g.prepare(ec)`"
msgstr "`g.prepare(ec)`"

#. type: table cell
#: 45
msgid ""
"Called to ask the generator to produce buffers containing data for "
"processing.\n"
"\n"
"The returned value is the __ConstBufferSequence__ representing unconsumed "
"data.\n"
"\n"
"The function will ensure that `ec.failed()` is `false` if there was no error "
"or set to the appropriate error code if there was one.\n"
"\n"
"If no unconsumed data is available, this operation shall make progress to "
"eventually reach completion.\n"
"\n"
"The result of invoking `prepare` after completion or encountered error(s) is "
"defined by the generator implementation. It can not be assumed to be "
"meaningful or safe to do so, in general.\n"
"\n"
"The capacity of the buffer returned is defined by the generator "
"implementation.\n"
"\n"
"[*Note:] Any buffers obtained by previous calls to `prepare` are invalidated."
msgstr ""
"调用此函数以请求生成器生成包含待处理数据的缓冲区。\n"
"\n"
"返回值为代表未消费数据的 ConstBufferSequence。\n"
"\n"
"如果未发生错误，该函数将确保 ec.failed() 为 false；如果发生了错误，则将其设置"
"为相应的错误码。\n"
"\n"
"如果没有可用的未消费数据，此操作应取得进展，以最终达到完成状态。\n"
"\n"
"在完成或遇到错误后调用‘prepare’的结果由生成器实现定义。通常情况下，不能假定这"
"种调用具有意义或是安全的。\n"
"\n"
"返回缓冲区的容量由生成器实现定义。\n"
"\n"
"[*注意：] 此前调用‘prepare’所获得的任何缓冲区均会失效。"

#. type: table cell
#: 45
msgid "`g.consume(n)`"
msgstr "`g.consume(n)`"

#. type: table cell
#: 45
msgid ""
"This function is called to signal that the consumer (caller) of the "
"generator has processed part of the data returned by the previous call to "
"`prepare`.\n"
"\n"
"The value of `n` indicates how much of the data processed (in bytes).\n"
"\n"
"When `n` exceeds the number of bytes returned from the last call to "
"`prepare`, `consume` shall behave as if `n` was equal to that number.\n"
"\n"
"Remaining unconsumed data will be returned from subsequent calls to "
"`prepare`.\n"
"\n"
"[*Note:] Any buffers obtained by previous calls to `prepare` are invalidated."
msgstr ""
"调用此函数以向生成器发出信号，表明生成器的消费者（调用者）已处理了上一次调用‘"
"prepare’所返回的部分数据。\n"
"\n"
"n 的值表示已处理的数据量（以字节为单位）。\n"
"\n"
"当 n 超过上一次调用‘prepare’返回的字节数时，‘consume’ 的行为应如同 n 等于该字"
"节数一样。\n"
"\n"
"剩余的未消费数据将在后续调用‘prepare’时返回。\n"
"\n"
"[*注意：] 此前调用‘prepare’所获得的任何缓冲区均会失效。"

#. type: table cell
#: 45
msgid "`is_buffers_generator<G>`"
msgstr "`is_buffers_generator<G>`"

#. type: table cell
#: 45
msgid "`std::bool_constant`"
msgstr "`std::bool_constant`"

#. type: table cell
#: 45
msgid ""
"An alias for `std::true_type` for `G`, otherwise an alias for "
"`std::false_type`."
msgstr "如果 G 满足条件，则为 std::true_type 的别名，否则为 std::false_type 的别名。"

#. type: heading
#: 120
msgid "Exemplar"
msgstr "示例"

#. type: paragraph
#: 122
msgctxt "122"
msgid "```"
msgstr "```"

#. type: paragraph
#: 135
msgctxt "135"
msgid "```"
msgstr "```"

#. type: heading
#: 137
msgid "Models"
msgstr "模型"

#. type: list
#: 139
msgid ""
"* [link beast.ref.boost__beast__http__message_generator "
"`http::message_generator`]"
msgstr ""
"* [link beast.ref.boost__beast__http__message_generator "
"`http::message_generator`]"

#. type: heading
#: 141
msgid "Algorithms"
msgstr "算法"

#. type: list
#: 143
msgid ""
"* [link beast.ref.boost__beast__async_write `async_write`]\n"
"* [link beast.ref.boost__beast__write `write`]"
msgstr ""
"* [link beast.ref.boost__beast__async_write `async_write`]\n"
"* [link beast.ref.boost__beast__write `write`]"
