text:
namespace Poco {

#if defined(_MSC_VER)
#define POCO_TYPEWRAPPER_DEFAULTVALUE(T) TypeWrapper<T>::TYPE()
#else
#define POCO_TYPEWRAPPER_DEFAULTVALUE(T) typename TypeWrapper<T>::TYPE()
#endif

template <class T0,
	class T1 = NullTypeList,
	class T2 = NullTypeList,
	class T3 = NullTypeList,
	class T4 = NullTypeList,
	class T5 = NullTypeList,
	class T6 = NullTypeList,
	class T7 = NullTypeList,
	class T8 = NullTypeList,
	class T9 = NullTypeList,
	class T10 = NullTypeList,
	class T11 = NullTypeList,
	class T12 = NullTypeList,
	class T13 = NullTypeList,
	class T14 = NullTypeList,
	class T15 = NullTypeList,
	class T16 = NullTypeList,
	class T17 = NullTypeList,
	class T18 = NullTypeList,
	class T19 = NullTypeList>
struct Tuple
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
		typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
		typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
		typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16),
		typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAULTVALUE(T17),
		typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAULTVALUE(T18),
		typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER_DEFAULTVALUE(T19)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t10, typename TypeListType<T11,T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t11, typename TypeListType<T12,T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t12, typename TypeListType<T13,T14,T15,T16,T17,T18,T19>::HeadType
			(t13, typename TypeListType<T14,T15,T16,T17,T18,T19>::HeadType
			(t14, typename TypeListType<T15,T16,T17,T18,T19>::HeadType
			(t15, typename TypeListType<T16,T17,T18,T19>::HeadType
			(t16, typename TypeListType<T17,T18,T19>::HeadType
			(t17, typename TypeListType<T18,T19>::HeadType
			(t18, typename TypeListType<T19>::HeadType
			(t19, NullTypeList()))))))))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12,
	class T13,
	class T14,
	class T15,
	class T16,
	class T17,
	class T18>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
		typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
		typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
		typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16),
		typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAULTVALUE(T17),
		typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAULTVALUE(T18)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t10, typename TypeListType<T11,T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t11, typename TypeListType<T12,T13,T14,T15,T16,T17,T18>::HeadType
			(t12, typename TypeListType<T13,T14,T15,T16,T17,T18>::HeadType
			(t13, typename TypeListType<T14,T15,T16,T17,T18>::HeadType
			(t14, typename TypeListType<T15,T16,T17,T18>::HeadType
			(t15, typename TypeListType<T16,T17,T18>::HeadType
			(t16, typename TypeListType<T17,T18>::HeadType
			(t17, typename TypeListType<T18>::HeadType
			(t18, NullTypeList())))))))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12,
	class T13,
	class T14,
	class T15,
	class T16,
	class T17>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
		typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
		typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
		typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16),
		typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAULTVALUE(T17)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t10, typename TypeListType<T11,T12,T13,T14,T15,T16,T17>::HeadType
			(t11, typename TypeListType<T12,T13,T14,T15,T16,T17>::HeadType
			(t12, typename TypeListType<T13,T14,T15,T16,T17>::HeadType
			(t13, typename TypeListType<T14,T15,T16,T17>::HeadType
			(t14, typename TypeListType<T15,T16,T17>::HeadType
			(t15, typename TypeListType<T16,T17>::HeadType
			(t16, typename TypeListType<T17>::HeadType
			(t17, NullTypeList()))))))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12,
	class T13,
	class T14,
	class T15,
	class T16>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
		typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
		typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15),
		typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAULTVALUE(T16)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13,T14,T15,T16>::HeadType
			(t10, typename TypeListType<T11,T12,T13,T14,T15,T16>::HeadType
			(t11, typename TypeListType<T12,T13,T14,T15,T16>::HeadType
			(t12, typename TypeListType<T13,T14,T15,T16>::HeadType
			(t13, typename TypeListType<T14,T15,T16>::HeadType
			(t14, typename TypeListType<T15,T16>::HeadType
			(t15, typename TypeListType<T16>::HeadType
			(t16, NullTypeList())))))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12,
	class T13,
	class T14,
	class T15>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
		typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14),
		typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAULTVALUE(T15)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13,T14,T15>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13,T14,T15>::HeadType
			(t10, typename TypeListType<T11,T12,T13,T14,T15>::HeadType
			(t11, typename TypeListType<T12,T13,T14,T15>::HeadType
			(t12, typename TypeListType<T13,T14,T15>::HeadType
			(t13, typename TypeListType<T14,T15>::HeadType
			(t14, typename TypeListType<T15>::HeadType
			(t15, NullTypeList()))))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12,
	class T13,
	class T14>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13),
		typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAULTVALUE(T14)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13,T14>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13,T14>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13,T14>::HeadType
			(t10, typename TypeListType<T11,T12,T13,T14>::HeadType
			(t11, typename TypeListType<T12,T13,T14>::HeadType
			(t12, typename TypeListType<T13,T14>::HeadType
			(t13, typename TypeListType<T14>::HeadType
			(t14, NullTypeList())))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12,
	class T13>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12),
		typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAULTVALUE(T13)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12,T13>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12,T13>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12,T13>::HeadType
			(t9, typename TypeListType<T10,T11,T12,T13>::HeadType
			(t10, typename TypeListType<T11,T12,T13>::HeadType
			(t11, typename TypeListType<T12,T13>::HeadType
			(t12, typename TypeListType<T13>::HeadType
			(t13, NullTypeList()))))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11,
	class T12>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11),
		typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAULTVALUE(T12)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11,T12>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11,T12>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11,T12>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11,T12>::HeadType
			(t8, typename TypeListType<T9,T10,T11,T12>::HeadType
			(t9, typename TypeListType<T10,T11,T12>::HeadType
			(t10, typename TypeListType<T11,T12>::HeadType
			(t11, typename TypeListType<T12>::HeadType
			(t12, NullTypeList())))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10,
	class T11>
struct Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10),
		typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAULTVALUE(T11)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10,T11>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10,T11>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10,T11>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10,T11>::HeadType
			(t7, typename TypeListType<T8,T9,T10,T11>::HeadType
			(t8, typename TypeListType<T9,T10,T11>::HeadType
			(t9, typename TypeListType<T10,T11>::HeadType
			(t10, typename TypeListType<T11>::HeadType
			(t11, NullTypeList()))))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9,
	class T10>
struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7,T8,T9,T10, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9),
		typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAULTVALUE(T10)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9,T10>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9,T10>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9,T10>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9,T10>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9,T10>::HeadType
			(t6, typename TypeListType<T7,T8,T9,T10>::HeadType
			(t7, typename TypeListType<T8,T9,T10>::HeadType
			(t8, typename TypeListType<T9,T10>::HeadType
			(t9, typename TypeListType<T10>::HeadType
			(t10, NullTypeList())))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8,
	class T9>
struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7,T8,T9, NullTypeList>
{
	typedef typename TypeListType<T0, T1,T2,T3,T4,T5,T6,T7,T8,T9>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8),
		typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTVALUE(T9)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8,T9>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8,T9>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8,T9>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8,T9>::HeadType
			(t5, typename TypeListType<T6,T7,T8,T9>::HeadType
			(t6, typename TypeListType<T7,T8,T9>::HeadType
			(t7, typename TypeListType<T8,T9>::HeadType
			(t8, typename TypeListType<T9>::HeadType
			(t9, NullTypeList()))))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7,
	class T8>
struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7,T8, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7,T8>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7),
		typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTVALUE(T8)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7,T8>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7,T8>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7,T8>::HeadType
			(t4, typename TypeListType<T5,T6,T7,T8>::HeadType
			(t5, typename TypeListType<T6,T7,T8>::HeadType
			(t6, typename TypeListType<T7,T8>::HeadType
			(t7, typename TypeListType<T8>::HeadType
			(t8, NullTypeList())))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6,
	class T7>
struct Tuple<T0, T1,T2,T3,T4,T5,T6,T7, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6,T7>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6),
		typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTVALUE(T7)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6,T7>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6,T7>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6,T7>::HeadType
			(t3, typename TypeListType<T4,T5,T6,T7>::HeadType
			(t4, typename TypeListType<T5,T6,T7>::HeadType
			(t5, typename TypeListType<T6,T7>::HeadType
			(t6, typename TypeListType<T7>::HeadType
			(t7, NullTypeList()))))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5,
	class T6>
struct Tuple<T0, T1,T2,T3,T4,T5,T6, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5,T6>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5),
		typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTVALUE(T6)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5,T6>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5,T6>::HeadType
			(t2, typename TypeListType<T3,T4,T5,T6>::HeadType
			(t3, typename TypeListType<T4,T5,T6>::HeadType
			(t4, typename TypeListType<T5,T6>::HeadType
			(t5, typename TypeListType<T6>::HeadType
			(t6, NullTypeList())))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4,
	class T5>
struct Tuple<T0, T1,T2,T3,T4,T5, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4,T5>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4),
		typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTVALUE(T5)):
		_data(t0, typename TypeListType<T1,T2,T3,T4,T5>::HeadType
			(t1, typename TypeListType<T2,T3,T4,T5>::HeadType
			(t2, typename TypeListType<T3,T4,T5>::HeadType
			(t3, typename TypeListType<T4,T5>::HeadType
			(t4, typename TypeListType<T5>::HeadType
			(t5, NullTypeList()))))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3,
	class T4>
struct Tuple<T0, T1,T2,T3,T4, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3,T4>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3),
		typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTVALUE(T4)):
		_data(t0, typename TypeListType<T1,T2,T3,T4>::HeadType
			(t1, typename TypeListType<T2,T3,T4>::HeadType
			(t2, typename TypeListType<T3,T4>::HeadType
			(t3, typename TypeListType<T4>::HeadType
			(t4, NullTypeList())))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2,
	class T3>
struct Tuple<T0, T1,T2,T3, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2,T3>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2),
		typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTVALUE(T3)):
		_data(t0, typename TypeListType<T1,T2,T3>::HeadType
			(t1, typename TypeListType<T2,T3>::HeadType
			(t2, typename TypeListType<T3>::HeadType
			(t3, NullTypeList()))))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1,
	class T2>
struct Tuple<T0, T1,T2, NullTypeList>
{
	typedef typename TypeListType<T0,T1,T2>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1),
		typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTVALUE(T2)):
		_data(t0, typename TypeListType<T1,T2>::HeadType
			(t1, typename TypeListType<T2>::HeadType
			(t2, NullTypeList())))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0,
	class T1>
struct Tuple<T0, T1, NullTypeList>
{
	typedef typename TypeListType<T0,T1>::HeadType Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0,
		typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTVALUE(T1)):
		_data(t0, typename TypeListType<T1>::HeadType(t1, NullTypeList()))
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

template <class T0>
struct Tuple<T0, NullTypeList>
{
	typedef TypeList<T0, NullTypeList> Type;

	enum TupleLengthType
	{
		length = Type::length
	};

	Tuple():_data()
	{
	}

	Tuple(typename TypeWrapper<T0>::CONSTTYPE& t0):
		_data(t0, NullTypeList())
	{
	}

	template <int N>
	typename TypeGetter<N, Type>::ConstHeadType& get() const
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	typename TypeGetter<N, Type>::HeadType& get()
	{
		return Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data);
	}

	template <int N>
	void set(typename TypeGetter<N, Type>::ConstHeadType& val)
	{
		Getter<N>::template get<typename TypeGetter<N, Type>::HeadType, typename Type::HeadType, typename Type::TailType>(_data) = val;
	}

	bool operator == (const Tuple& other) const
	{
		return _data == other._data;
	}

	bool operator != (const Tuple& other) const
	{
		return !(_data == other._data);
	}

	bool operator < (const Tuple& other) const
	{
		return _data < other._data;
	}

private:
	Type _data;
};

} // namespace Poco

#endif // Foundation_Tuple_INCLUDED


text:
/**
 * @file /src/lib/utilities.cpp
 */
/*****************************************************************************
** Includes
*****************************************************************************/

#include <iostream>
#include <ros/package.h>
#include <string>
#include "../../include/cost_map_ros/utilities.hpp"

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace cost_map {

/*****************************************************************************
** Implementation
*****************************************************************************/

std::string resolveResourceName(const std::string& resource_name) {

  /********************
  ** Resource Name
  ********************/
  std::string delimiter = "/";
  int index = resource_name.find(delimiter);
  if ( index == std::string::npos ) {
    throw std::invalid_argument(std::string("'") + resource_name + std::string("' is not a valid resource name."));
  }
  std::string package = resource_name.substr(0, index);
  std::string name = resource_name.substr(index + delimiter.length());

  /********************
  ** Lookup
  ********************/
  std::string plugin_package = "cost_map_ros";  // nav_core, cost_map
  std::string attribute = "image_resource"; // plugin, yaml

  // pending release of https://github.com/ros/ros/pull/103
  // std::vector<std::string> packages, costmaps;
  // ros::package::getPlugins(plugin_package, attribute, packages, costmaps);
  // for (unsigned int i = 0; i < packages.size(); ++i ) {
  //   std::cout << packages[i] << " " << costmaps[i] << std::endl;
  // }

  // grunt workaround for now - its not 100% robust
  std::vector<std::string> costmaps;
  ros::package::getPlugins(plugin_package, attribute, costmaps);
  for (const auto& filename : costmaps) {
    if ( (filename.find(package) != std::string::npos) && (filename.find(name) != std::string::npos) ) {
      return filename;
    }
  }
  // not found
  throw std::runtime_error(std::string("resource name '") + resource_name + std::string("' is not available (try 'rospack plugins --attrib=image_resource cost_map_ros')."));
}

/*****************************************************************************
 ** Trailers
 *****************************************************************************/

} // namespace cost_map

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resourcemover.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Defines values for JobName. */
public final class JobName extends ExpandableStringEnum<JobName> {
    /** Static value InitialSync for JobName. */
    public static final JobName INITIAL_SYNC = fromString("InitialSync");

    /**
     * Creates or finds a JobName from its string representation.
     *
     * @param name a name to look for.
     * @return the corresponding JobName.
     */
    @JsonCreator
    public static JobName fromString(String name) {
        return fromString(name, JobName.class);
    }

    /** @return known JobName values. */
    public static Collection<JobName> values() {
        return values(JobName.class);
    }
}


text:
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"

#include <utility>

#include "base/bind.h"
#include "base/feature_list.h"
#include "components/guest_view/common/guest_view_constants.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/common/child_process_host.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_stream_manager.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_attach_helper.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_constants.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/api/mime_handler_private.h"
#include "extensions/common/constants.h"
#include "extensions/common/mojom/guest_view.mojom.h"
#include "extensions/strings/grit/extensions_strings.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "pdf/buildflags.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
#include "third_party/blink/public/common/input/web_gesture_event.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"

#if BUILDFLAG(ENABLE_PDF)
#include "pdf/pdf_features.h"
#endif  // BUILDFLAG(ENABLE_PDF)

using content::WebContents;
using guest_view::GuestViewBase;

namespace extensions {

StreamContainer::StreamContainer(
    int tab_id,
    bool embedded,
    const GURL& handler_url,
    const std::string& extension_id,
    blink::mojom::TransferrableURLLoaderPtr transferrable_loader,
    const GURL& original_url)
    : embedded_(embedded),
      tab_id_(tab_id),
      handler_url_(handler_url),
      extension_id_(extension_id),
      transferrable_loader_(std::move(transferrable_loader)),
      mime_type_(transferrable_loader_->head->mime_type),
      original_url_(original_url),
      stream_url_(transferrable_loader_->url),
      response_headers_(transferrable_loader_->head->headers) {}

StreamContainer::~StreamContainer() {
}

base::WeakPtr<StreamContainer> StreamContainer::GetWeakPtr() {
  return weak_factory_.GetWeakPtr();
}

blink::mojom::TransferrableURLLoaderPtr
StreamContainer::TakeTransferrableURLLoader() {
  return std::move(transferrable_loader_);
}

// static
const char MimeHandlerViewGuest::Type[] = "mimehandler";

// static
GuestViewBase* MimeHandlerViewGuest::Create(WebContents* owner_web_contents) {
  return new MimeHandlerViewGuest(owner_web_contents);
}

MimeHandlerViewGuest::MimeHandlerViewGuest(WebContents* owner_web_contents)
    : GuestView<MimeHandlerViewGuest>(owner_web_contents),
      delegate_(ExtensionsAPIClient::Get()->CreateMimeHandlerViewGuestDelegate(
          this)) {}

MimeHandlerViewGuest::~MimeHandlerViewGuest() {
  // Before attaching is complete, the instance ID is not valid.
  if (element_instance_id() != guest_view::kInstanceIDNone) {
    // If we are awaiting attaching to outer WebContents
    if (GetEmbedderFrame() && GetEmbedderFrame()->GetParent()) {
      // TODO(ekaramad): This should only be needed if the embedder frame is in
      // a plugin element (https://crbug.com/957373).
      mojo::AssociatedRemote<mojom::MimeHandlerViewContainerManager>
          container_manager;
      GetEmbedderFrame()
          ->GetParent()
          ->GetRemoteAssociatedInterfaces()
          ->GetInterface(&container_manager);
      container_manager->DestroyFrameContainer(element_instance_id());
    }
  }
}

content::RenderWidgetHost* MimeHandlerViewGuest::GetOwnerRenderWidgetHost() {
  DCHECK_NE(embedder_widget_routing_id_, MSG_ROUTING_NONE);
  return content::RenderWidgetHost::FromID(embedder_frame_id_.child_id,
                                           embedder_widget_routing_id_);
}

content::SiteInstance* MimeHandlerViewGuest::GetOwnerSiteInstance() {
  DCHECK_NE(embedder_frame_id_.frame_routing_id, MSG_ROUTING_NONE);
  content::RenderFrameHost* rfh = GetEmbedderFrame();
  return rfh ? rfh->GetSiteInstance() : nullptr;
}

bool MimeHandlerViewGuest::CanBeEmbeddedInsideCrossProcessFrames() {
  return true;
}

void MimeHandlerViewGuest::SetEmbedderFrame(
    content::GlobalRenderFrameHostId frame_id) {
  DCHECK_NE(MSG_ROUTING_NONE, frame_id.frame_routing_id);
  DCHECK_EQ(MSG_ROUTING_NONE, embedder_frame_id_.frame_routing_id);

  embedder_frame_id_ = frame_id;

  content::RenderFrameHost* rfh = GetEmbedderFrame();

  if (rfh && rfh->GetView()) {
    embedder_widget_routing_id_ =
        rfh->GetView()->GetRenderWidgetHost()->GetRoutingID();
  }
  auto owner_type = rfh ? rfh->GetFrameOwnerElementType()
                        : blink::FrameOwnerElementType::kNone;
  // If the embedder frame is the ContentFrame() of a plugin element, then there
  // could be a MimeHandlerViewFrameContainer in the parent frame. Note that
  // the MHVFC is only created through HTMLPlugInElement::UpdatePlugin (manually
  // navigating a plugin element's window would create a MHVFC).
  maybe_has_frame_container_ =
      owner_type == blink::FrameOwnerElementType::kEmbed ||
      owner_type == blink::FrameOwnerElementType::kObject;
  DCHECK_NE(MSG_ROUTING_NONE, embedder_widget_routing_id_);
  delegate_->RecordLoadMetric(
      /* in_main_frame */ !GetEmbedderFrame()->GetParent(), mime_type_);
}

void MimeHandlerViewGuest::SetBeforeUnloadController(
    mojo::PendingRemote<mime_handler::BeforeUnloadControl>
        pending_before_unload_control) {
  pending_before_unload_control_ = std::move(pending_before_unload_control);
}

const char* MimeHandlerViewGuest::GetAPINamespace() const {
  return mime_handler_view::kAPINamespace;
}

int MimeHandlerViewGuest::GetTaskPrefix() const {
  return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX;
}

void MimeHandlerViewGuest::CreateWebContents(
    const base::DictionaryValue& create_params,
    WebContentsCreatedCallback callback) {
  std::string view_id;
  create_params.GetString(mime_handler_view::kViewId, &view_id);
  if (view_id.empty()) {
    std::move(callback).Run(nullptr);
    return;
  }
  stream_ =
      MimeHandlerStreamManager::Get(browser_context())->ReleaseStream(view_id);
  if (!stream_) {
    std::move(callback).Run(nullptr);
    return;
  }
  mime_type_ = stream_->mime_type();
  const Extension* mime_handler_extension =
      // TODO(lazyboy): Do we need handle the case where the extension is
      // terminated (ExtensionRegistry::TERMINATED)?
      ExtensionRegistry::Get(browser_context())
          ->enabled_extensions()
          .GetByID(stream_->extension_id());
  if (!mime_handler_extension) {
    LOG(ERROR) << "Extension for mime_type not found, mime_type = "
               << stream_->mime_type();
    std::move(callback).Run(nullptr);
    return;
  }

  // Use the mime handler extension's SiteInstance to create the guest so it
  // goes under the same process as the extension.
  ProcessManager* process_manager = ProcessManager::Get(browser_context());
  scoped_refptr<content::SiteInstance> guest_site_instance =
      process_manager->GetSiteInstanceForURL(stream_->handler_url());

  // Clear the zoom level for the mime handler extension. The extension is
  // responsible for managing its own zoom. This is necessary for OOP PDF, as
  // otherwise the UI is zoomed and the calculations to determine the PDF size
  // mix zoomed and unzoomed units.
  content::HostZoomMap::Get(guest_site_instance.get())
      ->SetZoomLevelForHostAndScheme(kExtensionScheme, stream_->extension_id(),
                                     0);

  WebContents::CreateParams params(browser_context(),
                                   guest_site_instance.get());
  params.guest_delegate = this;
  // TODO(erikchen): Fix ownership semantics for guest views.
  // https://crbug.com/832879.
  std::move(callback).Run(
      WebContents::CreateWithSessionStorage(
          params,
          owner_web_contents()->GetController().GetSessionStorageNamespaceMap())
          .release());
}

void MimeHandlerViewGuest::DidAttachToEmbedder() {
  DCHECK(stream_->handler_url().SchemeIs(extensions::kExtensionScheme));
  web_contents()->GetController().LoadURL(
      stream_->handler_url(), content::Referrer(),
      ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
  auto prefs = web_contents()->GetOrCreateWebPreferences();
  prefs.navigate_on_drag_drop = true;
  web_contents()->SetWebPreferences(prefs);
}

void MimeHandlerViewGuest::DidInitialize(
    const base::DictionaryValue& create_params) {
  ExtensionsAPIClient::Get()->AttachWebContentsHelpers(web_contents());
}

void MimeHandlerViewGuest::EmbedderFullscreenToggled(bool entered_fullscreen) {
  is_embedder_fullscreen_ = entered_fullscreen;
  if (entered_fullscreen)
    return;

  SetFullscreenState(false);
}

bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const {
  return false;
}

bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
  return true;
}

WebContents* MimeHandlerViewGuest::OpenURLFromTab(
    WebContents* source,
    const content::OpenURLParams& params) {
  auto* delegate = embedder_web_contents()->GetDelegate();
  return delegate ? delegate->OpenURLFromTab(embedder_web_contents(), params)
                  : nullptr;
}

void MimeHandlerViewGuest::NavigationStateChanged(
    WebContents* source,
    content::InvalidateTypes changed_flags) {
  if (!(changed_flags & content::INVALIDATE_TYPE_TITLE))
    return;

  // Only consider title changes not triggered by URL changes. Otherwise, the
  // URL of the mime handler will be displayed.
  if (changed_flags & content::INVALIDATE_TYPE_URL)
    return;

  if (!is_full_page_plugin())
    return;

  content::NavigationEntry* last_committed_entry =
      embedder_web_contents()->GetController().GetLastCommittedEntry();
  if (last_committed_entry &&
      (embedder_web_contents() && embedder_web_contents()->GetDelegate())) {
    embedder_web_contents()->UpdateTitleForEntry(last_committed_entry,
                                                 source->GetTitle());
    auto* delegate = embedder_web_contents()->GetDelegate();
    if (delegate)
      delegate->NavigationStateChanged(embedder_web_contents(), changed_flags);
  }
}

bool MimeHandlerViewGuest::HandleContextMenu(
    content::RenderFrameHost& render_frame_host,
    const content::ContextMenuParams& params) {
  DCHECK_EQ(web_contents(),
            content::WebContents::FromRenderFrameHost(&render_frame_host));

  return delegate_ && delegate_->HandleContextMenu(render_frame_host, params);
}

bool MimeHandlerViewGuest::PreHandleGestureEvent(
    WebContents* source,
    const blink::WebGestureEvent& event) {
  if (blink::WebInputEvent::IsPinchGestureEventType(event.GetType())) {
    // If we're an embedded plugin we drop pinch-gestures to avoid zooming the
    // guest.
    return !is_full_page_plugin();
  }
  return false;
}

content::JavaScriptDialogManager*
MimeHandlerViewGuest::GetJavaScriptDialogManager(
    WebContents* source) {
  // WebContentsDelegates often service multiple WebContentses, and use the
  // WebContents* parameter to tell which WebContents made the request. If we
  // pass in our own pointer to the delegate call, the delegate will be asked,
  // "What's the JavaScriptDialogManager of this WebContents for which you are
  // not a delegate?" And it won't be able to answer that.
  //
  // So we pretend to be our owner WebContents, but only for the request to
  // obtain the JavaScriptDialogManager. During calls to the
  // JavaScriptDialogManager we will be honest about who we are.
  auto* delegate = owner_web_contents()->GetDelegate();
  return delegate ? delegate->GetJavaScriptDialogManager(owner_web_contents())
                  : nullptr;
}

bool MimeHandlerViewGuest::PluginDoSave() {
  if (!attached() || !plugin_can_save_)
    return false;

  base::ListValue::ListStorage args;
  args.emplace_back(stream_->stream_url().spec());

  auto event =
      std::make_unique<Event>(events::MIME_HANDLER_PRIVATE_SAVE,
                              api::mime_handler_private::OnSave::kEventName,
                              std::move(args), browser_context());
  EventRouter* event_router = EventRouter::Get(browser_context());
  event_router->DispatchEventToExtension(extension_misc::kPdfExtensionId,
                                         std::move(event));
  return true;
}

bool MimeHandlerViewGuest::GuestSaveFrame(
    content::WebContents* guest_web_contents) {
  MimeHandlerViewGuest* guest_view = FromWebContents(guest_web_contents);
  return guest_view == this && PluginDoSave();
}

bool MimeHandlerViewGuest::SaveFrame(const GURL& url,
                                     const content::Referrer& referrer,
                                     content::RenderFrameHost* rfh) {
  if (!attached())
    return false;

  embedder_web_contents()->SaveFrame(stream_->original_url(), referrer, rfh);
  return true;
}

void MimeHandlerViewGuest::OnRenderFrameHostDeleted(int process_id,
                                                    int routing_id) {
  if (process_id == embedder_frame_id_.child_id &&
      routing_id == embedder_frame_id_.frame_routing_id) {
    Destroy(/*also_delete=*/true);
  }
}

void MimeHandlerViewGuest::EnterFullscreenModeForTab(
    content::RenderFrameHost* requesting_frame,
    const blink::mojom::FullscreenOptions& options) {
  if (SetFullscreenState(true)) {
    if (auto* delegate = embedder_web_contents()->GetDelegate()) {
      delegate->EnterFullscreenModeForTab(
          embedder_web_contents()->GetMainFrame(), options);
    }
  }
}

void MimeHandlerViewGuest::ExitFullscreenModeForTab(content::WebContents*) {
  if (SetFullscreenState(false)) {
    if (auto* delegate = embedder_web_contents()->GetDelegate())
      delegate->ExitFullscreenModeForTab(embedder_web_contents());
  }
}

bool MimeHandlerViewGuest::IsFullscreenForTabOrPending(
    const content::WebContents* web_contents) {
  return is_guest_fullscreen_;
}

bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
    content::SiteInstance* source_site_instance,
    content::mojom::WindowContainerType window_container_type,
    const GURL& opener_url,
    const std::string& frame_name,
    const GURL& target_url) {
  return true;
}

content::WebContents* MimeHandlerViewGuest::CreateCustomWebContents(
    content::RenderFrameHost* opener,
    content::SiteInstance* source_site_instance,
    bool is_renderer_initiated,
    const GURL& opener_url,
    const std::string& frame_name,
    const GURL& target_url,
    const content::StoragePartitionId& partition_id,
    content::SessionStorageNamespace* session_storage_namespace) {
  content::OpenURLParams open_params(target_url, content::Referrer(),
                                     WindowOpenDisposition::NEW_FOREGROUND_TAB,
                                     ui::PAGE_TRANSITION_LINK, true);
  open_params.initiator_origin = opener->GetLastCommittedOrigin();
  open_params.source_site_instance = source_site_instance;

  // Extensions are allowed to open popups under circumstances covered by
  // running as a mime handler.
  open_params.user_gesture = true;
  auto* delegate = embedder_web_contents()->GetDelegate();
  if (delegate)
    delegate->OpenURLFromTab(embedder_web_contents(), open_params);
  return nullptr;
}

bool MimeHandlerViewGuest::SetFullscreenState(bool is_fullscreen) {
  // Disallow fullscreen for embedded plugins.
  if (!is_full_page_plugin() || is_fullscreen == is_guest_fullscreen_)
    return false;

  is_guest_fullscreen_ = is_fullscreen;
  if (is_guest_fullscreen_ == is_embedder_fullscreen_)
    return false;

  is_embedder_fullscreen_ = is_fullscreen;
  return true;
}

void MimeHandlerViewGuest::DocumentOnLoadCompletedInMainFrame(
    content::RenderFrameHost* render_frame_host) {
  DCHECK(GetEmbedderFrame());
  DCHECK_NE(element_instance_id(), guest_view::kInstanceIDNone);

  // For plugin elements, the embedder should be notified so that the queued
  // messages (postMessage) are forwarded to the guest page. Otherwise we
  // just send the update to the embedder (full page  MHV).
  auto* rfh = maybe_has_frame_container_ ? GetEmbedderFrame()->GetParent()
                                         : GetEmbedderFrame();
  mojo::AssociatedRemote<mojom::MimeHandlerViewContainerManager>
      container_manager;
  rfh->GetRemoteAssociatedInterfaces()->GetInterface(&container_manager);
  container_manager->DidLoad(element_instance_id(), original_resource_url_);
}

void MimeHandlerViewGuest::ReadyToCommitNavigation(
    content::NavigationHandle* navigation_handle) {
#if BUILDFLAG(ENABLE_PDF)
  if (base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned)) {
    const GURL& url = navigation_handle->GetURL();
    if (url.SchemeIs(kExtensionScheme) &&
        url.host_piece() == extension_misc::kPdfExtensionId) {
      // The unseasoned PDF viewer will navigate to the stream URL (using
      // PdfNavigtionThrottle), rather than using it as a subresource.
      return;
    }
  }
#endif  // BUILDFLAG(ENABLE_PDF)

  navigation_handle->RegisterSubresourceOverride(
      stream_->TakeTransferrableURLLoader());
}

void MimeHandlerViewGuest::DidFinishNavigation(
    content::NavigationHandle* navigation_handle) {
  guest_view::GuestView<MimeHandlerViewGuest>::DidFinishNavigation(
      navigation_handle);

  if (navigation_handle->IsInMainFrame()) {
    // We should not navigate the guest away from the handling extension.
    const url::Origin handler_origin =
        url::Origin::Create(stream_->handler_url());
    const GURL& new_url = navigation_handle->GetURL();
    const url::Origin new_origin = url::Origin::Create(new_url);
    CHECK(new_origin.IsSameOriginWith(handler_origin) ||
          new_url.IsAboutBlank());
  }
}

void MimeHandlerViewGuest::FuseBeforeUnloadControl(
    mojo::PendingReceiver<mime_handler::BeforeUnloadControl> receiver) {
  if (!pending_before_unload_control_)
    return;

  mojo::FusePipes(std::move(receiver),
                  std::move(pending_before_unload_control_));
}

content::RenderFrameHost* MimeHandlerViewGuest::GetEmbedderFrame() {
  return content::RenderFrameHost::FromID(embedder_frame_id_);
}

base::WeakPtr<MimeHandlerViewGuest> MimeHandlerViewGuest::GetWeakPtr() {
  return weak_factory_.GetWeakPtr();
}

base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStreamWeakPtr() {
  return stream_->GetWeakPtr();
}

}  // namespace extensions