17 #ifndef __ATTRIBUTES_HPP__ 18 #define __ATTRIBUTES_HPP__ 29 std::ostream&
operator<<(std::ostream& stream,
const Attribute& attribute);
38 Attributes(
const google::protobuf::RepeatedPtrField<Attribute>& _attributes)
40 attributes.MergeFrom(_attributes);
46 attributes.MergeFrom(that.attributes);
53 attributes.MergeFrom(that.attributes);
64 return !(*
this == that);
69 return attributes.size();
74 operator const google::protobuf::RepeatedPtrField<Attribute>&()
const 79 void add(
const Attribute& attribute)
81 attributes.Add()->MergeFrom(attribute);
84 const Attribute
get(
int index)
const 86 return attributes.Get(
index);
94 T
get(
const std::string&
name,
const T& t)
const;
98 bool contains(
const Attribute& attribute)
const;
100 typedef google::protobuf::RepeatedPtrField<Attribute>::iterator
103 typedef google::protobuf::RepeatedPtrField<Attribute>::const_iterator
112 static Attribute
parse(
const std::string& name,
const std::string& value);
115 static bool isValid(
const Attribute& attribute);
118 google::protobuf::RepeatedPtrField<Attribute> attributes;
123 #endif // __ATTRIBUTES_HPP__ std::ostream & operator<<(std::ostream &stream, const Attribute &attribute)
size_t size() const
Definition: attributes.hpp:67
Definition: option.hpp:29
const_iterator begin() const
Definition: attributes.hpp:109
bool contains(const Attribute &attribute) const
iterator begin()
Definition: attributes.hpp:106
google::protobuf::RepeatedPtrField< Attribute >::iterator iterator
Definition: attributes.hpp:101
static bool isValid(const Attribute &attribute)
google::protobuf::RepeatedPtrField< Attribute >::const_iterator const_iterator
Definition: attributes.hpp:104
Result< int > index(const std::string &link)
const_iterator end() const
Definition: attributes.hpp:110
void add(const Attribute &attribute)
Definition: attributes.hpp:79
bool operator==(const Attributes &that) const
Attributes(const google::protobuf::RepeatedPtrField< Attribute > &_attributes)
Definition: attributes.hpp:38
static Attribute parse(const std::string &name, const std::string &value)
bool operator!=(const Attributes &that) const
Definition: attributes.hpp:62
iterator end()
Definition: attributes.hpp:107
Attributes & operator=(const Attributes &that)
Definition: attributes.hpp:49
Attributes(const Attributes &that)
Definition: attributes.hpp:44
constexpr const char * name
Definition: shell.hpp:41
Attributes()
Definition: attributes.hpp:35
Definition: attributes.hpp:32