//------------------------------------------------------------------------------------- bool ScriptDefModule::addBaseMethodDescription(const char* attrName, MethodDescription* methodDescription) { MethodDescription* f_methodDescription = findBaseMethodDescription(attrName); if(f_methodDescription) { ERROR_MSG("ScriptDefModule::addBaseMethodDescription: [%s] is exist!\n", attrName); return false; } setBase(true); methodBaseDescr_[attrName] = methodDescription; methodBaseDescr_uidmap_[methodDescription->getUType()] = methodDescription; return true; }
//------------------------------------------------------------------------------------- MethodDescription* ScriptDefModule::findMethodDescription(ENTITY_METHOD_UID utype, COMPONENT_TYPE componentType) { switch(componentType) { case CELLAPP_TYPE: return findCellMethodDescription(utype); break; case BASEAPP_TYPE: return findBaseMethodDescription(utype); break; default: return findClientMethodDescription(utype); break; }; return NULL; }
//------------------------------------------------------------------------------------- MethodDescription* ScriptDefModule::findMethodDescription(const char* attrName, COMPONENT_TYPE componentType) { switch(componentType) { case CELLAPP_TYPE: return findCellMethodDescription(attrName); break; case BASEAPP_TYPE: return findBaseMethodDescription(attrName); break; default: return findClientMethodDescription(attrName); break; }; return NULL; }
//------------------------------------------------------------------------------------- bool ScriptDefModule::addBaseMethodDescription(const char* attrName, MethodDescription* methodDescription) { MethodDescription* f_methodDescription = findBaseMethodDescription(attrName); if(f_methodDescription) { ERROR_MSG(boost::format("ScriptDefModule::addBaseMethodDescription: [%1%] is exist!\n") % attrName); return false; } setBase(true); methodBaseDescr_[attrName] = methodDescription; methodBaseDescr_uidmap_[methodDescription->getUType()] = methodDescription; if(methodDescription->isExposed()) methodBaseExposedDescr_[attrName] = methodDescription; return true; }
//------------------------------------------------------------------------------------- bool ScriptDefModule::addBaseMethodDescription(const char* attrName, MethodDescription* methodDescription) { if(hasPropertyName(attrName)) { ERROR_MSG(fmt::format("ScriptDefModule::addBaseMethodDescription: There is a property[{}] name conflict!\n", attrName)); return false; } if (hasComponentName(attrName)) { ERROR_MSG(fmt::format("ScriptDefModule::addBaseMethodDescription: There is a component[{}] name conflict!\n", attrName)); return false; } MethodDescription* f_methodDescription = findBaseMethodDescription(attrName); if(f_methodDescription) { ERROR_MSG(fmt::format("ScriptDefModule::addBaseMethodDescription: [{}] is exist!\n", attrName)); return false; } setBase(true); methodBaseDescr_[attrName] = methodDescription; methodBaseDescr_uidmap_[methodDescription->getUType()] = methodDescription; if(methodDescription->isExposed()) methodBaseExposedDescr_[attrName] = methodDescription; return true; }