|
UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /* 00003 * This file is part of the LibreOffice project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * This file incorporates work covered by the following license notice: 00010 * 00011 * Licensed to the Apache Software Foundation (ASF) under one or more 00012 * contributor license agreements. See the NOTICE file distributed 00013 * with this work for additional information regarding copyright 00014 * ownership. The ASF licenses this file to you under the Apache 00015 * License, Version 2.0 (the "License"); you may not use this file 00016 * except in compliance with the License. You may obtain a copy of 00017 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 00018 */ 00019 #ifndef _CPPUHELPER_COMPONENT_HXX_ 00020 #define _CPPUHELPER_COMPONENT_HXX_ 00021 00022 #include <osl/mutex.hxx> 00023 #include <cppuhelper/weakagg.hxx> 00024 #include <cppuhelper/interfacecontainer.hxx> 00025 00026 #include <cppuhelper/implbase1.hxx> 00027 00028 #include <com/sun/star/lang/XComponent.hpp> 00029 #include <com/sun/star/lang/XEventListener.hpp> 00030 00031 #include "cppuhelperdllapi.h" 00032 00033 namespace cppu 00034 { 00035 00045 class CPPUHELPER_DLLPUBLIC OComponentHelper 00046 : public ::cppu::OWeakAggObject 00047 , public ::com::sun::star::lang::XTypeProvider 00048 , public ::com::sun::star::lang::XComponent 00049 { 00050 public: 00057 OComponentHelper( ::osl::Mutex & rMutex ) SAL_THROW(()); 00060 virtual ~OComponentHelper() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); 00061 00062 // XAggregation 00063 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( 00064 ::com::sun::star::uno::Type const & rType ) 00065 throw (::com::sun::star::uno::RuntimeException); 00066 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( 00067 ::com::sun::star::uno::Type const & rType ) 00068 throw (::com::sun::star::uno::RuntimeException); 00069 virtual void SAL_CALL acquire() 00070 throw (); 00071 virtual void SAL_CALL release() 00072 throw (); 00073 00077 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 00078 throw(::com::sun::star::uno::RuntimeException) = 0; 00082 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() 00083 throw (::com::sun::star::uno::RuntimeException); 00084 00085 // XComponent 00086 virtual void SAL_CALL dispose() 00087 throw(::com::sun::star::uno::RuntimeException); 00088 virtual void SAL_CALL addEventListener( 00089 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) 00090 throw(::com::sun::star::uno::RuntimeException); 00091 virtual void SAL_CALL removeEventListener( 00092 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) 00093 throw(::com::sun::star::uno::RuntimeException); 00094 00095 protected: 00098 virtual void SAL_CALL disposing(); 00099 00101 OBroadcastHelper rBHelper; 00103 00104 private: 00105 inline OComponentHelper( const OComponentHelper & ) SAL_THROW(()); 00106 inline OComponentHelper & operator = ( const OComponentHelper & ) SAL_THROW(()); 00107 }; 00108 00109 } 00110 00111 #endif 00112 00113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1.7.3