LibreOffice Module forms (master)
1
forms
source
xforms
mip.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 <rtl/ustring.hxx>
23
24
namespace
xforms
25
{
30
class
MIP
31
{
32
bool
mbHasReadonly
;
33
bool
mbReadonly
;
34
35
bool
mbHasRequired
;
36
bool
mbRequired
;
37
38
bool
mbHasRelevant
;
39
bool
mbRelevant
;
40
41
bool
mbHasConstraint
;
42
bool
mbConstraint
;
43
44
bool
mbHasCalculate
;
45
46
bool
mbHasTypeName
;
47
OUString
msTypeName
;
48
49
OUString
msConstraintExplanation
;
50
51
public
:
52
MIP
();
53
55
void
inherit
(
const
MIP
&);
56
58
void
join
(
const
MIP
&);
59
60
// - type (static; default: xsd:string)
61
// (currently default implemented as empty string)
62
const
OUString&
getTypeName
()
const
{
return
msTypeName
; }
63
void
setTypeName
(
const
OUString&);
64
void
resetTypeName
();
65
66
// - readonly (computed XPath; default: false; true if calculate exists)
67
bool
isReadonly
()
const
;
68
void
setReadonly
(
bool
);
69
void
resetReadonly
();
70
71
// - required (computed XPath; default: false)
72
bool
isRequired
()
const
{
return
mbRequired
; }
73
void
setRequired
(
bool
);
74
void
resetRequired
();
75
76
// - relevant (computed XPath; default: true)
77
bool
isRelevant
()
const
{
return
mbRelevant
; }
78
void
setRelevant
(
bool
);
79
void
resetRelevant
();
80
81
// - constraint (computed XPath; default: true)
82
bool
isConstraint
()
const
{
return
mbConstraint
; }
83
void
setConstraint
(
bool
);
84
void
resetConstraint
();
85
86
// explain _why_ a constraint failed
87
void
setConstraintExplanation
(
const
OUString&);
88
const
OUString&
getConstraintExplanation
()
const
{
return
msConstraintExplanation
; }
89
90
// - calculate (computed XPath; default: has none (false))
91
// (for calculate, we only store whether a calculate MIP is present;
92
// the actual calculate value is handled my changing the instance
93
// directly)
94
void
setHasCalculate
(
bool
);
95
96
// - minOccurs/maxOccurs (computed XPath; default: 0/inf)
97
// - p3ptype (static; no default)
98
};
99
100
}
// namespace xforms
101
102
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xforms::MIP
represents the XForms *m*odel *i*tem *p*roperties (MIPs) for a given XNode in the instance data at a ...
Definition:
mip.hxx:31
xforms::MIP::msTypeName
OUString msTypeName
Definition:
mip.hxx:47
xforms::MIP::mbReadonly
bool mbReadonly
Definition:
mip.hxx:33
xforms::MIP::resetRelevant
void resetRelevant()
Definition:
mip.cxx:84
xforms::MIP::setConstraintExplanation
void setConstraintExplanation(const OUString &)
Definition:
mip.cxx:89
xforms::MIP::msConstraintExplanation
OUString msConstraintExplanation
Definition:
mip.hxx:49
xforms::MIP::getConstraintExplanation
const OUString & getConstraintExplanation() const
Definition:
mip.hxx:88
xforms::MIP::isRelevant
bool isRelevant() const
Definition:
mip.hxx:77
xforms::MIP::mbHasReadonly
bool mbHasReadonly
Definition:
mip.hxx:32
xforms::MIP::getTypeName
const OUString & getTypeName() const
Definition:
mip.hxx:62
xforms::MIP::resetRequired
void resetRequired()
Definition:
mip.cxx:81
xforms::MIP::inherit
void inherit(const MIP &)
inherit from upper-level MIPs
Definition:
mip.cxx:36
xforms::MIP::isRequired
bool isRequired() const
Definition:
mip.hxx:72
xforms::MIP::setTypeName
void setTypeName(const OUString &)
Definition:
mip.cxx:93
xforms::MIP::mbHasRequired
bool mbHasRequired
Definition:
mip.hxx:35
xforms::MIP::setRelevant
void setRelevant(bool)
Definition:
mip.cxx:83
xforms::MIP::mbHasRelevant
bool mbHasRelevant
Definition:
mip.hxx:38
xforms::MIP::mbHasTypeName
bool mbHasTypeName
Definition:
mip.hxx:46
xforms::MIP::setConstraint
void setConstraint(bool)
Definition:
mip.cxx:86
xforms::MIP::mbHasCalculate
bool mbHasCalculate
Definition:
mip.hxx:44
xforms::MIP::setHasCalculate
void setHasCalculate(bool)
Definition:
mip.cxx:91
xforms::MIP::MIP
MIP()
Definition:
mip.cxx:26
xforms::MIP::setRequired
void setRequired(bool)
Definition:
mip.cxx:80
xforms::MIP::mbRelevant
bool mbRelevant
Definition:
mip.hxx:39
xforms::MIP::resetConstraint
void resetConstraint()
Definition:
mip.cxx:87
xforms::MIP::mbConstraint
bool mbConstraint
Definition:
mip.hxx:42
xforms::MIP::isConstraint
bool isConstraint() const
Definition:
mip.hxx:82
xforms::MIP::join
void join(const MIP &)
join with same-level MIPs
Definition:
mip.cxx:70
xforms::MIP::isReadonly
bool isReadonly() const
Definition:
mip.cxx:76
xforms::MIP::resetTypeName
void resetTypeName()
Definition:
mip.cxx:94
xforms::MIP::mbRequired
bool mbRequired
Definition:
mip.hxx:36
xforms::MIP::resetReadonly
void resetReadonly()
Definition:
mip.cxx:78
xforms::MIP::setReadonly
void setReadonly(bool)
Definition:
mip.cxx:77
xforms::MIP::mbHasConstraint
bool mbHasConstraint
Definition:
mip.hxx:41
xforms
Definition:
binding.hxx:42
Generated on Sun Jul 30 2023 04:36:32 for LibreOffice Module forms (master) by
1.9.3