trust-store
2.0.0
Provides a common implementation of a trust store to be used by trusted helpers.
|
Go to the documentation of this file.
19 #ifndef CORE_TRUST_TAGGED_INTEGER_H_
20 #define CORE_TRUST_TAGGED_INTEGER_H_
25 #include <type_traits>
27 #include <sys/types.h>
34 template<
typename Tag,
typename Integer>
38 static_assert(std::is_integral<Integer>::value,
"Integer has to be an integral type");
60 template<
typename Tag,
typename Integer>
67 template<
typename Tag,
typename Integer>
74 template<
typename Tag,
typename Integer>
81 template<
typename Tag,
typename Integer>
84 return out << ti.
value;
110 #endif // CORE_TRUST_TAGGED_INTEGER_H_
bool operator<(const TaggedInteger< Tag, Integer > &lhs, const TaggedInteger< Tag, Integer > &rhs)
Returns true iff the left-hand-side integer instance is smaller than the right-hand-side.
Helper structure for tagging integer types with certain semantics.
TaggedInteger< tag::Uid, uid_t > Uid
Our internal user id type.
TaggedInteger(Integer value)
Construct an instance from an existing integer type.
CORE_TRUST_DLL_PUBLIC std::ostream & operator<<(std::ostream &out, const Request::Answer &a)
operator << pretty prints answers to the provided output stream.
Tag TagType
We bail out if the Integral type is not an integral one.
bool operator!=(const TaggedInteger< Tag, Integer > &lhs, const TaggedInteger< Tag, Integer > &rhs)
Returns true iff both tagged integer instances are not equal.
TaggedInteger< tag::Pid, pid_t > Pid
Our internal process id type.
Integer IntegerType
Stores the Integer type.
Integer value
The contained integer value.
CORE_TRUST_DLL_PUBLIC bool operator==(const Agent::RequestParameters &lhs, const Agent::RequestParameters &rhs)
Returns true iff lhs and rhs are equal.
TaggedInteger()
Construct an instance with a default value.
TaggedInteger< tag::Gid, gid_t > Gid
Our internal group id type.
TaggedInteger< tag::Feature, std::uint64_t > Feature
Our internal service-feature type.