| 114 | } |
| 115 | |
| 116 | static int TypePreference(const std::string& type) |
| 117 | { |
| 118 | if (type == "Value") |
| 119 | return 0; |
| 120 | else if (type == "String") |
| 121 | return 1; |
| 122 | else if (type == "double") |
| 123 | return 2; |
| 124 | else if (type.find("::Ptr") != std::string::npos) |
| 125 | return 3; |
| 126 | else if (type == "int") |
| 127 | return 4; |
| 128 | else |
| 129 | return 5; |
| 130 | } |
| 131 | |
| 132 | static bool FieldLayoutCmp(const Field& a, const Field& b) |
| 133 | { |