Apache Mesos
values.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __VALUES_HPP__
18 #define __VALUES_HPP__
19 
20 #include <iosfwd>
21 
22 #include <mesos/mesos.hpp>
23 
24 #include <stout/try.hpp>
25 
26 namespace mesos {
27 
28 std::ostream& operator<<(std::ostream& stream, const Value::Scalar& scalar);
29 bool operator==(const Value::Scalar& left, const Value::Scalar& right);
30 bool operator<(const Value::Scalar& left, const Value::Scalar& right);
31 bool operator<=(const Value::Scalar& left, const Value::Scalar& right);
32 bool operator>(const Value::Scalar& left, const Value::Scalar& right);
33 bool operator>=(const Value::Scalar& left, const Value::Scalar& right);
34 Value::Scalar operator+(const Value::Scalar& left, const Value::Scalar& right);
35 Value::Scalar operator-(const Value::Scalar& left, const Value::Scalar& right);
36 Value::Scalar& operator+=(Value::Scalar& left, const Value::Scalar& right);
37 Value::Scalar& operator-=(Value::Scalar& left, const Value::Scalar& right);
38 
39 std::ostream& operator<<(std::ostream& stream, const Value::Ranges& ranges);
40 bool operator==(const Value::Ranges& left, const Value::Ranges& right);
41 bool operator<=(const Value::Ranges& left, const Value::Ranges& right);
42 Value::Ranges operator+(const Value::Ranges& left, const Value::Ranges& right);
43 Value::Ranges operator-(const Value::Ranges& left, const Value::Ranges& right);
44 Value::Ranges& operator+=(Value::Ranges& left, const Value::Ranges& right);
45 Value::Ranges& operator-=(Value::Ranges& left, const Value::Ranges& right);
46 
47 std::ostream& operator<<(std::ostream& stream, const Value::Set& set);
48 bool operator==(const Value::Set& left, const Value::Set& right);
49 bool operator<=(const Value::Set& left, const Value::Set& right);
50 Value::Set operator+(const Value::Set& left, const Value::Set& right);
51 Value::Set operator-(const Value::Set& left, const Value::Set& right);
52 Value::Set& operator+=(Value::Set& left, const Value::Set& right);
53 Value::Set& operator-=(Value::Set& left, const Value::Set& right);
54 
55 std::ostream& operator<<(std::ostream& stream, const Value::Text& value);
56 bool operator==(const Value::Text& left, const Value::Text& right);
57 
58 namespace internal {
59 namespace values {
60 
61 Try<Value> parse(const std::string& text);
62 
63 } // namespace values {
64 } // namespace internal {
65 
66 } // namespace mesos {
67 
68 #endif // __VALUES_HPP__
std::ostream & operator<<(std::ostream &stream, const Attribute &attribute)
Definition: check.hpp:33
bool operator>=(const Value::Scalar &left, const Value::Scalar &right)
bool operator==(const Resource::ReservationInfo &left, const Resource::ReservationInfo &right)
bool operator<=(const Value::Scalar &left, const Value::Scalar &right)
bool operator<(const ContainerID &left, const ContainerID &right)
Definition: type_utils.hpp:335
Resources operator-(const google::protobuf::RepeatedPtrField< Resource > &left, const Resources &right)
Definition: resources.hpp:804
Try< Value > parse(const std::string &text)
Returns the OCI v1 descriptor, image index, image manifest and image configuration from the given str...
Definition: parse.hpp:36
Definition: agent.hpp:25
Value::Scalar & operator-=(Value::Scalar &left, const Value::Scalar &right)
bool operator>(const Value::Scalar &left, const Value::Scalar &right)
Resources operator+(const google::protobuf::RepeatedPtrField< Resource > &left, const Resources &right)
Definition: resources.hpp:796
Definition: attributes.hpp:24
hashmap< Key, Resources > & operator+=(hashmap< Key, Resources > &left, const hashmap< Key, Resources > &right)
Definition: resources.hpp:821