static void init_proxy(const statement_list_t *stmts) { if (proxy) return; if(!(proxy = fopen(proxy_name, "w"))) error("Could not open %s for output\n", proxy_name); print_proxy( "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name); print_proxy( "\n"); print_proxy( "#ifndef __REDQ_RPCPROXY_H_VERSION__\n"); print_proxy( "#define __REQUIRED_RPCPROXY_H_VERSION__ 440\n"); print_proxy( "#endif /* __REDQ_RPCPROXY_H_VERSION__ */\n"); print_proxy( "\n"); print_proxy( "#define __midl_proxy\n"); print_proxy( "#include \"objbase.h\"\n"); print_proxy( "#include \"rpcproxy.h\"\n"); print_proxy( "#ifndef __RPCPROXY_H_VERSION__\n"); print_proxy( "#error This code needs a newer version of rpcproxy.h\n"); print_proxy( "#endif /* __RPCPROXY_H_VERSION__ */\n"); print_proxy( "\n"); print_proxy( "#include \"%s\"\n", header_name); print_proxy( "\n"); print_proxy( "#ifndef DECLSPEC_HIDDEN\n"); print_proxy( "#define DECLSPEC_HIDDEN\n"); print_proxy( "#endif\n"); print_proxy( "\n"); write_exceptions( proxy ); print_proxy( "\n"); print_proxy( "struct __proxy_frame\n"); print_proxy( "{\n"); print_proxy( " __DECL_EXCEPTION_FRAME\n"); print_proxy( " MIDL_STUB_MESSAGE _StubMsg;\n"); print_proxy( " void *This;\n"); print_proxy( "};\n"); print_proxy( "\n"); print_proxy("static int __proxy_filter( struct __proxy_frame *__frame )\n"); print_proxy( "{\n"); print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n"); print_proxy( "}\n"); print_proxy( "\n"); }
void UmlOperation::write(FileOut & out) { WrapperStr decl; switch (_lang) { case Uml: out.indent(); out << "<ownedOperation xmi:type=\"uml:Operation\" name=\""; out.quote((const char *)name()); //[jasa] ambiguous call break; case Cpp: decl = cppDecl(); if (decl.isEmpty()) return; remove_comments(decl); out.indent(); out << "<ownedOperation xmi:type=\"uml:Operation\" name=\""; out.quote((const char *)true_name(name(), cppDecl())); //[jasa] ambiguous call break; default: // Java decl = javaDecl(); if (decl.isEmpty()) return; remove_comments(decl); out.indent(); out << "<ownedOperation xmi:type=\"uml:Operation\" name=\""; out.quote((const char *)true_name(name(), javaDecl())); //[jasa] ambiguous call break; } out << '"'; out.id(this); write_visibility(out); write_scope(out); if ((_lang == Cpp) && isCppConst()) out << " isQuery=\"true\""; out << " isAbstract=\"" << ((isAbstract()) ? "true" : "false") << "\">\n"; out.indent(+1); write_constraint(out); write_annotation(out); write_description_properties(out); write_exceptions(out); write_return_type(out, decl); if (_lang == Uml) write_uml_params(out); else write_cpp_java_params(out, decl); out.indent(-1); out.indent(); out << "</ownedOperation>\n"; unload(); }