Lines Matching refs:style
145 static std::string fmtStyleVal(unsigned v, enumStyle_t style);
159 std::string TPrinter::fmtStyleVal(unsigned v, enumStyle_t style)
161 switch (style) {
338 for (enumStyle_t style = (isMask ? enumShift : enumCount);
339 style <= (isMask ? enumMask : enumCount); style = enumStyle_t(int(style)+1)) {
341 out << enumBeg(opName, style);
343 if (style == enumMask)
350 bool printMax = (style != enumMask && maxEnum.size() > 0);
353 out << enumFmt(opPrefix, v, style, !printMax && v.second == sorted.back().second);
359 out << enumEnd(opName, style, ++nextOpClass == enums.end());
442 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
443 if (style == enumMask)
447 indent(4) + "\"Type\": " + (style == enumShift ? "\"Bit\"" : "\"Value\"") + ",\n" +
452 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
453 if (style == enumMask)
460 enumStyle_t style, bool isLast) const override {
461 if (style == enumMask || style == enumNoMask)
553 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
554 return std::string("typedef enum ") + pre() + s + styleStr(style) + "_ {\n";
557 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
558 return "} " + pre() + s + styleStr(style) + ";\n\n";
562 enumStyle_t style, bool isLast) const override {
563 return indent() + pre() + s + v.second + styleStr(style) + " = " + fmtStyleVal(v.first, style) + ",\n";
567 enumStyle_t style) const override {
568 return enumFmt(s, v, style, true);
620 virtual std::string enumBeg(const std::string& s, enumStyle_t style) const override {
621 return std::string("enum ") + s + styleStr(style) + " {\n";
624 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
629 enumStyle_t style, bool isLast) const override {
630 return indent() + s + v.second + styleStr(style) + " = " + fmtStyleVal(v.first, style) + ",\n";
634 enumStyle_t style) const override {
635 return enumFmt(s, v, style, true);
653 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
654 return std::string("enum class ") + s + styleStr(style) + " : unsigned {\n";
658 enumStyle_t style, bool isLast) const override {
659 return indent() + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
663 enumStyle_t style) const override {
664 return enumFmt(s, v, style, true);
682 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
683 return indent() + s + styleStr(style) + " = {\n";
686 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
691 enumStyle_t style, bool isLast) const override {
692 return indent(2) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
711 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
712 return indent() + "'" + s + styleStr(style) + "'" + " : {\n";
715 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
720 enumStyle_t style, bool isLast) const override {
721 return indent(2) + "'" + prependIfDigit(s, v.second) + "'" + " : " + fmtStyleVal(v.first, style) + ",\n";
747 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
748 return indent(2) + "public enum " + s + styleStr(style) + "\n" + indent(2) + "{\n";
751 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
756 enumStyle_t style, bool isLast) const override {
757 return indent(3) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
781 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
782 return "enum " + s + styleStr(style) + " : uint\n{\n";
785 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
790 enumStyle_t style, bool isLast) const override {
791 return indent() + prependIfDigit("_", v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
818 std::string enumBeg(const std::string& s, enumStyle_t style) const override {
819 return indent(2) + "[AllowDuplicates, CRepr] public enum " + s + styleStr(style) + "\n" + indent(2) + "{\n";
822 std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
827 enumStyle_t style, bool isLast) const override {
828 return indent(3) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";