SObjectSounds CObjectClassesHandler::getObjectSounds(si32 type, si32 subtype) const { if(knownSubObjects(type).count(subtype)) return getHandlerFor(type, subtype)->getSounds(); else return getObjectSounds(type); }
std::string CObjectClassesHandler::getObjectName(si32 type, si32 subtype) const { if (knownSubObjects(type).count(subtype)) { auto name = getHandlerFor(type, subtype)->getCustomName(); if (name) return name.get(); } return getObjectName(type); }
Component* ComponentTypeHandler::createCopyOf (JucerDocument* document, Component& existing) { jassert (getHandlerFor (existing) == this); Component* const newOne = createNewComponent (document); ScopedPointer<XmlElement> xml (createXmlFor (&existing, document->getComponentLayout())); if (xml != nullptr) restoreFromXml (*xml, newOne, document->getComponentLayout()); return newOne; }
Component* ComponentTypeHandler::createCopyOf (JucerDocument* document, Component& existing) { jassert (getHandlerFor (existing) == this); Component* const newOne = createNewComponent (document); XmlElement* const xml = createXmlFor (&existing, document->getComponentLayout()); if (xml != 0) { restoreFromXml (*xml, newOne, document->getComponentLayout()); delete xml; } return newOne; }
TObjectTypeHandler CObjectClassesHandler::getHandlerFor(CompoundMapObjectID compoundIdentifier) const { return getHandlerFor(compoundIdentifier.primaryID, compoundIdentifier.secondaryID); }