• Home
  • Raw
  • Download

Lines Matching full:std

48         Error(std::string msg, Type type) : msg_(std::move(msg)), type_(type) {}  in Error()
53 std::string GetMessage() const in GetMessage()
64 std::string msg_;
72 std::optional<Error> SetAttribute(const std::string_view &attribute) in SetAttribute()
84 void RemoveAttribute(const std::string &attribute) in RemoveAttribute()
91 bool GetAttribute(const std::string &attribute) const in GetAttribute()
96std::optional<Error> SetAttributeValue(const std::string_view &attribute, const std::string_view &… in SetAttributeValue()
108 std::vector<std::string> GetAttributeValues(const std::string &attribute) const in GetAttributeValues()
118 std::optional<std::string> GetAttributeValue(const std::string &attribute) const in GetAttributeValue()
128 const std::unordered_set<std::string> &GetBoolAttributes() const in GetBoolAttributes()
133 const std::unordered_map<std::string, std::vector<std::string>> &GetAttributes() const in GetAttributes()
138 virtual std::optional<Error> ValidateData() in ValidateData()
148 virtual std::optional<Error> Validate(const std::string_view &attribute) const = 0;
150 virtual std::optional<Error> Validate(const std::string_view &attribute,
151 const std::string_view &value) const = 0;
153 …virtual std::optional<Error> StoreValue(const std::string_view &attribute, const std::string_view … in StoreValue()
155 std::string key(attribute); in StoreValue()
158 std::tie(it, std::ignore) = attributes_.try_emplace(key); in StoreValue()
166 virtual std::optional<Error> Store(const std::string_view &attribute) in Store()
173 virtual void SetFlags(const std::string_view &attribute) = 0;
175 virtual void SetFlags(const std::string_view &attribute, const std::string_view &value) = 0;
177 virtual void RemoveFlags(const std::string_view &attribute) = 0;
179 virtual void RemoveFlags(const std::string_view &attribute, const std::string_view &value) = 0;
181 bool HasAttribute(const std::string_view &attribute) const in HasAttribute()
183 std::string key(attribute); in HasAttribute()
187 std::optional<Error> ValidateSize(const std::string_view &value) const;
190 std::unordered_set<std::string> set_attributes_;
191 std::unordered_map<std::string, std::vector<std::string>> attributes_;
196 const std::vector<AnnotationData> &GetAnnotations() const in GetAnnotations()
201 void SetAnnotations(std::vector<AnnotationData> &&annotations) in SetAnnotations()
203 annotations_ = std::forward<std::vector<AnnotationData>>(annotations); in SetAnnotations()
206 void AddAnnotations(const std::vector<AnnotationData> &annotations) in AddAnnotations()
211 void DeleteAnnotationByName(const std::string_view &annotation_name) in DeleteAnnotationByName()
213 auto annotation_iter = std::find_if(annotations_.begin(), annotations_.end(), in DeleteAnnotationByName()
225 … annotations_[anno_idx].SetOrAddElementByIndex(ele_idx, std::forward<AnnotationElement>(element)); in SetOrAddAnnotationElementByIndex()
228 std::optional<Error> ValidateData() override;
231 std::optional<Error> Store(const std::string_view &attribute) override;
233std::optional<Error> StoreValue(const std::string_view &attribute, const std::string_view &value) …
235 … virtual bool IsAnnotationRecordAttribute([[maybe_unused]] const std::string_view &attribute) const in IsAnnotationRecordAttribute()
240 virtual bool IsAnnotationIdAttribute([[maybe_unused]] const std::string_view &attribute) const in IsAnnotationIdAttribute()
245 …virtual bool IsAnnotationElementTypeAttribute([[maybe_unused]] const std::string_view &attribute) … in IsAnnotationElementTypeAttribute()
251 [[maybe_unused]] const std::string_view &attribute) const in IsAnnotationElementArrayComponentTypeAttribute()
256 …virtual bool IsAnnotationElementNameAttribute([[maybe_unused]] const std::string_view &attribute) … in IsAnnotationElementNameAttribute()
261 …virtual bool IsAnnotationElementValueAttribute([[maybe_unused]] const std::string_view &attribute)… in IsAnnotationElementValueAttribute()
269 void Initialize(const std::string_view &name) in Initialize()
295 std::optional<Error> AddValue(
296 const std::string_view &value,
297 … const std::unordered_map<std::string, std::unique_ptr<AnnotationData>> &annotation_id_map);
303std::make_unique<ArrayValue>(component_type_.value(), std::move(values_))); in CreateAnnotationElement()
306 return AnnotationElement(name_, std::make_unique<ScalarValue>(values_.front())); in CreateAnnotationElement()
348 std::string name_;
349 std::optional<Value::Type> type_;
350 std::optional<Value::Type> component_type_;
351 std::vector<ScalarValue> values_;
356 void Initialize(const std::string_view &name) in Initialize()
370 void SetId(const std::string_view &id) in SetId()
375 std::string GetId() const in GetId()
383 elements_.push_back(std::forward<AnnotationElement>(element)); in AddElement()
386 std::unique_ptr<AnnotationData> CreateAnnotationData() in CreateAnnotationData()
388 return std::make_unique<AnnotationData>(name_, std::move(elements_)); in CreateAnnotationData()
391 void AddAnnnotationDataToVector(std::vector<AnnotationData> *annotations) in AddAnnnotationDataToVector()
393 annotations->emplace_back(name_, std::move(elements_)); in AddAnnnotationDataToVector()
407 std::string name_;
408 std::optional<std::string> id_;
409 std::vector<AnnotationElement> elements_;
413 std::optional<Metadata::Error> MeetExpRecordAttribute(const std::string_view &attribute,
414 const std::string_view &value);
415std::optional<Metadata::Error> MeetExpIdAttribute(const std::string_view &attribute, const std::st…
416 std::optional<Metadata::Error> MeetExpElementNameAttribute(const std::string_view &attribute,
417 const std::string_view &value);
418 std::optional<Metadata::Error> MeetExpElementTypeAttribute(const std::string_view &attribute,
419 const std::string_view &value);
420std::optional<Metadata::Error> MeetExpElementArrayComponentTypeAttribute(const std::string_view &a…
421 … const std::string_view &value);
422 std::optional<Metadata::Error> MeetExpElementValueAttribute(const std::string_view &attribute,
423 const std::string_view &value);
425 void InitializeAnnotationBuilder(const std::string_view &name) in InitializeAnnotationBuilder()
456 void InitializeAnnotationElementBuilder(const std::string_view &name) in InitializeAnnotationElementBuilder()
482 std::vector<AnnotationData> annotations_;
483 std::unordered_map<std::string, std::unique_ptr<AnnotationData>> id_map_;
511 virtual std::string GetBase() const;
513 virtual std::vector<std::string> GetInterfaces() const;
524 std::optional<Error> Validate(const std::string_view &attribute) const override;
526std::optional<Error> Validate(const std::string_view &attribute, const std::string_view &value) co…
528 void SetFlags(const std::string_view &attribute) override;
530 void SetFlags(const std::string_view &attribute, const std::string_view &value) override;
532 void RemoveFlags(const std::string_view &attribute) override;
534 void RemoveFlags(const std::string_view &attribute, const std::string_view &value) override;
554 std::optional<ScalarValue> GetValue() const in GetValue()
560std::optional<Error> StoreValue(const std::string_view &attribute, const std::string_view &value) …
562 std::optional<Error> Validate(const std::string_view &attribute) const override;
564std::optional<Error> Validate(const std::string_view &attribute, const std::string_view &value) co…
566 void SetFlags(const std::string_view &attribute) override;
568 void SetFlags(const std::string_view &attribute, const std::string_view &value) override;
570 void RemoveFlags(const std::string_view &attribute) override;
572 void RemoveFlags(const std::string_view &attribute, const std::string_view &value) override;
574 virtual bool IsValueAttribute(const std::string_view &attribute) in IsValueAttribute()
581 std::optional<ScalarValue> value_;
591 std::optional<Error> Validate(const std::string_view &attribute) const override;
593std::optional<Error> Validate(const std::string_view &attribute, const std::string_view &value) co…
595 void SetFlags(const std::string_view &attribute) override;
597 void SetFlags(const std::string_view &attribute, const std::string_view &value) override;
599 void RemoveFlags(const std::string_view &attribute) override;
601 void RemoveFlags(const std::string_view &attribute, const std::string_view &value) override;
606 std::optional<Error> Validate(const std::string_view &attribute) const override;
608std::optional<Error> Validate(const std::string_view &attribute, const std::string_view &value) co…
610 void SetFlags(const std::string_view &attribute) override;
612 void SetFlags(const std::string_view &attribute, const std::string_view &value) override;
614 void RemoveFlags(const std::string_view &attribute) override;
616 void RemoveFlags(const std::string_view &attribute, const std::string_view &value) override;