merge the formfield patch from ooo-build
[ooovba.git] / extensions / source / propctrlr / xsddatatypes.hxx
blob2df7320254e3aa98ba62745daa4a2ba7f06cdb14
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xsddatatypes.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
32 #define EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
34 /** === begin UNO includes === **/
35 #include <com/sun/star/uno/Reference.hxx>
36 /** === end UNO includes === **/
37 #include <rtl/ref.hxx>
39 namespace com { namespace sun { namespace star {
40 namespace xsd {
41 class XDataType;
43 namespace beans {
44 class XPropertySet;
45 class XPropertySetInfo;
47 } } }
49 //........................................................................
50 namespace pcr
52 //........................................................................
54 //====================================================================
55 //= XSDDataType
56 //====================================================================
57 class XSDDataType : public ::rtl::IReference
59 private:
60 ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >
61 m_xDataType;
62 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
63 m_xFacetInfo;
65 protected:
66 oslInterlockedCount m_refCount;
68 protected:
69 inline ::com::sun::star::xsd::XDataType* getDataTypeInterface() const { return m_xDataType.get(); }
71 public:
72 XSDDataType(
73 const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >& _rxDataType
76 // IReference
77 virtual oslInterlockedCount SAL_CALL acquire();
78 virtual oslInterlockedCount SAL_CALL release();
80 /// retrieves the underlying UNO component
81 inline const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >&
82 getUnoDataType() const { return m_xDataType; }
84 /// classifies the data typ
85 sal_Int16 classify() const SAL_THROW(());
87 // attribute access
88 ::rtl::OUString getName() const SAL_THROW(());
89 bool isBasicType() const SAL_THROW(());
91 /// determines whether a given facet exists at the type
92 bool hasFacet( const ::rtl::OUString& _rFacetName ) const SAL_THROW(());
93 /// retrieves a facet value
94 ::com::sun::star::uno::Any
95 getFacet( const ::rtl::OUString& _rFacetName ) SAL_THROW(());
96 /// sets a facet value
97 void setFacet( const ::rtl::OUString& _rFacetName, const ::com::sun::star::uno::Any& _rFacetValue ) SAL_THROW(());
99 /** copies as much facets (values, respectively) from a give data type instance
101 void copyFacetsFrom( const ::rtl::Reference< XSDDataType >& _pSourceType );
103 protected:
104 virtual ~XSDDataType();
106 private:
107 XSDDataType(); // never implemented
108 XSDDataType( const XSDDataType& ); // never implemented
109 XSDDataType& operator=( const XSDDataType& ); // never implemented
112 //........................................................................
113 } // namespace pcr
114 //........................................................................
116 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX