#ifndef _COM_SUN_STAR_RENDERING_PARAMETRICPOLYPOLYGON2DFACTORY_HPP_
#define _COM_SUN_STAR_RENDERING_PARAMETRICPOLYPOLYGON2DFACTORY_HPP_

#ifndef _SAL_CONFIG_H_
#include "sal/config.h"
#endif

#ifndef _COM_SUN_STAR_RENDERING_XPARAMETRICPOLYPOLYGON2DFACTORY_HPP_
#include "com/sun/star/rendering/XParametricPolyPolygon2DFactory.hpp"
#endif
#ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HPP_
#include "com/sun/star/uno/RuntimeException.hpp"
#endif
#ifndef _COM_SUN_STAR_LANG_XMULTICOMPONENTFACTORY_HPP_
#include "com/sun/star/lang/XMultiComponentFactory.hpp"
#endif
#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
#include "com/sun/star/uno/XComponentContext.hpp"
#endif
#ifndef _COM_SUN_STAR_UNO_DEPLOYMENTEXCEPTION_HPP_
#include "com/sun/star/uno/DeploymentException.hpp"
#endif
#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_
#include "com/sun/star/uno/Exception.hpp"
#endif
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include "com/sun/star/uno/Reference.hxx"
#endif
#ifndef INCLUDED_CPPU_UNOTYPE_HXX
#include "cppu/unotype.hxx"
#endif
#ifndef _RTL_USTRING_H_
#include "rtl/ustring.h"
#endif
#ifndef _RTL_USTRING_HXX_
#include "rtl/ustring.hxx"
#endif

namespace com { namespace sun { namespace star { namespace rendering {

class ParametricPolyPolygon2DFactory {
public:
    static ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XParametricPolyPolygon2DFactory > create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context) {
        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiComponentFactory > the_factory(the_context->getServiceManager());
        if (!the_factory.is()) {
            throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service manager")), the_context);
        }
        ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XParametricPolyPolygon2DFactory > the_instance;
        try {
            the_instance = ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XParametricPolyPolygon2DFactory >(the_factory->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.rendering.ParametricPolyPolygon2DFactory")), the_context), ::com::sun::star::uno::UNO_QUERY);
        } catch (::com::sun::star::uno::RuntimeException &) {
            throw;
        } catch (::com::sun::star::uno::Exception & the_exception) {
            throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service com.sun.star.rendering.ParametricPolyPolygon2DFactory of type com.sun.star.rendering.XParametricPolyPolygon2DFactory: ")) + the_exception.Message, the_context);
        }
        if (!the_instance.is()) {
            throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service com.sun.star.rendering.ParametricPolyPolygon2DFactory of type com.sun.star.rendering.XParametricPolyPolygon2DFactory")), the_context);
        }
        return the_instance;
    }

private:
    ParametricPolyPolygon2DFactory(); // not implemented
    ParametricPolyPolygon2DFactory(ParametricPolyPolygon2DFactory &); // not implemented
    ~ParametricPolyPolygon2DFactory(); // not implemented
    void operator =(ParametricPolyPolygon2DFactory); // not implemented
};

} } } }

#endif // _COM_SUN_STAR_RENDERING_PARAMETRICPOLYPOLYGON2DFACTORY_HPP_
