LibreOffice Module extensions (master) 1
xsddatatypes.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/uno/Reference.hxx>
23#include <rtl/ref.hxx>
25
26namespace com::sun::star {
27 namespace xsd {
28 class XDataType;
29 }
30 namespace beans {
31 class XPropertySetInfo;
32 }
33}
34
35
36namespace pcr
37{
38
39
40 //= XSDDataType
41
43 {
44 private:
45 css::uno::Reference< css::xsd::XDataType >
47 css::uno::Reference< css::beans::XPropertySetInfo >
49
50 public:
51 explicit XSDDataType(
52 const css::uno::Reference< css::xsd::XDataType >& _rxDataType
53 );
54
56 const css::uno::Reference< css::xsd::XDataType >&
57 getUnoDataType() const { return m_xDataType; }
58
60 sal_Int16 classify() const;
61
62 // attribute access
63 OUString getName() const;
64 bool isBasicType() const;
65
67 bool hasFacet( const OUString& _rFacetName ) const;
69 css::uno::Any getFacet( const OUString& _rFacetName );
71 void setFacet( const OUString& _rFacetName, const css::uno::Any& _rFacetValue );
72
75 void copyFacetsFrom( const ::rtl::Reference< XSDDataType >& _pSourceType );
76
77 protected:
78 virtual ~XSDDataType() override;
79
80 private:
81 XSDDataType( const XSDDataType& ) = delete;
82 XSDDataType& operator=( const XSDDataType& ) = delete;
83 };
84
85
86} // namespace pcr
87
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XSDDataType & operator=(const XSDDataType &)=delete
OUString getName() const
const css::uno::Reference< css::xsd::XDataType > & getUnoDataType() const
retrieves the underlying UNO component
XSDDataType(const css::uno::Reference< css::xsd::XDataType > &_rxDataType)
css::uno::Reference< css::xsd::XDataType > m_xDataType
css::uno::Reference< css::beans::XPropertySetInfo > m_xFacetInfo
void copyFacetsFrom(const ::rtl::Reference< XSDDataType > &_pSourceType)
copies as much facets (values, respectively) from a give data type instance
bool hasFacet(const OUString &_rFacetName) const
determines whether a given facet exists at the type
css::uno::Any getFacet(const OUString &_rFacetName)
retrieves a facet value
bool isBasicType() const
virtual ~XSDDataType() override
sal_Int16 classify() const
classifies the data typ
XSDDataType(const XSDDataType &)=delete
void setFacet(const OUString &_rFacetName, const css::uno::Any &_rFacetValue)
sets a facet value
a property handler for any virtual string properties
Definition: browserline.cxx:39