9 eosio::check(registry_id == expected_registry_id,
"Передан неверный шаблон документа");
27 docs.push_back({name, doc});
38 for (
const auto& nd : docs) {
39 if (nd.name == name) {
40 found_doc = nd.document;
53 inline bool has_document(
const std::vector<named_document>& docs,
const name& name) {
54 for (
const auto& nd : docs) {
55 if (nd.name == name) {
Definition: shared_document.hpp:1
bool has_document(const std::vector< named_document > &docs, const name &name)
Проверить наличие документа
Definition: shared_document.hpp:53
void add_document(std::vector< named_document > &docs, const name &name, const document2 &doc)
Добавить документ с проверкой длины имени
Definition: shared_document.hpp:26
void validate_registry_id(document2 document, uint64_t expected_registry_id)
Проверяет, что переданный документ соответствует ожидаемому шаблону
Definition: shared_document.hpp:7
bool find_document(const std::vector< named_document > &docs, const name &name, document2 &found_doc)
Найти документ по имени
Definition: shared_document.hpp:37
Структура именованного документа
Definition: shared_document.hpp:15
name name
Definition: shared_document.hpp:16
document2 document
Definition: shared_document.hpp:17
Definition: drafts.hpp:28
std::string meta
Definition: drafts.hpp:15
uint64_t extract_registry_id_from_meta(const std::string &meta_json)
Definition: utils.hpp:73