| 289 | |
| 290 | |
| 291 | std::string get_class_name(lua_State* L, type_id const& i) |
| 292 | { |
| 293 | std::string ret; |
| 294 | |
| 295 | assert(L); |
| 296 | |
| 297 | class_registry* r = class_registry::get_registry(L); |
| 298 | class_rep* crep = r->find_class(i); |
| 299 | |
| 300 | if (!crep || !crep->name()) |
| 301 | { |
| 302 | ret = crep ? "unnamed [" : "custom ["; |
| 303 | ret += i.name(); |
| 304 | ret += ']'; |
| 305 | } |
| 306 | else |
| 307 | { |
| 308 | /* TODO reimplement this? |
| 309 | if (i == crep->holder_type()) |
| 310 | { |
| 311 | ret += "smart_ptr<"; |
| 312 | ret += crep->name(); |
| 313 | ret += ">"; |
| 314 | } |
| 315 | else if (i == crep->const_holder_type()) |
| 316 | { |
| 317 | ret += "smart_ptr<const "; |
| 318 | ret += crep->name(); |
| 319 | ret += ">"; |
| 320 | } |
| 321 | else*/ |
| 322 | { |
| 323 | ret += crep->name(); |
| 324 | } |
| 325 | } |
| 326 | return ret; |
| 327 | } |
| 328 | |
| 329 | }} // namespace luabind::detail |
no test coverage detected