nss: upgrade to release 3.73
[LibreOffice.git] / include / connectivity / sdbcx / VDescriptor.hxx
blob4127a423615a28a2f3e563e68d8a76fa46ac6424
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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::sdbcx
31 // = ODescriptor
33 typedef ::comphelper::OPropertyContainer ODescriptor_PBASE;
34 class OOO_DLLPUBLIC_DBTOOLS ODescriptor
35 :public ODescriptor_PBASE
36 ,public css::lang::XUnoTunnel
38 protected:
39 OUString m_Name;
41 /** helper for derived classes to implement OPropertyArrayUsageHelper::createArrayHelper
43 This method just calls describeProperties, and flags all properties as READONLY if and
44 only if we do *not* act as descriptor, but as final object.
46 @seealso isNew
48 ::cppu::IPropertyArrayHelper* doCreateArrayHelper() const;
50 private:
51 comphelper::UStringMixEqual m_aCase;
52 bool m_bNew;
54 public:
55 ODescriptor(::cppu::OBroadcastHelper& _rBHelper, bool _bCase, bool _bNew = false);
57 virtual ~ODescriptor() override;
59 bool isNew() const { return m_bNew; }
60 void setNew(bool _bNew);
62 bool isCaseSensitive() const { return m_aCase.isCaseSensitive(); }
64 virtual void construct();
66 // XInterface
67 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
68 /// @throws css::uno::RuntimeException
69 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( );
71 // css::lang::XUnoTunnel
72 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
73 static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
75 // retrieves the ODescriptor implementation of a given UNO component, and returns its ->isNew flag
76 static bool isNew( const css::uno::Reference< css::uno::XInterface >& _rxDescriptor );
81 #endif // INCLUDED_CONNECTIVITY_SDBCX_VDESCRIPTOR_HXX
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */