bump product version to 4.1.6.2
[LibreOffice.git] / extensions / source / propctrlr / xsddatatypes.hxx
blobdfa5cebb52f8945858a77a3bbf385bed200704f9
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 EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
21 #define EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <rtl/ref.hxx>
26 namespace com { namespace sun { namespace star {
27 namespace xsd {
28 class XDataType;
30 namespace beans {
31 class XPropertySetInfo;
33 } } }
35 //........................................................................
36 namespace pcr
38 //........................................................................
40 //====================================================================
41 //= XSDDataType
42 //====================================================================
43 class XSDDataType : public ::rtl::IReference
45 private:
46 ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >
47 m_xDataType;
48 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
49 m_xFacetInfo;
51 protected:
52 oslInterlockedCount m_refCount;
54 protected:
55 inline ::com::sun::star::xsd::XDataType* getDataTypeInterface() const { return m_xDataType.get(); }
57 public:
58 XSDDataType(
59 const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >& _rxDataType
62 // IReference
63 virtual oslInterlockedCount SAL_CALL acquire();
64 virtual oslInterlockedCount SAL_CALL release();
66 /// retrieves the underlying UNO component
67 inline const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >&
68 getUnoDataType() const { return m_xDataType; }
70 /// classifies the data typ
71 sal_Int16 classify() const SAL_THROW(());
73 // attribute access
74 OUString getName() const SAL_THROW(());
75 bool isBasicType() const SAL_THROW(());
77 /// determines whether a given facet exists at the type
78 bool hasFacet( const OUString& _rFacetName ) const SAL_THROW(());
79 /// retrieves a facet value
80 ::com::sun::star::uno::Any
81 getFacet( const OUString& _rFacetName ) SAL_THROW(());
82 /// sets a facet value
83 void setFacet( const OUString& _rFacetName, const ::com::sun::star::uno::Any& _rFacetValue ) SAL_THROW(());
85 /** copies as much facets (values, respectively) from a give data type instance
87 void copyFacetsFrom( const ::rtl::Reference< XSDDataType >& _pSourceType );
89 protected:
90 virtual ~XSDDataType();
92 private:
93 XSDDataType(); // never implemented
94 XSDDataType( const XSDDataType& ); // never implemented
95 XSDDataType& operator=( const XSDDataType& ); // never implemented
98 //........................................................................
99 } // namespace pcr
100 //........................................................................
102 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */