24#if !defined(ODA_ODMVDXMLCOMMON_H_INCLUDED_)
25#define ODA_ODMVDXMLCOMMON_H_INCLUDED_
41#ifdef MVDXM_MORE_THAN_ONE_ERROR
42#define MVDXM_MORE_THAN_ONE(parent, text, caption) appendXmlErrorMessage(parent, text, caption); return eSyntaxError;
44#define MVDXM_MORE_THAN_ONE(parent, text, caption) appendXmlWarningMessage(parent, text, caption)
47#define RETURNNOTOK(expr) {OdResult odResult;if (odResult=expr) return odResult;};
48#define RETURNNOTCHECK(expr) {OdResult odResult;if (odResult=expr) return odResult;};
87 return (m_operator ==
kUnset);
92 case kAND:
return first && second;
93 case kOR:
return first || second;
94 case kNOT:
return !first;
95 case kNAND:
return !(first && second);
96 case kNOR:
return !(first || second);
97 case kXOR:
return first != second;
98 case kNXOR:
return first == second;
99 default:
return false;
104 switch (m_operator) {
105 case kAND:
return "AND";
106 case kOR:
return "OR";
107 case kNOT:
return "NOT";
108 case kNAND:
return "NAND";
109 case kNOR:
return "NOR";
110 case kXOR:
return "XOR";
111 case kNXOR:
return "NXOR";
117 return (*this).m_operator == other.m_operator;
121 return (*this).m_operator == other;
125 m_operator = other.m_operator;
130 return (*
this) = other.c_str();
137 OdAnsiString str(other);
139 if (str.iCompare(
"AND") == 0)
141 else if (str.iCompare(
"OR") == 0)
143 else if (str.iCompare(
"NOT") == 0)
145 else if (str.iCompare(
"NAND") == 0)
147 else if (str.iCompare(
"NOR") == 0)
149 else if (str.iCompare(
"XOR") == 0)
151 else if (str.iCompare(
"NXOR") == 0)
177 return m_applicability;
181 return (m_applicability ==
kUnset);
185 switch (m_applicability) {
188 case kBoth:
return "both";
194 return (*this).m_applicability == other.m_applicability;
198 return (*this).m_applicability == other;
202 m_applicability = other.m_applicability;
207 return (*
this) = other.c_str();
214 OdAnsiString str(other);
216 if (str.iCompare(
"import") == 0)
218 else if (str.iCompare(
"export") == 0)
220 else if (str.iCompare(
"both") == 0)
221 m_applicability =
kBoth;
247 return m_requirement;
251 return (m_requirement ==
kUnset);
255 switch (m_requirement) {
266 return (*this).m_requirement == other.m_requirement;
270 return (*this).m_requirement == other;
274 m_requirement = other.m_requirement;
279 return (*
this) = other.c_str();
286 OdAnsiString str(other);
288 if (str.iCompare(
"mandatory") == 0)
290 else if (str.iCompare(
"recommended") == 0)
292 else if ((str.iCompare(
"not-relevant") == 0) || (str.iCompare(
"not relevant") == 0))
294 else if ((str.iCompare(
"not-recommended") == 0) || (str.iCompare(
"not recommended") == 0))
296 else if (str.iCompare(
"excluded") == 0)
bool operator==(const Applicability other) const
const bool IsUnset() const
OdMvdApplicability & operator=(const OdMvdApplicability &other)
bool operator==(const OdMvdApplicability &other) const
OdMvdApplicability & operator=(const char *other)
OdMvdApplicability & operator=(const OdAnsiString &other)
const Applicability get() const
OdMvdOperator & operator=(const OdAnsiString &other)
OdMvdOperator & operator=(const char *other)
bool operator==(const OdMvdOperator &other) const
OdMvdOperator & operator=(const OdMvdOperator &other)
const Operator get() const
const bool performBoolean(const bool first, const bool second) const
const bool IsUnset() const
bool operator==(const Operator other) const
bool operator==(const Requirement other) const
OdMvdRequirement & operator=(const OdMvdRequirement &other)
const Requirement get() const
const bool IsUnset() const
bool operator==(const OdMvdRequirement &other) const
OdMvdRequirement & operator=(const OdAnsiString &other)
OdMvdRequirement & operator=(const char *other)