1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
30 #define EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
32 /** === begin UNO includes === **/
33 #include <com/sun/star/uno/Reference.hxx>
34 /** === end UNO includes === **/
35 #include <rtl/ref.hxx>
37 namespace com
{ namespace sun
{ namespace star
{
43 class XPropertySetInfo
;
47 //........................................................................
50 //........................................................................
52 //====================================================================
54 //====================================================================
55 class XSDDataType
: public ::rtl::IReference
58 ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>
60 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
64 oslInterlockedCount m_refCount
;
67 inline ::com::sun::star::xsd::XDataType
* getDataTypeInterface() const { return m_xDataType
.get(); }
71 const ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>& _rxDataType
75 virtual oslInterlockedCount SAL_CALL
acquire();
76 virtual oslInterlockedCount SAL_CALL
release();
78 /// retrieves the underlying UNO component
79 inline const ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>&
80 getUnoDataType() const { return m_xDataType
; }
82 /// classifies the data typ
83 sal_Int16
classify() const SAL_THROW(());
86 ::rtl::OUString
getName() const SAL_THROW(());
87 bool isBasicType() const SAL_THROW(());
89 /// determines whether a given facet exists at the type
90 bool hasFacet( const ::rtl::OUString
& _rFacetName
) const SAL_THROW(());
91 /// retrieves a facet value
92 ::com::sun::star::uno::Any
93 getFacet( const ::rtl::OUString
& _rFacetName
) SAL_THROW(());
94 /// sets a facet value
95 void setFacet( const ::rtl::OUString
& _rFacetName
, const ::com::sun::star::uno::Any
& _rFacetValue
) SAL_THROW(());
97 /** copies as much facets (values, respectively) from a give data type instance
99 void copyFacetsFrom( const ::rtl::Reference
< XSDDataType
>& _pSourceType
);
102 virtual ~XSDDataType();
105 XSDDataType(); // never implemented
106 XSDDataType( const XSDDataType
& ); // never implemented
107 XSDDataType
& operator=( const XSDDataType
& ); // never implemented
110 //........................................................................
112 //........................................................................
114 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */