20 std::vector<Arg> m_arguments;
23 inline Algorithm(std::string&& name, std::vector<Arg>&& args):
24 m_name(
std::move(name)),
25 m_arguments(
std::move(args)) {}
26 inline Algorithm(
const Algorithm& other):
28 m_arguments(other.m_arguments) {}
30 inline std::string& name() {
33 inline const std::string& name()
const {
36 inline std::vector<Arg>& arguments() {
39 inline const std::vector<Arg>& arguments()
const {
42 inline std::string
to_string(
bool omit_keyword =
false)
const;
46 Algorithm m_algorithm;
48 inline Arg(std::string&& name, Algorithm&& alg):
49 m_name(
std::move(name)),
50 m_algorithm(
std::move(alg)) {}
51 inline std::string& name() {
54 inline const std::string& name()
const {
57 inline Algorithm& algorithm() {
60 inline const Algorithm& algorithm()
const {
63 inline std::string
to_string(
bool omit_keyword =
false)
const;
66 inline std::ostream&
operator<<(std::ostream& os,
71 inline std::ostream&
operator<<(std::ostream& os,
80 if (arguments().size() > 0) {
83 for (
auto& a: arguments()) {
87 ss << a.to_string(omit_keyword);
98 ss << algorithm().to_string(omit_keyword);
100 ss << name() <<
" = " << algorithm().to_string(omit_keyword);
105 inline bool operator==(
const Algorithm &lhs,
const Algorithm &rhs);
106 inline bool operator<(
const Algorithm &lhs,
const Algorithm &rhs);
107 inline bool operator==(
const Arg &lhs,
const Arg &rhs);
108 inline bool operator<(
const Arg &lhs,
const Arg &rhs);
110 inline bool operator!=(
const Algorithm &lhs,
const Algorithm &rhs) {
111 return !(lhs == rhs);
113 inline bool operator!=(
const Arg &lhs,
const Arg &rhs) {
114 return !(lhs == rhs);
117 inline bool operator==(
const Algorithm &lhs,
const Algorithm &rhs) {
118 if (lhs.name() != rhs.name())
return false;
119 if (lhs.arguments() != rhs.arguments())
return false;
122 inline bool operator<(
const Algorithm &lhs,
const Algorithm &rhs) {
123 if (lhs.name() != rhs.name())
return lhs.name() < rhs.name();
124 if (lhs.arguments() != rhs.arguments())
return lhs.arguments() < rhs.arguments();
127 inline bool operator==(
const Arg &lhs,
const Arg &rhs) {
128 if (lhs.name() != rhs.name())
return false;
129 if (lhs.algorithm() != rhs.algorithm())
return false;
132 inline bool operator<(
const Arg &lhs,
const Arg &rhs) {
133 if (lhs.name() != rhs.name())
return lhs.name() < rhs.name();
134 if (lhs.algorithm() != rhs.algorithm())
return lhs.algorithm() < rhs.algorithm();
bool operator<(const ConstGenericView< uliteral_t > &lhs, const ConstGenericView< uliteral_t > &rhs)
bool operator!=(const ConstGenericView< uliteral_t > &lhs, const ConstGenericView< uliteral_t > &rhs)
Contains the text compression and encoding framework.
std::ostream & operator<<(std::ostream &os, const uint_impl_t< N > &v)
bool operator==(const ConstGenericView< uliteral_t > &lhs, const ConstGenericView< uliteral_t > &rhs)
std::string to_string(tdc::uint_impl_t< N > value)