Marshall::HandlerFn getMarshallFn(const SmokeType &type) { if(type.elem()) return marshall_basetype; if(!type.name()) return marshall_void; TypeHandler *h = type_handlers[type.name()]; if(h == 0 && type.isConst() && strlen(type.name()) > strlen("const ")) { h = type_handlers[type.name() + strlen("const ")]; } if(h != 0) { return h->fn; } return marshall_unknown; }
Marshall::HandlerFn Marshall::getMarshallFn(const SmokeType &type) { if (type.element() != 0) { return marshall_basetype; } if (type.name() == 0) { return marshall_void; } TypeHandler * handler = TypeHandlers[type.name()]; if (handler == 0 && type.isConst() && qstrlen(type.name()) > qstrlen("const ")) { handler = TypeHandlers[type.name() + qstrlen("const ")]; } if (handler != 0) { return handler->fn; } return marshall_unknown; }