Files
core/ASCOfficeOdtFile/Source/XML/Extension/WriteIf.cpp
Elen.Subbotina 6138139c4e исправлен проект - подключен "старый" DocxFormat (тот который с AVS - без вытирания буста)
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53593 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 22:37:54 +03:00

139 lines
2.8 KiB
C++

// auto inserted precompiled begin
#include "precompiled_xml.h"
// auto inserted precompiled end
#include "WriteIf.h"
namespace XML
{
const XML::XNode WriteIf(const XName& xname, const bool write)
{
if (write)
return XML::XElement(xname);
return XML::XNode();
}
const XML::XNode WriteIf(const XName& xname, const nullable<bool> write)
{
if (write.get_value_or(false))
return XML::XElement(xname);
return XML::XNode();
}
const XML::XNode WriteIf(const XName& xname, const property<bool> write)
{
if (write)
return XML::XElement(xname);
return XML::XNode();
}
const XML::XNode WriteIf(const XName& xname, const nullable_property<bool> write)
{
if (write.get_value_or(false))
return XML::XElement(xname);
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XElement& element, const bool write)
{
if (write)
return element;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XElement& element, const nullable<bool> write)
{
if (write.get_value_or(false))
return element;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XElement& element, const property<bool> write)
{
if (write)
return element;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XElement& element, const nullable_property<bool> write)
{
if (write.get_value_or(false))
return element;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XNode& node, const bool write)
{
if (write)
return node;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XNode& node, const nullable<bool> write)
{
if (write.get_value_or(write))
return node;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XNode& node, const property<bool> write)
{
if (write)
return node;
return XML::XNode();
}
const XML::XNode WriteIf(const XML::XNode& node, const nullable_property<bool> write)
{
if (write.get_value_or(false))
return node;
return XML::XNode();
}
const XML::XAttribute WriteIf(const XML::XAttribute& attribute, const bool write)
{
if (write)
return attribute;
return XML::XAttribute();
}
const XML::XAttribute WriteIf(const XML::XAttribute& attribute, const nullable<bool> write)
{
if (write.get_value_or(false))
return attribute;
return XML::XAttribute();
}
const XML::XAttribute WriteIf(const XML::XAttribute& attribute, const property<bool> write)
{
if (write)
return attribute;
return XML::XAttribute();
}
const XML::XAttribute WriteIf(const XML::XAttribute& attribute, const nullable_property<bool> write)
{
if (write.get_value_or(false))
return attribute;
return XML::XAttribute();
}
} // namespace XML