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 bool 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-(const Value::Scalar& left, const Value::Scalar& right);
37 Value::Scalar& operator+=(Value::Scalar& left, const Value::Scalar& right);
38 Value::Scalar& operator-=(Value::Scalar& left, const Value::Scalar& right);
39 
40 std::ostream& operator<<(std::ostream& stream, const Value::Ranges& ranges);
41 bool operator==(const Value::Ranges& left, const Value::Ranges& right);
42 bool 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-(const Value::Ranges& left, const Value::Ranges& right);
45 Value::Ranges& operator+=(Value::Ranges& left, const Value::Ranges& right);
46 Value::Ranges& operator-=(Value::Ranges& left, const Value::Ranges& right);
47 
48 std::ostream& operator<<(std::ostream& stream, const Value::Set& set);
49 bool operator==(const Value::Set& left, const Value::Set& right);
50 bool 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-(const Value::Set& left, const Value::Set& right);
53 Value::Set& operator+=(Value::Set& left, const Value::Set& right);
54 Value::Set& operator-=(Value::Set& left, const Value::Set& right);
55 
56 std::ostream& operator<<(std::ostream& stream, const Value::Text& value);
57 bool operator==(const Value::Text& left, const Value::Text& right);
58 
59 namespace internal {
60 namespace values {
61 
62 Try<Value> parse(const std::string& text);
63 
64 } // namespace values {
65 } // namespace internal {
66 
67 } // namespace mesos {
68 
69 #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:356
Resources operator-(const google::protobuf::RepeatedPtrField< Resource > &left, const Resources &right)
Definition: resources.hpp:804
bool operator!=(const Resource::ReservationInfo &left, const Resource::ReservationInfo &right)
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