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;};
189 return (m_operator ==
kUnset);
200 switch (m_operator) {
201 case kAND:
return first && second;
202 case kOR:
return first || second;
203 case kNOT:
return !first;
204 case kNAND:
return !(first && second);
205 case kNOR:
return !(first || second);
206 case kXOR:
return first != second;
207 case kNXOR:
return first == second;
208 default:
return false;
218 switch (m_operator) {
219 case kAND:
return "AND";
220 case kOR:
return "OR";
221 case kNOT:
return "NOT";
222 case kNAND:
return "NAND";
223 case kNOR:
return "NOR";
224 case kXOR:
return "XOR";
225 case kNXOR:
return "NXOR";
237 return (*this).m_operator == other.m_operator;
247 return (*this).m_operator == other;
257 m_operator = other.m_operator;
268 return (*
this) = other.c_str();
281 OdAnsiString str(other);
283 if (str.iCompare(
"AND") == 0)
285 else if (str.iCompare(
"OR") == 0)
287 else if (str.iCompare(
"NOT") == 0)
289 else if (str.iCompare(
"NAND") == 0)
291 else if (str.iCompare(
"NOR") == 0)
293 else if (str.iCompare(
"XOR") == 0)
295 else if (str.iCompare(
"NXOR") == 0)
343 return m_applicability;
352 return (m_applicability ==
kUnset);
361 switch (m_applicability) {
364 case kBoth:
return "both";
376 return (*this).m_applicability == other.m_applicability;
386 return (*this).m_applicability == other;
396 m_applicability = other.m_applicability;
407 return (*
this) = other.c_str();
420 OdAnsiString str(other);
422 if (str.iCompare(
"import") == 0)
424 else if (str.iCompare(
"export") == 0)
426 else if (str.iCompare(
"both") == 0)
427 m_applicability =
kBoth;
479 return m_requirement;
488 return (m_requirement ==
kUnset);
497 switch (m_requirement) {
514 return (*this).m_requirement == other.m_requirement;
524 return (*this).m_requirement == other;
534 m_requirement = other.m_requirement;
545 return (*
this) = other.c_str();
558 OdAnsiString str(other);
560 if (str.iCompare(
"mandatory") == 0)
562 else if (str.iCompare(
"recommended") == 0)
564 else if ((str.iCompare(
"not-relevant") == 0) || (str.iCompare(
"not relevant") == 0))
566 else if ((str.iCompare(
"not-recommended") == 0) || (str.iCompare(
"not recommended") == 0))
568 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)