Lines Matching defs:method

651     // parse method

654 AutoPtr<ASTMethod> method = ParseMethod(interface);
655 interface->AddMethod(method);
679 AutoPtr<ASTMethod> method = new ASTMethod();
681 method->SetAttribute(methodAttr);
682 method->SetCacheable(methodAttr);
683 method->SetReturnType(ParseMethodReturnType());
685 // parser method name
688 LogErrorBeforeToken(__func__, __LINE__, token, std::string("expected method name"));
690 method->SetName(token.value);
694 CheckMethodAttr(interface, method);
696 ParseMethodParamList(method);
712 method->SetCmdId(methodsCount);
713 method->CheckOverload(interface);
716 method->SetFreezeControlReason(freezecontrolAttr_);
719 return method;
731 // parse method return type, maybe not exist
780 AutoPtr<ASTMethod> method = new ASTMethod();
781 method->SetName("GetVersion");
788 method->AddParameter(new ASTParameter("majorVer", ASTParamAttr::PARAM_OUT, type));
789 method->AddParameter(new ASTParameter("minorVer", ASTParamAttr::PARAM_OUT, type));
790 return method;
793 void Parser::CheckMethodAttr(const AutoPtr<ASTInterfaceType> &interface, const AutoPtr<ASTMethod> &method)
795 // if the attribute of method is empty, the default value is attribute of interface
796 if (!method->IsMini() && !method->IsLite() && !method->IsFull()) {
797 method->SetAttribute(interface->GetAttribute());
800 if (!interface->IsMini() && method->IsMini()) {
801 LogError(__func__, __LINE__, StringHelper::Format("the '%s' method can not have 'mini' attribute, because the "
802 "'%s' interface has no 'mini' attribute", method->GetName().c_str(), interface->GetName().c_str()));
805 if (!interface->IsLite() && method->IsLite()) {
806 LogError(__func__, __LINE__, StringHelper::Format("the '%s' method can not have 'lite' attribute, because the "
807 "'%s' interface has no 'lite' attribute", method->GetName().c_str(), interface->GetName().c_str()));
810 if (!interface->IsFull() && method->IsFull()) {
811 LogError(__func__, __LINE__, StringHelper::Format("the '%s' method can not have 'full' attribute, because the "
812 "'%s' interface has no 'full' attribute", method->GetName().c_str(), interface->GetName().c_str()));
815 // the method has 'oneway' attribute if interface or method has 'oneway' attribute
816 if (interface->IsOneWay() || method->IsOneWay()) {
817 method->GetAttribute()->SetValue(ASTAttr::ONEWAY);
821 void Parser::ParseMethodParamList(const AutoPtr<ASTMethod> &method)
841 if (method->IsOneWay() && (param->GetAttribute() & ASTParamAttr::PARAM_OUT)) {
842 LogError(__func__, __LINE__, token, StringHelper::Format("the '%s' parameter of '%s' method "
843 "can not be 'out'", param->GetName().c_str(), method->GetName().c_str()));
845 method->AddParameter(param);