/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
class OColumn :public cppu::BaseMutex
,public OColumnBase
,public ::comphelper::OPropertyContainer
,public IPropertyContainer // convenience for the derived class which also derive from OColumnSettings
{ friendclass OColumns;
// IColumnFactory - used by OColumns for creating new columns class SAL_NO_VTABLE IColumnFactory
{ public: /** creates an OColumn object which should represent the column with a given name
*/ virtual rtl::Reference<OColumn>
createColumn( const OUString& _rName ) const = 0;
/** creates a column descriptor object.
A column descriptor object is used to append new columns to the collection. If such an append actually happened, columnAppended is called afterwards.
*/ virtual css::uno::Reference< css::beans::XPropertySet > createColumnDescriptor() = 0;
/** notifies that a column, created from a column descriptor, has been appended
*/ virtualvoid columnAppended( const css::uno::Reference< css::beans::XPropertySet >& _rxSourceDescriptor ) = 0;
/** notifies that a column with a given name has been dropped
*/ virtualvoid columnDropped( const OUString& _sName ) = 0;
protected:
~IColumnFactory() {}
};
class OContainerMediator; typedef ::cppu::ImplHelper1< css::container::XChild > TXChild; typedef connectivity::OColumnsHelper OColumns_BASE;
class OColumns : public OColumns_BASE
,public TXChild
{
OContainerMediator* m_pMediator;
// comes from the driver can be null
css::uno::Reference< css::container::XNameAccess > m_xDrvColumns;
css::uno::WeakReference< css::uno::XInterface > m_xParent;
IColumnFactory* m_pColFactoryImpl;
::connectivity::sdbcx::IRefreshableColumns* m_pRefreshColumns;
public:
css::uno::Reference< css::beans::XPropertySet > createBaseObject(const OUString& _rName)
{ return OColumns_BASE::createObject(_rName);
} /** flag which determines whether the container is filled or not
*/ bool isInitialized() const { return m_bInitialized; } void setInitialized() {m_bInitialized = true;} void setMediator(OContainerMediator* _pMediator) { m_pMediator = _pMediator; }
public: /** constructs an empty container without configuration location. @param rParent the parent object. This instance will be used for refcounting, so the parent cannot die before the container does. @param _rMutex the mutex of the parent. @param _bCaseSensitive the initial case sensitivity flag @see setCaseSensitive
*/
OColumns(
::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex, bool _bCaseSensitive, const std::vector< OUString>& _rVector,
IColumnFactory* _pColFactory,
::connectivity::sdbcx::IRefreshableColumns* _pRefresh, bool _bAddColumn = false, bool _bDropColumn = false, bool _bUseHardRef = true);
void append(const OUString& rName, OColumn*); void clearColumns(); // only the name is identical to ::cppu::OComponentHelper virtualvoid disposing() override;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.