1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONNECTIVITY_SDBCX_VDESCRIPTOR_HXX
21 #define INCLUDED_CONNECTIVITY_SDBCX_VDESCRIPTOR_HXX
23 #include <comphelper/propertycontainer.hxx>
24 #include <com/sun/star/lang/XUnoTunnel.hpp>
25 #include <comphelper/stl_types.hxx>
26 #include <connectivity/dbtoolsdllapi.hxx>
28 namespace connectivity
35 typedef ::comphelper::OPropertyContainer ODescriptor_PBASE
;
36 class OOO_DLLPUBLIC_DBTOOLS ODescriptor
37 :public ODescriptor_PBASE
38 ,public css::lang::XUnoTunnel
43 /** helper for derived classes to implement OPropertyArrayUsageHelper::createArrayHelper
45 This method just calls describeProperties, and flags all properties as READONLY if and
46 only if we do *not* act as descriptor, but as final object.
50 ::cppu::IPropertyArrayHelper
* doCreateArrayHelper() const;
53 comphelper::UStringMixEqual m_aCase
;
57 ODescriptor(::cppu::OBroadcastHelper
& _rBHelper
, bool _bCase
, bool _bNew
= false);
59 virtual ~ODescriptor() override
;
61 bool isNew() const { return m_bNew
; }
62 void setNew(bool _bNew
);
64 bool isCaseSensitive() const { return m_aCase
.isCaseSensitive(); }
66 virtual void construct();
69 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
70 /// @throws css::uno::RuntimeException
71 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( );
73 // css::lang::XUnoTunnel
74 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
;
75 static css::uno::Sequence
< sal_Int8
> getUnoTunnelId();
77 // retrieves the ODescriptor implementation of a given UNO component, and returns its ->isNew flag
78 static bool isNew( const css::uno::Reference
< css::uno::XInterface
>& _rxDescriptor
);
83 #endif // INCLUDED_CONNECTIVITY_SDBCX_VDESCRIPTOR_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */