merged tag ooo/OOO330_m14
[LibreOffice.git] / extensions / source / propctrlr / xsddatatypes.hxx
blob8bb722d3990a3b1516eb13dc44fc368667b830f6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
29 #define EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
31 /** === begin UNO includes === **/
32 #include <com/sun/star/uno/Reference.hxx>
33 /** === end UNO includes === **/
34 #include <rtl/ref.hxx>
36 namespace com { namespace sun { namespace star {
37 namespace xsd {
38 class XDataType;
40 namespace beans {
41 class XPropertySet;
42 class XPropertySetInfo;
44 } } }
46 //........................................................................
47 namespace pcr
49 //........................................................................
51 //====================================================================
52 //= XSDDataType
53 //====================================================================
54 class XSDDataType : public ::rtl::IReference
56 private:
57 ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >
58 m_xDataType;
59 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
60 m_xFacetInfo;
62 protected:
63 oslInterlockedCount m_refCount;
65 protected:
66 inline ::com::sun::star::xsd::XDataType* getDataTypeInterface() const { return m_xDataType.get(); }
68 public:
69 XSDDataType(
70 const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >& _rxDataType
73 // IReference
74 virtual oslInterlockedCount SAL_CALL acquire();
75 virtual oslInterlockedCount SAL_CALL release();
77 /// retrieves the underlying UNO component
78 inline const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >&
79 getUnoDataType() const { return m_xDataType; }
81 /// classifies the data typ
82 sal_Int16 classify() const SAL_THROW(());
84 // attribute access
85 ::rtl::OUString getName() const SAL_THROW(());
86 bool isBasicType() const SAL_THROW(());
88 /// determines whether a given facet exists at the type
89 bool hasFacet( const ::rtl::OUString& _rFacetName ) const SAL_THROW(());
90 /// retrieves a facet value
91 ::com::sun::star::uno::Any
92 getFacet( const ::rtl::OUString& _rFacetName ) SAL_THROW(());
93 /// sets a facet value
94 void setFacet( const ::rtl::OUString& _rFacetName, const ::com::sun::star::uno::Any& _rFacetValue ) SAL_THROW(());
96 /** copies as much facets (values, respectively) from a give data type instance
98 void copyFacetsFrom( const ::rtl::Reference< XSDDataType >& _pSourceType );
100 protected:
101 virtual ~XSDDataType();
103 private:
104 XSDDataType(); // never implemented
105 XSDDataType( const XSDDataType& ); // never implemented
106 XSDDataType& operator=( const XSDDataType& ); // never implemented
109 //........................................................................
110 } // namespace pcr
111 //........................................................................
113 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX