1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xsddatatypes.hxx,v $
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
{
45 class XPropertySetInfo
;
49 //........................................................................
52 //........................................................................
54 //====================================================================
56 //====================================================================
57 class XSDDataType
: public ::rtl::IReference
60 ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>
62 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
66 oslInterlockedCount m_refCount
;
69 inline ::com::sun::star::xsd::XDataType
* getDataTypeInterface() const { return m_xDataType
.get(); }
73 const ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>& _rxDataType
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(());
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
);
104 virtual ~XSDDataType();
107 XSDDataType(); // never implemented
108 XSDDataType( const XSDDataType
& ); // never implemented
109 XSDDataType
& operator=( const XSDDataType
& ); // never implemented
112 //........................................................................
114 //........................................................................
116 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX