20#ifndef INCLUDED_COMPHELPER_UNWRAPARGS_HXX
21#define INCLUDED_COMPHELPER_UNWRAPARGS_HXX
27#include <com/sun/star/uno/Sequence.hxx>
28#include <com/sun/star/uno/XInterface.hpp>
29#include <com/sun/star/lang/IllegalArgumentException.hpp>
37 const OUString& str, sal_Int32 nArg,
38 const css::uno::Reference< css::uno::XInterface >& xErrorContext =
39 css::uno::Reference< css::uno::XInterface >() )
41 throw css::lang::IllegalArgumentException(
42 str, xErrorContext,
static_cast< sal_Int16
>( nArg ) );
45 template<
typename T,
typename... Args >
46 inline void unwrapArgsError(
const OUString& str, sal_Int32 nArg, T&, Args&... args )
52 const css::uno::Sequence< css::uno::Any >&,
54 const css::uno::Reference< css::uno::XInterface >& )
60 const css::uno::Sequence< css::uno::Any >&,
66 template<
typename T,
typename... Args >
68 const css::uno::Sequence< css::uno::Any >& seq,
69 sal_Int32 nArg, ::std::optional< T >& v, Args&... args );
71 template<
typename T,
typename... Args >
73 const css::uno::Sequence< css::uno::Any >& seq,
74 sal_Int32 nArg, T& v, Args&... args )
76 if( seq.getLength() <= nArg )
81 if( !fromAny( seq[nArg], &
v ) )
84 "Cannot extract ANY { " +
85 seq[nArg].getValueType().getTypeName() +
94 template<
typename T,
typename... Args >
96 const css::uno::Sequence< css::uno::Any >& seq,
97 sal_Int32 nArg, ::std::optional< T >& v, Args&... args )
99 if( nArg < seq.getLength() )
110template<
typename... Args >
112 const css::uno::Sequence< css::uno::Any >& seq,
css::uno::Type const & get()
void unwrapArgs(const css::uno::Sequence< css::uno::Any > &, sal_Int32, const css::uno::Reference< css::uno::XInterface > &)
void unwrapArgsError(const OUString &str, sal_Int32 nArg, const css::uno::Reference< css::uno::XInterface > &xErrorContext=css::uno::Reference< css::uno::XInterface >())
void unwrapArgs(const css::uno::Sequence< css::uno::Any > &seq, Args &... args)