Lines Matching refs:e_
23 EnumGen::EnumGen(EnumDef e) : e_(std::move(e)) {} in EnumGen()
27 stream << e_.name_; in GenDefinition()
28 stream << " : " << util::GetTypeForSize(e_.size_); in GenDefinition()
30 for (const auto& pair : e_.constants_) { in GenDefinition()
37 stream << "py::enum_<" << e_.name_ << ">(m, \"" << e_.name_ << "\")"; in GenDefinitionPybind11()
38 for (const auto& pair : e_.constants_) { in GenDefinitionPybind11()
39 stream << ".value(\"" << pair.second << "\", " << e_.name_ << "::" << pair.second << ")"; in GenDefinitionPybind11()
46 stream << "inline std::string " << e_.name_ << "Text(const " << e_.name_ << "& param) {"; in GenLogging()
48 for (const auto& pair : e_.constants_) { in GenLogging()
49 stream << "case " << e_.name_ << "::" << pair.second << ":"; in GenLogging()
53 …stream << " return std::string(\"Unknown " << e_.name_ << ": \") + std::to_string(static_cast<int… in GenLogging()
58 stream << "inline std::ostream& operator<<(std::ostream& os, const " << e_.name_ << "& param) {"; in GenLogging()
59 stream << " return os << " << e_.name_ << "Text(param);"; in GenLogging()
65 stream << "pub enum " << e_.name_ << " {"; in GenRustDef()
66 for (const auto& pair : e_.constants_) { in GenRustDef()
71 if (e_.try_from_enum_ != nullptr) { in GenRustDef()
73 for (const auto& pair : e_.try_from_enum_->constants_) { in GenRustDef()
76 stream << "impl TryFrom<" << e_.try_from_enum_->name_ << "> for " << e_.name_ << " {"; in GenRustDef()
78 …stream << "fn try_from(value: " << e_.try_from_enum_->name_ << ") -> std::result::Result<Self, Sel… in GenRustDef()
80 for (const auto& pair : e_.constants_) { in GenRustDef()
85 …stream << e_.try_from_enum_->name_ << "::" << constant_name << " => Ok(" << e_.name_ << "::" << co… in GenRustDef()