#include "rtc_base/experiments/struct_parameters_parser.h"
#include <algorithm>
#include "absl/strings/string_view.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
size_t FindOrEnd(absl::string_view str, size_t start, char delimiter) { … }
}
namespace struct_parser_impl {
namespace {
inline void StringEncode(std::string* target, bool val) { … }
inline void StringEncode(std::string* target, double val) { … }
inline void StringEncode(std::string* target, int val) { … }
inline void StringEncode(std::string* target, unsigned val) { … }
inline void StringEncode(std::string* target, DataRate val) { … }
inline void StringEncode(std::string* target, DataSize val) { … }
inline void StringEncode(std::string* target, TimeDelta val) { … }
template <typename T>
inline void StringEncode(std::string* sb, absl::optional<T> val) { … }
}
template <typename T>
bool TypedParser<T>::Parse(absl::string_view src, void* target) { … }
template <typename T>
void TypedParser<T>::Encode(const void* src, std::string* target) { … }
template class TypedParser<bool>;
template class TypedParser<double>;
template class TypedParser<int>;
template class TypedParser<unsigned>;
template class TypedParser<absl::optional<double>>;
template class TypedParser<absl::optional<int>>;
template class TypedParser<absl::optional<unsigned>>;
template class TypedParser<DataRate>;
template class TypedParser<DataSize>;
template class TypedParser<TimeDelta>;
template class TypedParser<absl::optional<DataRate>>;
template class TypedParser<absl::optional<DataSize>>;
template class TypedParser<absl::optional<TimeDelta>>;
}
StructParametersParser::StructParametersParser(
std::vector<struct_parser_impl::MemberParameter> members)
: … { … }
void StructParametersParser::Parse(absl::string_view src) { … }
std::string StructParametersParser::Encode() const { … }
}