1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
21 #define EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <rtl/ref.hxx>
26 namespace com
{ namespace sun
{ namespace star
{
31 class XPropertySetInfo
;
35 //........................................................................
38 //........................................................................
40 //====================================================================
42 //====================================================================
43 class XSDDataType
: public ::rtl::IReference
46 ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>
48 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
52 oslInterlockedCount m_refCount
;
55 inline ::com::sun::star::xsd::XDataType
* getDataTypeInterface() const { return m_xDataType
.get(); }
59 const ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>& _rxDataType
63 virtual oslInterlockedCount SAL_CALL
acquire();
64 virtual oslInterlockedCount SAL_CALL
release();
66 /// retrieves the underlying UNO component
67 inline const ::com::sun::star::uno::Reference
< ::com::sun::star::xsd::XDataType
>&
68 getUnoDataType() const { return m_xDataType
; }
70 /// classifies the data typ
71 sal_Int16
classify() const SAL_THROW(());
74 OUString
getName() const SAL_THROW(());
75 bool isBasicType() const SAL_THROW(());
77 /// determines whether a given facet exists at the type
78 bool hasFacet( const OUString
& _rFacetName
) const SAL_THROW(());
79 /// retrieves a facet value
80 ::com::sun::star::uno::Any
81 getFacet( const OUString
& _rFacetName
) SAL_THROW(());
82 /// sets a facet value
83 void setFacet( const OUString
& _rFacetName
, const ::com::sun::star::uno::Any
& _rFacetValue
) SAL_THROW(());
85 /** copies as much facets (values, respectively) from a give data type instance
87 void copyFacetsFrom( const ::rtl::Reference
< XSDDataType
>& _pSourceType
);
90 virtual ~XSDDataType();
93 XSDDataType(); // never implemented
94 XSDDataType( const XSDDataType
& ); // never implemented
95 XSDDataType
& operator=( const XSDDataType
& ); // never implemented
98 //........................................................................
100 //........................................................................
102 #endif // EXTENSIONS_SOURCE_PROPCTRLR_XSDDATATYPES_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */