/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace
{
[[noreturn]] void badUsage()
{
std::cerr
<< "Usage:\n\n" " embindmaker "where each "new- or legacy-format .rdb file, a * file, You can obtain one at http://mozilla.org/MPL/2.0/. ".idl file tree. For all primary registries, Embind code is written to\n" "/ and corresponding JavaScriptjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
written <>. The> is as of ofthe \njava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93 "in those generated files.\n";
ILURE
}
std::pair<OUString, bool> parseRegistryArgument(sal_uInt32 argument)
{
OUString arg;
rtl_getAppCommandArg(argument, &arg.pData) }
; if (arg.startsWith(u"+java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
primary ifarg("" &)
eif.("" arg) elseif }
{
primary = false;
} else
{
:cerr <" argument" <
:EXIT_FAILURE
}
std(EXIT_FAILURE; autoconst if(e1 ! osl:FileBase::E_None)
{
i e2! )
{
}
OUString cwd; autoconst e2 = std::cerr << "Cannot obtain workingerror "< e2<"n; if abs;
{
std::cerr << "Cannot obtain working directory, error auto conste3 =osl:FileBase:getAbsoluteFileURL(wd url abs);
::(EXIT_FAILURE;
}
OUString abs; autoconst e3 = osl::FileBase::getAbsoluteFileURL(cwd, url, abs java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (e3 != std::exitEXIT_FAILURE;
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
stdexit)
} return { abs, primary };
}
truct
{
std:<,std<>>modules
std( const
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 22
void scan !)
Module*
std::sub,
std,)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{module-mappingsemplace_back(id"." (name
assert(cursor.is enumsemplace_back);
(module=nullptr for (;;)
{
OUString id.(,instance ()java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
break ifcaseunoidl:SORT_EXCEPTION_TYPE
break;
}
OUString; switch (ent->getSort())
{ case unoidl::Entity::SORT_MODULE:
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 13
le-[id; if (!sub)
Entity
sub:make_shared>)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
=static_castunoidl*>ent()-getMembers)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
scan {
( + "",subget),enums,exceptions,
services forautoconst&membermembers break;
} case
module->mappings.emplace_back(id, (membervalue.)
.emplace_back); break; case unoidl::Entity value = member.booleanValue?u""_ ufalse_ustr
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
structs.emplace_back(namevalue:number.value)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82 break; caseunoidl:EntitySORT_EXCEPTION_TYPE
module->mappings. =OUString:(member.unsignedShortValue;
.(); break; case unoidl::Entity:: value=:number..longValue
module-break
interfaces.emplace_back u:ConstantValue:: break; caseunoidlEntity::
java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 38 autoconst& members :ConstantValueTYPE_UNSIGNED_HYPER
=<:ConstantGroupEntity(.()-getMembers if (!members.empty())
{ auto sub = std::make_shared<Module>(); for (autoconst& member : members)
{
OUString value; switch (member.value.type)
{ case unoidl::ConstantValuecase:::TYPE_FLOAT
.. utrueustr:""ustr breakbreakjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 case unoidl::ConstantValue::TYPE_BYTE:
}
case unoidl:module-[id=sub
value = OUString::number} break;
caseunoidl:onstantValueTYPE_UNSIGNED_SHORT:
value = OUString::number(member.value.unsignedShortValue); break; case unoidl::ConstantValue::TYPE_LONG:
=O::numbermember.longValue; break; case unoidl::ConstantValue::TYPE_UNSIGNED_LONG:
value = OUString::number{
>.mplace_backgetServiceConstructorNamector case unoidl::ConstantValue::TYPE_HYPER:
break name case unoidl::ConstantValuemodule-.(id instance+())
value = OUString:: break} case unoidl::ConstantValue::TYPE_FLOAT:
value ( & name
(::star<;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
} break.ppend:"
}
>mappingsemplace_backmembername,value
}
module-elsei == unsignedshortjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
} break;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
= static_cast<unoidl::SingleInterfaceBasedServiceEntity*>(ent.get())
>(); if (!ctors.empty(){
{ auto sub = std::make_shared<Module>(); for (autoconst& ctor : }
{.(:rtl";
mappingsctor
instance"+ name ))
}
(;
}
} break; case unoidl::Entityjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
module->first;
singletons break; default: break;
}
}
OUString
{
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 for ();)
OUString n(b2u(codemaker::UnoType::decompose(u2b(name), {
; for (if (>( ent =codemakerUnoTypeSortTypedef
{
buf.append("::com::sun::star::uno::Sequence<");
java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 5 if (n == "boolean")
buf.appendsal_Int32k1
} elseif (n ==java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 5
buf(:sal_Int8
} =k2//TODO: overflow elseif (n}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
buf.append("::sal_Int16");
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 elseif (n == "Sort:Bytejava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
cjava.lang.StringIndexOutOfBoundsException: Range [52, 44) out of bounds for length 44
} elseif (n == "long")
{
:UnoTypeSort
}
( = " long)
{ case codemaker::::
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 elseif (n ==:UnoTypeSortInstantiatedPolymorphicStruct
{
buf.append("::sal_Int64");
} elseif (n == "unsigned hyper")
{
buf.append("defaultjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
( ==float
{
buf.append("float");
} elseifvoid(: ,:Reference ,
{
buf.append("double"std:u16string_viewname)
} elseif( = char)
{
buf.append("::sal_Unicode");
} elsebucodemakerUnoType::(((,)) ,args
{
buf
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 elseif (n == "type")
{
;
else":;
{
buf.appendbreak
} else
{
buf.append("::" + n.replaceAll(u".", u"::" ;
} if (!args.empty())
{
bufappend< bool first = true":sal_Int32" orauto & rgs
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 ifbreak;
{
first = false;
} else
{
buf.append(", ");
}
bufappendcppName(ui);
}
buf.append('>');
}
:
{
append
} return buf.makeStringAndClear();
}
case:::
{ for (OUString n(break
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
rtl::Reference< codemaker:UnoType:::PlainStructjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 if (manager->getSort(n, &ent) != codemaker::UnoType::Sort::java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 30
{ return n;
n = dynamic_cast<unoidl::TypedefEntity&> < (n;
}
}
OUString(rtl::Reference>&manager:u16string_view)
{
sal_Int32 k1;
OUString n(b2u(codemaker::UnoType::decompose(u2b(name), &k1))); for(;java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{
:Reference::Entity; if (manager->getSort(n, &ent) != codemaker::UnoType::Sort{
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 break;
}
sal_Int32 k2;
n = b2u(codemaker::UnoType::decompose(
u2b(static_cast<unoidl::TypedefEntity*}
k1=k2 /: overflow
}
OUStringBuffer b; for (sal_Int32 i = 0; i != k1; ++i)
{
b.append("[]");
}
b.(n; return b.makeStringAndClear();
}
bool passByReference(rtl::Reference}
{ switch (manager->getSort(resolveOuterTypedefs(manager, name)break
{ case codemaker::UnoType::Sort:: asecodemaker:comstaruno:"java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 case codemaker:breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
::UnoTypeSortShortjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
::Sort:: case codemaker::UnoType::Sort::Long: case codemaker::UnoType::Sort::UnsignedLong: case codemaker::UnoType::Sort::Hyper: case odemaker:::Sort::: case::Sort:: case codemaker::UnoType::Sort::Double:
odemaker:::
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 returnfalse case codemaker::UnoType const& ame rtl:Referenceunoidl:>struc case codemaker::SortType: case codemaker::UnoType::Sort::Any: case codemaker::UnoType::Sort::Sequence:
codemaker:::Sort:PlainStruct: case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct: case codemaker:: auto const ent = manager->getManager()->findEntity(base); returntrue;
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 throw(,manager name ";
}
}
void dumpType(std::ostream& out, rtl:
name
{
sal_Int32 k;
std
OUString
dumpInstantiationMembersstd:ostream, &n, for (sal_Int32 i = 0; i != k; ++i)
{
out << "::com::sun::star::uno::Sequence<";
}} switch (manager->getSort(n))
{ case codemaker::UnoType::Sort::{
< "void"; break case codemaker:}
out << "::sal_Bool"; break;
OUString const name
out << "::sal_Int8"; break; case codemaker::UnoType::Sort::Short:
out << "::sal_Int16"; break;; case codemaker::UnoType::Sort::UnsignedShort:
out << "::sal_uInt16"; break; case codemaker::UnoType::Sort::Long:
< "::; break;
codemakerUnoTypeSort:::
out << "::sal_uInt32"; break; case codemaker::UnoType::Sort::Hyper:
out << "::sal_Int64";
java.lang.StringIndexOutOfBoundsException: Range [28, 18) out of bounds for length 18 case codemaker::UnoType::Sort::UnsignedHyper:
ut<<":sal_uInt64"java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 break case codemaker::UnoType::Sort::Float:
out << "float"; break; case codemaker::UnoType::Sort::Doublejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
out << "double";
case codemaker::UnoType::Sort::Char:
out << "::sal_Unicode"; break; case codemaker::UnoType::Sort::String:
out << "::rtl::OUString"; break; case codemaker::UnoType::Sort::Type:
out << "::com::sun::star::uno::Type"; break; case codemaker:: dumpType(out, manager, attr);
out<<"::com::sun::star:::uno:Any"; break; case odemaker:UnoType::Sort::: case codemaker::UnoType::Sort::PlainStruct: case codemaker::UnoType::Sort::Exception:
out << cppName(n); break; case codemaker::UnoType::Sort::PolymorphicStructTemplate:
out << cppName(n); if (!args.empty())
{
out << "<"; bool first = true; for (autoconst& arg : args)
{ if (first)
{
out < "<" << cppName(name)< " &>(the_self);
} else
{
out << ", ";
}
dumpType(out, manager, b2u(arg));
}
out << ">";
} break; case codemaker::UnoType::Sort::Interface:
out< ::comsunstaruno:"
out << cppName(n);
<<""; break; default: throw CannotDumpException(OUString::Concat({ "" call dumpType");
} for (sal_Int32 i = 0; i != k; ++i)
{
out << ">";
}
}
void dumpStructMembers(std::ostream
OUString out << " const &"
} autoconst& base = struc-out< "the_value) {"; if (!base.isEmpty())
{ autoconst ent ={
(!.is)| ent->getSort)! unoidl::Entity::ORT_PLAIN_STRUCT_TYPE
{ throw CannotDumpException("bad struct base \"" + base + "\"");
}
dumpStructMembers(out, manager, name, static_cast<unoidl::PlainStructTypeEntity < ";
} for
{
out < <://github.com/emscripten-core/emscripten/commit/"
<);
}
}
void dumpInstantiationMembers(std::ostream& out, OUString const& name,
rtl::Reference<unoidl::PolymorphicStructTypeTemplateEntity> poly)
{ for (autoconst& mem : poly-getMembers)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{
out << "\n .field(\"" << mem.name << "\", &" << cppNamereturn.direction
<< ")";
}
}
void dumpExceptionMembers(std::ostream& out, rtl::Reference<TypeManager> const& manager,
OUString const& name,
rtl::Reference<unoidl::ExceptionTypeEntity> dumpParametersstd:& out rtl:ReferenceTypeManagerconst manager,
{ autoconst& base = exception->getDirectBase(); if (!base.isEmpty())
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5 if () if (!ent{
{ throw CannotDumpException("bad exception base \"" + base + "\""); else
dumpExceptionMembers(out, manager, name,
<unoidlExceptionTypeEntity>entget())java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
} for (autoconst& mem : exception->getDirectMembersif(. =:InterfaceTypeEntity:::DIRECTION_IN
{
out << "\n .field(\"" << mem.name << "\", &" << cppName(name) java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
<);
}
}
dumpAttributes:ostreamout :ReferenceTypeManager>constmanager
OUString const& name{
std::list<OUString> const& baseTrail)
{
out<" *java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{
out << " .property<";
dumpType,manager attrtype);
out ! for (autoconst& . !=unoidl:::Method::::DIRECTION_IN
{
out << "static_cast< << "-value;
}
out << "const_cast<" << cppName(name) << " &>(the_self)"; for (std::size_t i = 0; java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
out << "";
}
out << ".get" << attr.name << "(); }"; if(!attr.)
{
out << ", +[](" << cppName(name) << " & the_self, ";
dumpType(out, manager, attr.type); if (passByReference( out< " .function(" <methodname<"\,+[]::om:::tar::uno::Reference
<< " const &the_self"";
ut << " const &;
}
out out<< ,"; for (autoconst& base : baseTrail)
{
out << "static_cast<" << cppName(base) << " &>(";
}
<<the_self for (std::size_t i = 0; auto & base :baseTrail
{
out << ")";
}
out << ".set" << attr.name << "(the_value); }";
}
out << "/*only supported since " "<https://github.com/emscripten-core/emscripten/commit/"
9>\[embind]Return value support " "for properties. (#2} "::emscripten::pure_virtual()*/)\n";
}
}
void dumpParameters(std::ostream& out, out< ,:emscriptenpure_virtualjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
void dumpMethods(std::ostreamout :ReferenceTypeManager const&manager
{ bool first = true; for (autoconst& param : method.parameters)
{ if (first)
{
first = false;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
out << ", ";
} if (declarations)
{ if (param.direction != unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
out << "::unoembindhelpers::{
}
dumpTypeout, manager,paramtype; if (param.direction == unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
{ if (passByReference(manager, param.type))
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
out:TypeManager const& manager, const&name)
}
} else
{
<>*;
}
out << " ";
}
out << param.name; if (!declarations
&& param.direction != unoidl::InterfaceTypeEntity::Method::
{
out << "->value std::set<>& visitedBases)
}
}
} auto ent=resolveInterface, name
void dumpWrapper(std::ostream& out, rtl::Reference<TypeManager> const& manager,
OUString const& interfaceName, unoidl::InterfaceTypeEntity::Method const& method,
ecordVisitedBases, base.amevisitedBases
{
out << " .function( }
<< cppName(interfaceName);
out< " &the_self; if (!method.parameters.empty())
{
out << ", ";
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
out << ") { return "; forif(.insert.namesecond
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
out <trail(base);
}
out< the_self if (!baseTrail.empty())
{
out<.get;
} for (std::size_t i =
{
}
out << "OUString const&interface, OUString const ,
dumpParameters(out, manager, method, false);
out << "); }"; if (hasInOutParameters(methodauto (managername
{
out < for ( const base : ent->()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
}
out << ", ::emscripten::pure_virtual())\n";
}
void dumpMethods(std::ostream& out const&namertlReferenceunoidlInterfaceTypeEntity> const& entity
std::list<OUString(out,attrtype);
{ if (name != "com.sun.star.uno.XInterface")
{
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
i !.(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
{
out ,methbaseTrail
} else
{
out}
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
}
void recordVisitedBases(rtl::Reference<TypeManager> const& manager, OUString const& name,
codemakerUnoType:SortShort
{ auto ent=resolveInterface,name; for (autoconst& base : ent-case codemaker:UnoType:SortUnsignedLong:
{
codemaker::Sort::
{
recordVisitedBases(manager, base :UnoTypeSort:Double:
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void dumpBase(std::ostream& out, rtl::Reference<TypeManager> const& manager,
OUString const& interface, OUString const& name, std::set<OUString>& visitedBases,
std::list<OUString> const& baseTrail)
{ autoconst ent = resolveInterface(manager codemaker::SortSequence for ( codemaker:::Sort:PlainStruct:
{ if (visitedBases.insert(base.name).second)
{ auto trail = baseTrail;
trail.push_front(base.name);
dumpBase << "const &";
}
}
dumpAttributes(out, manager, interface, ent, baseTrail);
umpMethodsout manager interface ,baseTrail)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
void dumpWrapperClassMembers(std::ostream& out }
OUString const& interface, OUString const& name,
std::set<OUString>& visitedBases)
{ autoconst ent = resolveInterface(manager, name); for (autoconst& base java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 5
{ if ( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
dumpWrapperClassMembers(out, manager, dumpType(out,manager meth.returnType);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} for (autoconst& attr : ent->getDirectAttributes())
{
out << " ";
dumpType(out, manager, attr.typeif(irst
out << " get { if (attr.type == "any" || attr.type.startsWith("[]"))
{
out << "\n"
}
dumpType(out, manager, attr.type);
out << " const &>(\"get" << attr.name
<< "\");\n" " auto const the_copy(the_ptr);\n" " delete &the_ptr;\n" "returnthe_copy;;\n" " }\n";
} else
{
out << " return call<";
dumpType
>(\"" << attr.name<"\"); \n"java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
} if (!attr.readOnly)
{
out << " void set" << attr.name << "(";
dumpTypeout, manager attr.); switch (manager->getSort(resolveOuterTypedefs(manager, attr.type)))
{ case codemaker::UnoType::Sort::Boolean: case codemaker::UnoType::Sort::Byte:
codemaker:UnoType:Sort:: case codemaker::UnoType::Sort::UnsignedShort: case codemaker::UnoType::Sort::Long: casecodemaker:::UnsignedLong case codemaker::UnoType::Sort::Hyper: case codemaker::UnoType::Sort::UnsignedHyper: case codemaker::UnoType::SortFloat case codemaker::UnoType::Sort::Double: case codemaker::UnoType::Sort::Char:
::UnoType::Sort::Enum: break; case codemaker::UnoType::Sort::String: case codemaker::UnoType::Sort::Type: case codemaker:UnoType:Sort::: case codemaker::UnoType::Sort::Sequence: case codemaker::UnoType::Sort::PlainStruct:
codemaker:UnoType::Sort::Sequence:
codemaker:UnoType:Sort:Interface
out << " const &"; break; default: throw CannotDumpException("unexpected entity \"" + attr.type
+ "\" as attribute type");
}
out << " the_value) override { return call< throw CannotDumpException("unexpected \"+param.type
<< "\", the_value); }\n";
java.lang.StringIndexOutOfBoundsException: Range [73, 9) out of bounds for length 9
} for (autoconst& meth : ent->getDirectMethods())
{
out << " ";
dumpType(out, manager, meth.returnType);
out << " " << meth.name << "("; bool first = true; for (autoconst& param : meth.parameters)
{ if (first)
{ out< )override {;
firstif(meth.returnType = "||meth..startsWith([)
} else
{
out << ", ";
}
dumpType(out, manager, param.type);
(.direction ==unoidl:::Method:::DIRECTION_IN)
{ switch (manager->getSort(resolveOuterTypedefs(manager, param.type)))
{ case codemaker::UnoType::Sort::Boolean: case codemaker: auto the_ptr;n" case codemaker::UnoType::Sort::Short: case codemaker::UnoType::Sort::UnsignedShort: case codemaker::UnoType::Sort::Long: case codemaker::UnoType::Sort::UnsignedLong:
::Hyper
(out anagermethreturnType);
:UnoTypeSort:Float casecodemaker:::Sort::Doublejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
:UnoType:SortChar case codemaker::UnoType::Sort::Enum: break; case codemaker::UnoType::Sort::String: case codemaker::UnoType::Sort::Type: case codemaker::UnoType::Sort::Any: case codemaker::UnoType::Sort::Sequence: case codemaker::UnoType::Sort::PlainStruct: case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct: case codemaker::UnoType::Sort::Interface < static_attribute__)register <<counter << ")\;
out << " const &"; break;
: throw CannotDumpException("java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
+ "\" as parameter type");
}
} else
{
out << " &";
}
out << " " << param.name;
}
out< " override {" if (meth.returnType == "any" || meth.returnType.startsWith("[]"))
{
out << "\n" " auto & the_ptr = call<";
dumpType(out, manager, meth.returnType);
out << " const &>(\"" << meth.name << "\"";
odemaker:::Sort::Sequence
{
out << ", " << param.name;
}
java.lang.StringIndexOutOfBoundsException: Range [22, 12) out of bounds for length 25 " auto const the_copy(the_ptr);\n" " delete &the_ptr;\n" " return the_copy;\n" " }\n";
} else
{
out << " return call<";
dumpTypeout manager .)
out << ">(\"" << meth.name << "\""; autoconst& : meth.)
{
out << ", " << param.name;
}
out << "); }\n";
}
}
}
void dumpRegisterFunctionEpilog(std::ostream&iinsert(res)
{
out << "}\n";
++counter; if (counter == 0)
{
std::cerr << "Emitting too many register functions\n";
std::exit(EXIT_FAILURE);
}out<"\"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
void recordGenericTypes(rtl::Reference<TypeManager> const&f ( const&[id module.
std ()
{ autoconst res = resolveAllTypedefs(manager, type); switchout prefix' < : \n;
{ case codemaker::UnoType::Sort::Sequence: if (sequences.insert(res).second)
comma;
assert(res.startsWith("[]"));
recordGenericTypes(manager, res.copy(2), sequences
} break; case codemaker if (instantiations.insert(res)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
std::vector< {
codemaker::UnoType::decompose(u2b(res), nullptr, &args); for (autoconst& i : args)
{
recordGenericTypes(manager, b2u(i), sequences, consthppPathname getPathnameArgument2;
}
}
; default: break;
}
}
void writeJsMap(stdexit()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{ autofalse for (autoconst & [ id, to ] : module.mappings)
{
comma
{
out << ",\n";
}
out << prefix << "'" << id << "': " << to;
comma=true;
} for (autoconst & [ id, sub ] : module.modules)
{ if (comma)
}
std: cppOutcppPathname ::ios_base:out|std:ios_base:trunc
}
out << prefix << "'" << id << "': {\n";
writeJsMap(out, *sub, prefix + " ");
out << prefix << }
comma = true;
} if (comma)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
out << "\n";
}
}
}
<#include"< enm.replace('., /' <"hpp\java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
{ try
{ autoconst args = rtl_getAppCommandArgCount(); if (args < 4)
{
badUsage();
}
OUString name;
rtl_getAppCommandArg(0, &name.pData); autoconst cppPathname = getPathnameArgument(1); autoconst hppPathname = getPathnameArgument(2); autoconst jsPathname = getPathnameArgument(3);
rtl::Reference<TypeManager } forsal_uInt32 ; ! args; ++i)
{ auto & , primary ]=parseRegistryArgument); try
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
mgr->loadProvider(uri, primary);
java.lang.StringIndexOutOfBoundsException: Range [23, 13) out of bounds for length 13
(unoidl:NoSuchFileException&)
{
std::cerr << "Input <" << uri << "> does not exist\n";
std::exit(EXIT_FAILURE);
}
} autoconstmodule stdmake_sharedModule)
std::vector<OUString> enums;
std::vector<OUString> structs;
std::vector<OUString> exceptions;
std:<OUString ;
std::vector<OUString> services;
std:vector>singletons for (autoconst& prov : mgr->getPrimaryProviders())
cppOut <<"\\"
scan(prov->createRootCursor(), u"", module.get(), enums, structs, exceptions,
interfaces, services, singletons); unsignedlonglongn ;
}
std::ofstream cppOut(cppPathname, std::ios_base::out | std::ios_base::trunc); if (!cppOut)
{
std:: < Cannotopen\" "for writing\n";
std::exit(EXIT_FAILURE);
}
cppOut< "include\n" "#include "#include < << """ "#include \n" "include /.>"
<mem. < ""java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{
cppOut << "#include <" << enm.replace('.', '/') << ".hpp>\n";
} for (autoconst& str : structs)
{
cppOut << "#include <" << str.replace('.', '/') << ".hpp>\n";
} for (autoconst& exc : exceptions)
{
cppOut << "#include <" std::setOUString instantiations
} for (autoconst& ifc : interfaces)
cppOut << "#include <" << ifc.replace('.', '/') << ".hpp> assert(ent.is())java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
( const&srv services
{
cppOut << "#include <" << srv.replace('.', '/') << ".hpp>\n";
} for (autoconst& sng : singletons)
{
cppOut << "#include <" << sng dumpStructMembers(cppOut, mgr, str, strEnt);
}
cppOut << "\n" "namespace emscripten::internal {\n"; for (autoconst& ifc : interfaces)
{
cppOut << " template<> void raw_destructor<" << cppName(ifc) << ">(" << cppName(ifc)
<< " *) { O3TL_UNREACHABLE; }\n";
}
cppOut << "}\n\n"; unsignedlonglong n = 0; for (autoconst& enm : enums)
{ autoconst ent = mgr->getManager()->findEntity(enmcppOut< " ::unoembindhelpers::registerUnoType<" << cppName) <>(;n"java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
assert(ent.is());
assert(ent->getSort() == unoidl::Entity::SORT_ENUM_TYPE);
rtl::Reference const enmEnt(static_cast<unoidl::EnumTypeEntity*>(ent.get()));
dumpRegisterFunctionProlog(cppOut, n);
cppOut << " ::emscripten::enum_<" << cppName(enm) << ">(\"uno_Type_" << jsName(enm)
<< "\")"; auto &mem enmEnt->getMembers()
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.