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
{
42 class XPropertySetInfo
;
46 //........................................................................
49 //........................................................................
51 //====================================================================
53 //====================================================================
54 class XSDDataType
: public ::rtl::IReference
57 ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>
59 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
63 oslInterlockedCount m_refCount
;
66 inline ::com::sun::star::xsd::XDataType
* getDataTypeInterface() const { return m_xDataType
.get(); }
70 const ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>& _rxDataType
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(());
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
);
101 virtual ~XSDDataType();
104 XSDDataType(); // never implemented
105 XSDDataType( const XSDDataType
& ); // never implemented
106 XSDDataType
& operator=( const XSDDataType
& ); // never implemented
109 //........................................................................
111 //........................................................................
113 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX