Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_SCANNER_SCANNEREXCEPTION_HPP
2 : : #define INCLUDED_COM_SUN_STAR_SCANNER_SCANNEREXCEPTION_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/scanner/ScannerException.hdl"
7 : :
8 : : #include "com/sun/star/scanner/ScanError.hpp"
9 : : #include "com/sun/star/uno/Exception.hpp"
10 : : #include "com/sun/star/uno/Type.hxx"
11 : : #include "cppu/unotype.hxx"
12 : : #include "osl/mutex.hxx"
13 : : #include "rtl/instance.hxx"
14 : :
15 : : namespace com { namespace sun { namespace star { namespace scanner {
16 : :
17 : : inline ScannerException::ScannerException() SAL_THROW(())
18 : : : ::com::sun::star::uno::Exception()
19 : : , Error(::com::sun::star::scanner::ScanError_ScanErrorNone)
20 : : { }
21 : :
22 : 0 : inline ScannerException::ScannerException(const ::rtl::OUString& Message_, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context_, const ::com::sun::star::scanner::ScanError& Error_) SAL_THROW(())
23 : : : ::com::sun::star::uno::Exception(Message_, Context_)
24 : 0 : , Error(Error_)
25 : 0 : { }
26 : :
27 : : ScannerException::ScannerException(ScannerException const & the_other): ::com::sun::star::uno::Exception(the_other), Error(the_other.Error) {}
28 : :
29 : 0 : ScannerException::~ScannerException() {}
30 : :
31 : : ScannerException & ScannerException::operator =(ScannerException const & the_other) {
32 : : //TODO: Just like its implicitly-defined counterpart, this function definition is not exception-safe
33 : : ::com::sun::star::uno::Exception::operator =(the_other);
34 : : Error = the_other.Error;
35 : : return *this;
36 : : }
37 : :
38 : : } } } }
39 : :
40 : : namespace com { namespace sun { namespace star { namespace scanner {
41 : :
42 : : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::scanner::ScannerException const *) {
43 : : static typelib_TypeDescriptionReference * the_type = 0;
44 : : if ( !the_type )
45 : : {
46 : : typelib_static_type_init( &the_type, typelib_TypeClass_EXCEPTION, "com.sun.star.scanner.ScannerException" );
47 : : }
48 : : return * reinterpret_cast< ::com::sun::star::uno::Type * >( &the_type );
49 : : }
50 : :
51 : : } } } }
52 : :
53 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::scanner::ScannerException const *) SAL_THROW(()) {
54 : : return ::cppu::UnoType< ::com::sun::star::scanner::ScannerException >::get();
55 : : }
56 : :
57 : : #endif // INCLUDED_COM_SUN_STAR_SCANNER_SCANNEREXCEPTION_HPP
|