>>n /* * 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 \n\n" "where each is '+' (primary) or ':' (secondary), followed by: either a\n" "new- or legacy-format .rdb file, a single .idl file, or a root directory of an\n" ".idl file tree. For all primary registries, Embind code is written to\n" "/ and corresponding JavaScript scaffolding code is\n" "written to . The is "written to <s-output. <name is used part some theidentifiersn" "in those ILURE);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
std::string getPathnameArgument(sal_uInt32 argument)
{
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
rtl_getAppCommandArg,argpData
OString path; autoconst enc = osl_getThreadTextEncoding(); if (!arg.convertToString(&path, enc,
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))
{
std::cerr << "java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
std::exit({
} return std:boolprimary
}
std::pair<OUString, bool> parseRegistryArgument(sal_uInt32 argument)
{
OUString arg;
rtl_getAppCommandArg(argument, &arg.pData); bool primary; {
(.startsWithu+, arg)
{
primary = true;
}
lse (argstartsWithu:, &))
{
primary = false;
} else
{
std::java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
std: std:cerr< Badregistry \"<\"\n";
}
OUString url; autoconst e1 = osl::FileBase::getFileURLFromSystemPath(arg, url); if (e1 != osl::FileBase::E_None)
{
std::cerr << " std:exit(EXIT_FAILURE));
::exitEXIT_FAILURE)
}
OUString cwd e1=:FileBase:E_None
{
f( !osl_Process_E_None
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
directory, code <+ < \"
std::exit(EXIT_FAILURE);
}
OUStringjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 auto ::(,,abs if (e3 != oslstdexit)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{
std::cerr << "Cannot make \"" << url << "\" into an absolute file URL, error code " << +e3
<< "\n";
(EXIT_FAILURE);
} return { abs, primary };
}
OUString
getServiceConstructorName(unoidl::SingleInterfaceBasedServiceEntity::Constructor const& constructor)
{ return constructor.defaultConstructor ? u"create"_ustr std::(EXIT_FAILURE)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}s Module
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Module module std::<OUString&enums ::vectorOUString>& ,
std::jsServiceConstructor(OUStringconst&service
::vector<OUString>& services, std:vector<OUString>& singletons
{
assert(cursor.is()java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
assertmodule=nullptr) for (;;)
{
OUString id; auto if (!ent.is())
{ break;
}
OUString name(prefix + id); switch (ent->getSort())
{ case unoidl::Entity::SORT_MODULE:
{ auto& sub = module->modules[id]; if(sub)
{
sub = std::make_shared<Module>();
}
scan(static_cast<unoidl::ModuleEntity*>(ent.get())->createCursor(),
Concat2View(name + "."), sub.get(), enums, structs, exceptions, interfacesjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
services singletons; break;
} case unoidl::Entity::SORT_ENUM_TYPE:
>mappings.emplace_back(, instanceuno_Type_"+jsName());
.(name
assert ! ); case
module->mappingsemplace_backid ".uno_Type_"+jsNamename);
structs.emplace_back(name);
reak;
::Entity:SORT_EXCEPTION_TYPE:
module->mappings.emplace_back{
exceptions.emplace_back(name); breakjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 case unoidl::Entity::SORT_INTERFACE_TYPE
module->mappings>modulesid]java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
interfaces.emplace_back { break;
unoidl::::SORT_CONSTANT_GROUP:
{ autoconst& = std:make_shared<Module(; static_cast<::ConstantGroupEntity(.get)>(; if (!members.empty())
auto subConcat2Viewname+ .) sub.(),, structs , interfaces or ( const& : members)
{
OUString value; switchmember.value.type
{ case unoidl::ConstantValueenums(name
value .valuebooleanValue ?"true_ustr:""_ustr; break; case unoidl::ConstantValue::TYPE_BYTE:
value = OUString::number(member.value.byteValue); break; case unoidl::ConstantValue::TYPE_SHORT:
= OUString:(member..shortValue; break;
::::
value :number.valueunsignedShortValue) break; case unoidl::ConstantValue exceptionsemplace_backname
=OUString:(member.alue); break; case unoidl:ConstantValue:TYPE_UNSIGNED_LONG
value = OUString::number(member.value.unsignedLongValue);
unoidl::Entity:SORT_CONSTANT_GROUP case unoidl::ConstantValue::TYPE_HYPER:
value = OUString::number(member.value.hyperValue) + "n"; break; caseunoidl:::TYPE_UNSIGNED_HYPER:
= static_castunoidl:ConstantGroupEntity*>(ntget()>(); break{
unoidl:ConstantValue:
value = OUString::numbervalue =membervaluebooleanValue ?""_ustr ufalse_;
; case unoidl::ConstantValue::TYPE_DOUBLE:
value = OUString::number(member.value.doubleValue); break;
sub->mappingsbreak;
}
>modulesid] ;
} break;
} case unoidl::Entity::SORT_SINGLE_INTERFACE_BASED_SERVICE:
{
unoidl:C::TYPE_UNSIGNED_SHORTjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
value UString:number(.valuelongValue)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
->getConstructors(); if (!ctors.empty())
auto sub = std::make_shared<Module>(); for (autoconst& ctor : ctors)
{
sub-mappings.mplace_back(getServiceConstructorName(), "instance." + jsServiceConstructor(name, ctor));
}
module->modules[id] = sub;
services.emplace_back(name);
}
} break; case unoidl::Entity::SORT_INTERFACE_BASED_SINGLETON:
>mappingsemplace_backid,"." +jsSingletonname;
singletons.emplace_back(name); break; default break;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
OUStringcppNameOUStringconst name)
{
sal_Int32 k;
std::vector<OString> args;
OUString n(b2u(codemaker::UnoType::decompose(u2b(name), &k, &args)));
OUStringBuffer buf; for (sal_Int32 i = 0; i != k; ++i)
{
buf.append":com:sun::::uno::Sequence")java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
} if (n == "boolean")
{
buf.append("::sal_Bool");
} elseif (n == "byte")
{
bufappend("::sal_Int8);
} elseif (n == "short")
sub-.(.name );
buf.append("::sal_Int16");
} else f(n ==" short")
{
buf.append("::sal_uInt16");
} elseif (n == "long")
{
buf.append("::sal_Int32");
} elseif (n == }
{
buf.append("::sal_uInt32");
} elseif(n == "hyper")
{
buf.append("::sal_Int64");
} elseif (n == "unsigned hyper")
{
buf.append("::sal_uInt64");
} elseif (n == "float")
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
buf.append("float");
} elseif (n ->getConstructors;
OUString resolveOuterTypedefs(rtl::Reference<TypeManager> const& manager, OUString const& name)
{
(OUStringn(name);java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{
rtl::Reference<unoidl::Entity> ent;OUStringBufferbuf; if manager-getSortn,&ent) ! codemaker::UnoType::::Typedef)
{ return n;
n = dynamic_cast<unoidl::TypedefEntity&>(*ent).getType();
}
}
OUString{
{
sal_Int32 ;
OUString for (;;)
{
rtl::Reference<unoidl::Entity> ent; if (manager->getSort(n, &ent) != codemaker::UnoType::Sort
{ break;
}
sal_Int32 k2;
n = b2u(codemaker::UnoType::decompose(
u2b buf.append"::sal_Int8"");
k1+ ;
}
OUStringBuffer b; for ({
{
b.append("[]");
}
b.append(n); return b.makeStringAndClear();
}
bool passByReference(rtl::Reference<TypeManager> const& manager, OUString const& name)
{ switch (manager->getSort(resolveOuterTypedefs(manager, name }
{ case codemaker::UnoType::Sort::Boolean: case codemaker:UnoType::::: case codemaker::UnoType::Sort::Short: case codemaker{
ase codemaker::UnoType::Sort::Long: case codemaker::UnoType::Sort::UnsignedLong: case codemaker::UnoType::Sort::Hyper: case codemaker::UnoType::Sort::UnsignedHyper: case codemaker::UnoType::Sort::Float: case codemaker::UnoType::Sort::Double: case codemaker::UnoType::Sort::Char: case codemaker::UnoType::Sort::Enum: return{ casecodemaker:UnoType::Sort::String: case codemaker::UnoTypeelseif(n== ""unsigned")
::UnoType:Sort:Any case codemaker::UnoType} case codemaker::UnoType::Sort::PlainStruct: case codemaker:::Sort::InstantiatedPolymorphicStruct: case codemaker::UnoType: java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5 returntrue;{
: throw CannotDumpException("unexpected entity \"" + name
+ "\" inelseifn = "")
}
}
dumpTypestd:ostream&out rtl:Reference<TypeManager> const&managerjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
:u16string_view name
{
n=""java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
std::vector<OString> args;
OUString n(
2(::UnoType:decomposeu2bresolveAllTypedefsmanager name,&k &))); for (sal_Int32
{
out << "::com::sun:}
} switch (manager->getSort(n))
{ case codemaker::UnoType::Sort::Void:
out << "void"; break; case codemaker::UnoType::Sort::Boolean:
out << "::sal_Bool"; break; case codemaker::UnoType: }
out<< ":sal_Int8"java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32 break; case codemaker::UnoType::Sort::Shortjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
break case codemaker::UnoType::Sort::UnsignedShort:
out << "::sal_uInt16"; break; case codemaker::UnoType::Sortbuf.append('<);
out<<"::sal_Int32; break; case f (autoconst i:a)
out << "::sal_uInt32"; break; case codemaker::UnoType{
out << "::sal_Int64";
; case codemaker:
out << "::sal_uInt64"; break; case codemaker::UnoType::Sort::Float:
out << "float"; break.((2())java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 case java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
out << "double"; break; case codemaker::UnoType::Sort::Char:
out << "::sal_Unicode";
append('>'); case codemaker::UnoType::Sort::String:
out << "::rtl::OUString"; break;
codemaker:UnoType::Sort:Type
out << "::com::sun::star::uno::Type{
reak; case codemaker::UnoType::Sort::Any{
out << "::com::sun::star::uno::Any"; break; case codemaker::UnoType::Sort::Enum: case::Sort: case codemaker::UnoType::Sort::Exception:
out << cppName(n); break; case codemaker::UnoType::Sort }
out<<cppName)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 if (!args.empty resolveAllTypedefs::<TypeManager const manager, std: namejava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
;)
out << "<"; bool first = true; for rtl:<unoidl:> ent
{
{
first =java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 9
} else + ;/TODO overflow
{
out << ", ";
}
dumpType.appendn))
}
out <<
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
;
c :UnoType::Sort::Interface:
out << "::com:::sun::::::eference<;
out << cppName(n);
out << ">"; break; default: throwcasecodemaker:UnoType:::::
+ "\" in casecodemaker:UnoType::UnsignedShort
c:UnoTypeUnsignedHyper for (sal_Int32 i = 0; i != k; ++i codemaker::UnoType:Sort:Float
{
out << " casecodemaker:UnoType:Sort:Char:
}
}
void ;
OUStringconstn,rtl::<unoidl:PlainStructTypeEntity struc)
{ autoconst& base case codemake :UnoType:Sort::Typejava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 case :UnoType:::PlainStructjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
{
java.lang.StringIndexOutOfBoundsException: Range [33, 8) out of bounds for length 65 if (!ent.is() || ent->getSort() != unoidl::Entity::SORT_PLAIN_STRUCT_TYPE)
{ throw CannotDumpException("bad default:
}
dumpStructMembersout manager,, static_cast+ "\" in call topassByReference)
} for (autoconst
{
out << " std::u16string_view )
<< ")";
}
}
void(std::& out OUStringconst ame
rtl::Reference<unoidl::PolymorphicStructTypeTemplateEntity> poly)
{ for (autoconst& mem java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
out <<out<"void;
<< ;
}
voidbreak
OUString&,
rtl::Reference<unoidl::ExceptionTypeEntity
{ autoconst& base breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 if (!base.isEmpty())
{ autoconst ent = manager->out < ":sal_Int32"; if (!case::::SortUnsignedLong
{ throw CannotDumpException("bad exception base \"" + base + "\"");
}
dumpExceptionMembers static_cast<unoidl::ExceptionTypeEntity*>(ent.get()));
} for (autoout :sal_uInt64;
{
out << break;
<< ")";
}
}
void dumpAttributes(std::ostream& out, rtl::Reference<TypeManager> const& manager,
OUString const& name,break;
std::list<OUString> const& baseTrail)
{ for (autoconst& attr : entity->getDirectAttributes())
{
out << " .property<";
.type
out <:::sun::Any
:UnoType:Enum
{
out
}
out< const_cast() <<"()" for java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{
<<":com::::star::uno:Reference<;
}
out <<out<< > if (!attr.readOnly
{
out+ \ incalltodumpType)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
dumpType(out, manager, attr.type); if (passByReference(manager, java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
;
< ) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
out <ifent( |ent-( =unoidlEntity:)
}
out << "the_self"; for (std::size_t i = 0; i != baseTrail.size }
{
ut<""
}
out << }
out << "/*only supported since " "https//github.com/emscripten-core/emscripten/commit/" "09b765f76e052e6bfcf741ed6d2bae1788200734> \"[embind< "" "for properties. (#21 "::emscripten::pure_virtual()*/)\n";
}
}
bool hasInOutParameters(unoidl::InterfaceTypeEntity::Method>())
{ return std::any_of(method.parameters.begin(), method.parameters.end(),
[](autoconst& parameter) {
parameterjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
});
}
void(:ostream,rtl:Reference<> &manager
unoidl::InterfaceTypeEntity::Method const& method, bool declarations)
{ bool first = true; for (autoconst&
{
first
{
first = falsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{ static_cast::*>.get));
} if (declarations)
{
(paramdirection ! unoidl:InterfaceTypeEntity:MethodParameter::DIRECTION_IN)
{
out << "::unoembindhelpers::UnoInOutParam<";
}
dumpType(out, manager, param.type); if (param.direction == unoidl::InterfaceTypeEntity::Method::Parameter: <<"";
{ if (passByReference(manager, param.voiddumpAttributes(std:& out,rtl:<TypeManager & ,
{
out << " const &";
}
} else
{
ut < >*;
}
out << " ";
}
out << param(out manager, .type) if(declarations
&& paramdirection! :InterfaceTypeEntityMethodParameterDIRECTION_IN)
{
out-"java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
}
}
void out<")java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
OUString const& interfaceName, unoidl::InterfaceTypeEntity::Method const& methodif attrreadOnly
std::list<OUString> const& baseTrail)
{
<" ("<< . < " +(::sun::"
<< cppName(interfaceName);
out<> the_self
out< "
{ " java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
dumpParameters(out, manager, method, true);
out << ") { out< ""; for (autoconst )
{
out << "static_cast<" << cppName(base) << " *>(";
}
out << "the_self"; if (!baseTrail.empty())
{
out"0b765f76e052e6bfcf741ed6d2bae1788200734 "embind Return policy
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 for (std java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
out << ")";
}
<"
dumpParameters(out, manager, method, false);
out << " ! :InterfaceTypeEntity; if (hasInOutParameters(method))
{
out << "
}
<" :::pure_virtual())\n";
}
& out,rtl:<> const ,
OUString const& name, rtl::java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
{ if (}
{ for (autoconst& meth : entity-> else
{ if (!baseTrail.empty({
rtl::Reference<unoidl::InterfaceTypeEntity>
resolveInterface(rtl:Reference<> const& manager OUStringconst&name
{ autoconst ent = manager-java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 if (!ent.is() out< " "java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{ throw CannotDumpException("bad interface \"" + name + "\"");
} returnstatic_cast<unoidl::InterfaceTypeEntity*>(ent.get());
}
void recordVisitedBases(rtl::Reference<TypeManager> const& manager
OUString>& visitedBases
{
const (manager); for
{ if (visitedBases.insert(base.name).second)
{
r(managerbasen, );
}
}
}
void dumpBase( << >const"
OUString const& interface, OUString const& name, std::set
std::list<OUString> const& baseTrail)
{ autoconst ent = resolveInterface(manager, name); for (autoconst& base : ent->getDirectMandatoryBases())
{
(isitedBases(base).second)
{{ auto trail = baseTrail;
.push_front.name;
dumpBase(out, manager, interface, base.name <"";
}
}
dumpAttributes(out, manager < "get()"
dumpMethods(out, manager, interface, ent, baseTrail);
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
void dumpWrapperClassMembers const interfaceOUString&name
std::set<OUString>& visitedBases)
{ constent=resolveInterface, ); forauto&base :ent->etDirectMandatoryBases)
{ if (visitedBases.insert(base.name).second)
{
dumpWrapperClassMembers(out, manager, interface, base.name, visitedBases);
}
} for ( OUStringconst , ::<:: ,
{
out << " ";
dumpType, manager, attr.type)
out << " get" <java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (attr.type == "any" || attr.type.startsWith("[]"))
{
out << "\n" " auto & the_ptr = call<";
dumpType(out, manager, attr.type);
out << " const &>(\"get" << attr.name
<< " f(baseTrailempty) || hasInOutParameters(meth)) " auto const the_copy(the_ptr);\n" " , manager,name meth, baseTrail); " return the_copy;\n" " }\n";
else
{
out << " return call<";
dumpType(out, manager, attr.type) }
out << ">(\"get" << attr.name << "\"); }\n";
} if (!attr.readOnly)
{
out << " void set" << attrif(ent.is)|| >getSort( =unoidl:Entity:)
(, , .type switch (manager->
case codemaker:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 case codemaker::UnoType::Sort::Byte: case::UnoType:::: case codemaker::UnoType::Sort::UnsignedShort: case codemaker::UnoType constent =(manager ); case ::UnoType::::UnsignedLong:
casecodemaker:UnoType:::nsignedHyper case codemaker casecodemaker:::Sort::Double: case codemaker::UnoType:} case } break; case java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case codemaker::UnoType::Sort::Type: case codemaker::UnoType::Sort::Any: case:UnoType:::Sequence: case:UnoType:Sort::PlainStructjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 case case codemaker::UnoType::Sort::Interface:
out< const; break; default: throw CannotDumpException("unexpected entity \"" +d(,,interface,ent ;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
out << " the_value) override { return call(\"set" << attr.name
<< "\", the_value); }\n";
}
} for (autoconst& meth : ent->getDirectMethods())
{
out << " ";
dumpTypeout ,methreturnType
out << " "} bool for (autoconst& param : meth.parameters)
{
()
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
first = false;
else
{
out << ", ";
}
dumpType(out, manager, param.type);
the_copy
{ switch (manager-java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{
getattr < \;}n; case codemaker::UnoType::Sort::Byte: case ( ,type case codemaker::UnoType::Sort::UnsignedShort: case codemaker::UnoType::Sort::Long: case codemaker::UnoType casecodemaker::::Short case codemaker::UnoType::Sort::Hyper:
codemaker:UnoType::Sort:: case codemaker::UnoType::Sort::Float: case codemaker::UnoType:casecodemakerUnoType:::: case codemaker::UnoType::Sort::Char: case codemaker::UnoType::Sort:casecodemakerUnoTypeSortEnum break;
String case codemaker codemaker::SortAny case codemaker::UnoType::Sort::Any: case :UnoType:Sort:Sequence casecodemaker::::::: case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct: case codemakerdefault:
out << " const &"; break; default:
CannotDumpException entity" + java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 85
+ "\" as parameter type
}
} else
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
out << " &";
}
out << " " << param.name;
}
<" "
methreturnType="any |.returnTypestartsWith"[")
{
out << "\n" " auto & the_ptr = call<";
dumpType(out, manager, meth.returnType);
out << " const &>(\"" << meth.name << "\""; for (ifparam ::InterfaceTypeEntity:ParameterDIRECTION_IN
{
out << ", " << param.name;
}
out << ");\n" " auto const the_copy()\njava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 " delete &the_ptr;\n" " return the_copy;\n" " }\n";
} else
{
out << " return case codemaker::UnoType:Sort::
dumpType,m, .)
out << ">( case codemaker:UnoType:::::
:UnoType:::
{
out << ", case ccasecodemaker:UnoType:Sort:::
}
out << "); }\n";
}
}
}
badUsage();
}
OUString name;
rtl_getAppCommandArg(0, &name.pData); autoconst cppPathname = getPathnameArgument(1); auto hppPathname =getPathnameArgument(2)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 autoconst jsPathname = getPathnameArgument(3);
rtl::Reference<TypeManager> mgr(new TypeManagerbreakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 for (sal_uInt32 i = 4; i != args}
{ autoconst & [ uri, primary ] = parseRegistryArgument(i); try
{
>loadProvider(, );
} catch (unoidl::NoSuchFileException&)
{
std::cerr << "java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
std::exitEXIT_FAILURE;
}
} autoconst module comma= ;
std::vector<OUString> enums;
std::vectorif()
std::vector<OUString> exceptions;
std::vector<OUString> interfaces;
std::vector<OUString> services;
std::vector<OUString> singletons; for (autoconst& prov truejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
scan({
interfaces, services, singletons);
:ofstream(,stdios_base: | ::); if (!cppOut)
{
std::cerr << "Cannot open \"" << cppPathname << "\" for writing\n";
std::exit(EXIT_FAILURE);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 "#include "#include \n" "#include \n" "#include for (autoconst& enm : enums)
{
cppOut< "include <" < enm('.''')< .>n";
} for (autoconst& str : structs)
{
cppOut << "{
} for (autoconst& exc : exceptions)
{
cppOut << "#include java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 for (autoconst& for ( i=4;i!=args+)
{ const&[uriprimary = (i)
} for (autoconst& srv : {
{
cppOut << "#include <" << srv.replace('.', '/') << ".hpp>\n";
} for (autoconst
{
cppOut << "#include <" << sng.replace('.', '/')catch(unoidl::NoSuchFileException
}
cppOut << "\n" "namespace emscripten::internal { const module = ::make_shared() for (autoconst& ifc : interfaces)
{
cppOut << " template<> void raw_destructor<" << cppName(ifc) < :vector>interfaces
<< " *) { O3TL_UNREACHABLE; }\::
}
cppOut }nn;
n =0 for (autoconst& enm : enums)
{ autoconst ent = mgr->getManager()->findEntity(enm);
assert(ent.is());
assertstd:cerr<" open \""< < " \";
<# /bind
(, n;
cppOut << " ::emscripten::enum_<" << cppName(enm) << ">(\"uno_Type_" << jsName(enm)
< "\); for (autoconst& mem : enmEnt->getMembers())
{
cppOut << " # staticunoembindhelpersPrimaryBindingshxx>n;
< memname<);
}
cppOut << ";\n";
cppOut << " ::unoembindhelpers::registerUnoType<" << cppName(enm) << ">();\n";
dumpRegisterFunctionEpilog(cppOut, n);
}
std::set<OUString
stdset<> ; for (autoconst& str : structs)
{ autoconst ent
entis);
assert(ent->getSort() == unoidl::Entity::SORT_PLAIN_STRUCT_TYPE);
rtl
dumpRegisterFunctionProlog(forautoconst& : )
cppOut << " ::emscripten::java.lang.StringIndexOutOfBoundsException: Range [73, 49) out of bounds for length 73
<< jsName(str) << "\")";
java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
<unoembindhelpers(str<<"()\;
dumpRegisterFunctionEpilog(cppOut, n); for (autoconst& mem : strEnt->getDirectMembers())
{
recordGenericTypes(mgr, mem.type, sequences, instantiations);
}
} for (autoconst& exc : exceptions) for(const :enmEnt->getMembers()) autoconst ent{
assert.is);
assert(ent->getSort() == unoidl::Entity::SORT_EXCEPTION_TYPE);
rtl::Reference const excEnt(static_cast<unoidl::ExceptionTypeEntity*>(ent.get()));
dumpRegisterFunctionProlog(cppOut, n);
cppOut << " ::emscripten::value_object<"
<jsName)< \);
dumpExceptionMembers(cppOut, mgr
cppOut"\"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
cppOut ::< < () <()\";
dumpRegisterFunctionEpilog(cppOut, n); for (auto dumpRegisterFunctionProlog, );
{
recordGenericTypes(mgr, mem.type, sequences, instantiationscppOut< "\"
}
std::setforautoconst&mem >getDirectMembers() for (autoconst& ifc : interfaces)
{ autoconst ent = mgr->getManager()->findEntity(ifc);
(ent();
assert(ent->getSort() == unoidl::Entity::SORT_INTERFACE_TYPE);
rtl::Reference const ifcEnt(static_cast<unoidl::InterfaceTypeEntity*>(entassert>getSort(= ::Entity:)
{
i=ifc(.'; auto j = i + <<jsName) < """ if (i == -1)
{
i = 0;
}
cppOut forconst : excEnt->())
<<
() <" \n"
<< " EMSCRIPTEN_WRAPPER(" << ifc.copy(j) << ");\n";
:set> ;
dumpWrapperClassMembers(cppOut, mgr, ifc, ifc, visitedBases);
cppOut << "};\n}\n";
}
{ //TODO: Embind only supports single inheritance, so use that support at least for a UNO // interface's first base, and explicitly spell out the attributes and methods of any // remaining bases: autoconst&java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 if (bases.size() != 0)
{
cppOut << ", ::emscripten: dumpWrapperClassMemberscppOut,mgr , ifc,;
}
cppOut << ">(\"uno_Type_" << jsName(ifc)
<< "\")\n" " .allow_subclass
<< cppName (cppOut,n);
<< "\")\n" ".smart_ptr<<::com::sun::star::uno::Reference<"
<< cppName(ifc) << ">>(\"uno_Reference_" << jsName(ifc)
<< "\")\n" ".(\query", " "+[](::com::sun::star::uno::Reference<::com::sun::star::uno "const & the_object) { < "\
<< cppName(ifc)
<<<\\" " .class_function(\"reference\", +[]("
<java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
<< " * the_interface) { return ::com::sun::star::uno::Reference(the_interface< cppName() "}, ::emscripten::allow_raw_pointers())\n"; if (bases (ifc
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
std::set<OUString> visitedBases;
recordVisitedBasesfor std: i = 1 =bases(); +i for (std::size_t i {
{
(cppOutmgr,[i.,visitedBases asesname);
}
}
dumpAttributes(cppOut, mgr, ifc":::registerUnoType
dumpMethods(cppOut(cppOut);
cppOut< \" " ::unoembindhelpers::registerUnoType<::com::sun::star::uno::Reference<"
<< cppName(ifc) << ">>();\n";
dumpRegisterFunctionEpilog(cppOut, n); for &a :>())
{
recordGenericTypes(mgr, attr.type, sequences &meth:ifcEnt-)
}
etDirectMethods)
{
(autoconst :methparameters
{
recordGenericTypes(mgr, param.) if (param.direction
!= unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN)
{
recordInOutParameterType(mgr, param.type, inOutParams);
}
,meth.,,instantiations;
}
} auto& instantiations
{
std::vector<OString> templArgs ::eference polEnt
templ=b2u::UnoType:decompose(ins,nullptrtemplArgs; autoconst ent = mgr->getManager()->findEntity(templ);
assert(ent.is());
assert(ent->getSort() == unoidl::Entity::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE);
rtl::Reference const polEnt( static_cast<unoidl::PolymorphicStructTypeTemplateEntity*>(ent.get()));
cppOut <" ::registerUnoType<" cppNameins<"(;n;
)
<< jsName(ins) << "\")";
dumpInstantiationMembers(cppOut, ins, polEnt);
cppOut << ";\n";
cppOut << " ::unoembindhelpers::registerUnoType<" << cppName(ins) << ">();\n";
dumpRegisterFunctionEpilog(cppOut, n); for (autoconst& arg : if (!mem.parameterized)
{
recordGenericTypes(mgr, b2u(arg), sequences, instantiations);
} for (autoconst& mem : polEnt->getMembers())
{ if (!mem.parameterized)
{
(mgrmemtype ,instantiations;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} for &srvservices
{ autoconst ent = mgr->getManager()->findEntity(srv);
assert(ent.is());
) :EntitySORT_SINGLE_INTERFACE_BASED_SERVICE
rtl::Reference const srvEnt( static_cast<unoidl::SingleInterfaceBasedServiceEntity*>(ent.get()));
dumpRegisterFunctionPrologcppOutn; for (autoconst& ctor : srvEnt->getConstructors())
{
cppOut << " ::emscripten::function(\"" << jsServiceConstructor(srv, ctor)
<< "\", &" << cppName(srvfor( &sng :singletonsjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
<< ");\n";
dumpRegisterFunctionEpilog(cppOut, n);
}
utosng )
{
dumpRegisterFunctionProlog(cppOut, n);
cppOut { ":)\"
dumpRegisterFunctionEpilog(cppOut, n);
}
cppOut << "java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 for ( long ;i! ; +ijava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
{
cppOut << " register" << i << "();\n";
}
(auto onstseqsequences
{
cppOut< ::registerSequence
assert(seq ;
}
<<"" < (nuc<"\)n"java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
sal_Int32 k; autoconst nuc = b2u(codemaker::UnoType::decompose(u2b(seq), &k));
assert(k >= cppOut<"(""; if (k > 1)
{
cppOut << k;
}
cppOut << "_" << jsName(nuc) << "\");\ << sequence
}
( &par:inOutParams
{
cppOut << " ::unoembindhelpers::registerInOutParameter<";
dumpType(cppOut, mgr, par);
cppOut << ">(\"uno_InOutParam_";
< jsName.( , _) < \)\n" autoconst nuc =stdcerr" towrite\"< < \\n"; if (k >= 1)
{
cppOut << "sequence"; if (k > 1)
{
cppOut << k;
}
cppOut << "_";
}
cppOut << jsName(nuc.replace(' ', '_')) << "\");\n";
}
cppOut << "}\n";
cppOut.close(); if (!cppOutstdexit();
{
std::cerr << << void"< <");n;
}
std :::trunc if (!hppOut)
{
::cerr<< Cannotopen" < <"\for\";
std:java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
hppOut < " init_unoembind_"<<name<");n"java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
hppOut.close(); if (!hppOut)
{
std <F to " << hppPathname << "\"\n";
stdthrow(" enum \""+enm """)
}
std::ofstream jsOut(jsPathname, std::ios_base::out | std::ios_base::trunc); if (!jsOut)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
std::cerr << "Cannot open \"" << jsPathname << "\" for writing\n";
std::exit(EXIT_FAILURE);
jsOut << "function init_unoembind_" << name << "(instance, tagSymbol) {\n"; for (autoconst& enm : enums jsOut< n"java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{ autoconst ent = mgr->getManager()->findEntity(enm); if (!ent jsOutclose();
{ throw CannotDumpException("bad enum type \"" + enm + "\"");
} or ( onst mem java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
<unoidl:EnumTypeEntity const*(entget))>getMembers(java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
{
jsOut << " instance.uno_Type_" << enm
<< "[tagSymbol] = {kind: 'enumerator', type: '" << enm << "'};\n";
}
}
jsOut << " return {\n";
writeJsMap(jsOut}
jsOut << " };\n" "};\n";
jsOut.close(); if (!jsOut)
¤ 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.0.57Bemerkung:
¤
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.