| 224 | SecurityClass::flags_t acc_mask; |
| 225 | |
| 226 | static bool greaterThan(const AccessItem& i1, const AccessItem& i2) |
| 227 | { |
| 228 | int v; |
| 229 | |
| 230 | /* CVC: Disabled this horrible hack. |
| 231 | // Relations and procedures should be sorted before |
| 232 | // columns, hence such a tricky inverted condition |
| 233 | if ((v = -strcmp(i1.acc_type, i2.acc_type)) != 0) |
| 234 | return v > 0; |
| 235 | */ |
| 236 | if (i1.acc_type != i2.acc_type) |
| 237 | return i1.acc_type > i2.acc_type; |
| 238 | |
| 239 | if ((v = i1.acc_security_name.compare(i2.acc_security_name)) != 0) |
| 240 | return v > 0; |
| 241 | |
| 242 | if (i1.acc_ss_rel_id != i2.acc_ss_rel_id) |
| 243 | return i1.acc_ss_rel_id > i2.acc_ss_rel_id; |
| 244 | |
| 245 | if (i1.acc_mask != i2.acc_mask) |
| 246 | return i1.acc_mask > i2.acc_mask; |
| 247 | |
| 248 | if ((v = i1.acc_name.compare(i2.acc_name)) != 0) |
| 249 | return v > 0; |
| 250 | |
| 251 | if ((v = i1.acc_r_name.compare(i2.acc_r_name)) != 0) |
| 252 | return v > 0; |
| 253 | |
| 254 | return false; // Equal |
| 255 | } |
| 256 | |
| 257 | AccessItem(const MetaName& security_name, SLONG view_id, |
| 258 | const MetaName& name, ObjectType type, |