Lines Matching defs:interface

217         LogError(__func__, __LINE__, token, StringHelper::Format("expected 'interface token'"));

537 LogErrorBeforeToken(__func__, __LINE__, token, std::string("expected interface name"));
559 "interface name '%s' is not equal idl file name", interfaceType->GetName().c_str()));
589 LogError(__func__, __LINE__, attr, std::string("illegal attribute of interface"));
603 void Parser::CheckInterfaceAttr(const AutoPtr<ASTInterfaceType> &interface, Token token)
610 ret = interface->IsFull();
614 ret = interface->IsLite();
618 ret = interface->IsMini();
625 LogError(__func__, __LINE__, token, StringHelper::Format("the system option is '%s', but the '%s' interface "
626 "has no '%s' attribute", systemName.c_str(), interface->GetName().c_str(), systemName.c_str()));
630 void Parser::ParseInterfaceExternal(const AutoPtr<ASTInterfaceType> &interface)
634 if (interface->IsAttributeNone()) {
635 interface->SetExternal(true);
637 LogError(__func__, __LINE__, token, std::string("interface forward declaration should not have attribute."));
641 void Parser::ParseInterfaceBody(const AutoPtr<ASTInterfaceType> &interface)
654 AutoPtr<ASTMethod> method = ParseMethod(interface);
655 interface->AddMethod(method);
673 interface->AddVersionMethod(CreateGetVersionMethod());
676 AutoPtr<ASTMethod> Parser::ParseMethod(const AutoPtr<ASTInterfaceType> &interface)
694 CheckMethodAttr(interface, method);
706 size_t methodsCount = interface->GetMethodNumber() + 1;
707 AutoPtr<ASTInterfaceType> extInterface = interface->GetExtendsInterface();
713 method->CheckOverload(interface);
770 LogError(__func__, __LINE__, attr, std::string("illegal attribute of interface"));
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
797 method->SetAttribute(interface->GetAttribute());
800 if (!interface->IsMini() && method->IsMini()) {
802 "'%s' interface has no 'mini' attribute", method->GetName().c_str(), interface->GetName().c_str()));
805 if (!interface->IsLite() && method->IsLite()) {
807 "'%s' interface has no 'lite' attribute", method->GetName().c_str(), interface->GetName().c_str()));
810 if (!interface->IsFull() && method->IsFull()) {
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()) {
1868 * filePath: ./ohos/interface/foo/v1_0/IFoo.idl
1923 void Parser::ParseInterfaceExtends(AutoPtr<ASTInterfaceType> &interface)
1932 LogErrorBeforeToken(__func__, __LINE__, token, std::string("expected extends interface name"));
1936 ParseExtendsInfo(interface);
1945 LogError(__func__, __LINE__, token, std::string("extends interface name is empty"));
1949 LogError(__func__, __LINE__, token, std::string("extends interface name is illegal"));
1955 LogError(__func__, __LINE__, token, StringHelper::Format("can not find idl file by extends interface "
1961 "extends interface name must same as current interface name '%s'", interfaceType->GetName().c_str()));
1966 std::string("extends interface version must less than current interface version"));
2173 AutoPtr<ASTInterfaceType> interface = astPair.second->GetInterfaceDef();
2174 if (interface != nullptr) {
2175 interface->SetNamespace(ns);