UDK 3.2.7 C/C++ API Reference
cppuhelper/weakagg.hxx
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 #ifndef _CPPUHELPER_WEAKAGG_HXX_
00029 #define _CPPUHELPER_WEAKAGG_HXX_
00030 
00031 #include <cppuhelper/weak.hxx>
00032 #include <com/sun/star/uno/XAggregation.hpp>
00033 #include "cppuhelperdllapi.h"
00034 
00035 
00036 namespace cppu
00037 {
00038 
00049 class CPPUHELPER_DLLPUBLIC OWeakAggObject
00050     : public ::cppu::OWeakObject
00051     , public ::com::sun::star::uno::XAggregation
00052 {
00053 public:
00056     inline OWeakAggObject() SAL_THROW(())
00057         {}
00058 
00062     virtual void SAL_CALL acquire() throw();
00066     virtual void SAL_CALL release() throw();
00075     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType )
00076         throw(::com::sun::star::uno::RuntimeException);
00077 
00082     virtual void SAL_CALL setDelegator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Delegator )
00083         throw(::com::sun::star::uno::RuntimeException);
00089     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType )
00090         throw(::com::sun::star::uno::RuntimeException);
00091 
00092 protected:
00099     virtual ~OWeakAggObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) );
00100 
00103     ::com::sun::star::uno::WeakReferenceHelper xDelegator;
00104 private:
00105     OWeakAggObject( const OWeakAggObject & rObj ) SAL_THROW(());
00106     OWeakAggObject & operator = ( const OWeakAggObject & rObj ) SAL_THROW(());
00107 };
00108 
00109 }
00110 
00111 #endif
00112 
00113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines