MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / get_class_name

Function get_class_name

Source/Misc/luabind/src/class.cpp:291–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

dispatch_operatorFunction · 0.85
getMethod · 0.85

Calls 2

find_classMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected