-----------------------------------------------------------------------
| 535 | String ParticleSystemFactory::FACTORY_TYPE_NAME = "ParticleSystem"; |
| 536 | //----------------------------------------------------------------------- |
| 537 | MovableObject *ParticleSystemFactory::createInstanceImpl( IdType id, |
| 538 | ObjectMemoryManager *objectMemoryManager, |
| 539 | SceneManager *manager, |
| 540 | const NameValuePairList *params ) |
| 541 | { |
| 542 | if( params != 0 ) |
| 543 | { |
| 544 | NameValuePairList::const_iterator ni = params->find( "templateName" ); |
| 545 | if( ni != params->end() ) |
| 546 | { |
| 547 | String templateName = ni->second; |
| 548 | // create using manager |
| 549 | return ParticleSystemManager::getSingleton().createSystemImpl( id, objectMemoryManager, |
| 550 | manager, templateName ); |
| 551 | } |
| 552 | } |
| 553 | // Not template based, look for quota & resource name |
| 554 | size_t quota = 500; |
| 555 | String resourceGroup = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME; |
| 556 | if( params != 0 ) |
| 557 | { |
| 558 | NameValuePairList::const_iterator ni = params->find( "quota" ); |
| 559 | if( ni != params->end() ) |
| 560 | { |
| 561 | quota = StringConverter::parseUnsignedInt( ni->second ); |
| 562 | } |
| 563 | ni = params->find( "resourceGroup" ); |
| 564 | if( ni != params->end() ) |
| 565 | { |
| 566 | resourceGroup = ni->second; |
| 567 | } |
| 568 | } |
| 569 | // create using manager |
| 570 | return ParticleSystemManager::getSingleton().createSystemImpl( id, objectMemoryManager, manager, |
| 571 | quota, resourceGroup ); |
| 572 | } |
| 573 | //----------------------------------------------------------------------- |
| 574 | const String &ParticleSystemFactory::getType() const { return FACTORY_TYPE_NAME; } |
| 575 | //----------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected