17 #ifndef __MESOS_V1_ATTRIBUTES_HPP__ 18 #define __MESOS_V1_ATTRIBUTES_HPP__ 30 std::ostream&
operator<<(std::ostream& stream,
const Attribute& attribute);
39 Attributes(
const google::protobuf::RepeatedPtrField<Attribute>& _attributes)
41 attributes.MergeFrom(_attributes);
47 attributes.MergeFrom(that.attributes);
54 attributes.MergeFrom(that.attributes);
65 return !(*
this == that);
70 return attributes.size();
75 operator const google::protobuf::RepeatedPtrField<Attribute>&()
const 80 void add(
const Attribute& attribute)
82 attributes.Add()->MergeFrom(attribute);
85 const Attribute
get(
int index)
const 87 return attributes.Get(
index);
95 T
get(
const std::string&
name,
const T& t)
const;
99 bool contains(
const Attribute& attribute)
const;
101 typedef google::protobuf::RepeatedPtrField<Attribute>::iterator
104 typedef google::protobuf::RepeatedPtrField<Attribute>::const_iterator
113 static Attribute
parse(
const std::string& name,
const std::string& value);
116 static bool isValid(
const Attribute& attribute);
119 google::protobuf::RepeatedPtrField<Attribute> attributes;
125 #endif // __MESOS_V1_ATTRIBUTES_HPP__ Definition: option.hpp:29
Attributes()
Definition: attributes.hpp:36
Attributes & operator=(const Attributes &that)
Definition: attributes.hpp:50
void add(const Attribute &attribute)
Definition: attributes.hpp:80
iterator end()
Definition: attributes.hpp:108
google::protobuf::RepeatedPtrField< Attribute >::const_iterator const_iterator
Definition: attributes.hpp:105
bool contains(const Attribute &attribute) const
google::protobuf::RepeatedPtrField< Attribute >::iterator iterator
Definition: attributes.hpp:102
Result< int > index(const std::string &link)
size_t size() const
Definition: attributes.hpp:68
const_iterator end() const
Definition: attributes.hpp:111
static bool isValid(const Attribute &attribute)
bool operator==(const Attributes &that) const
Attributes(const Attributes &that)
Definition: attributes.hpp:45
static Attribute parse(const std::string &name, const std::string &value)
const_iterator begin() const
Definition: attributes.hpp:110
iterator begin()
Definition: attributes.hpp:107
Attributes(const google::protobuf::RepeatedPtrField< Attribute > &_attributes)
Definition: attributes.hpp:39
bool operator!=(const Attributes &that) const
Definition: attributes.hpp:63
std::ostream & operator<<(std::ostream &stream, const Attribute &attribute)
constexpr const char * name
Definition: shell.hpp:41
Definition: attributes.hpp:33