cmXMLWriter: overload Element() method for empty elements
This commit is contained in:
parent
cd992170db
commit
dd27e31351
|
@ -67,6 +67,13 @@ void cmXMLWriter::EndElement()
|
||||||
this->ElementOpen = false;
|
this->ElementOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmXMLWriter::Element(const char* name)
|
||||||
|
{
|
||||||
|
this->CloseStartElement();
|
||||||
|
this->ConditionalLineBreak(!this->IsContent, this->Elements.size());
|
||||||
|
this->Output << '<' << name << "/>";
|
||||||
|
}
|
||||||
|
|
||||||
void cmXMLWriter::BreakAttributes()
|
void cmXMLWriter::BreakAttributes()
|
||||||
{
|
{
|
||||||
this->BreakAttrib = true;
|
this->BreakAttrib = true;
|
||||||
|
|
|
@ -41,6 +41,8 @@ public:
|
||||||
this->Output << name << "=\"" << SafeAttribute(value) << '"';
|
this->Output << name << "=\"" << SafeAttribute(value) << '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Element(const char* name);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void Element(std::string const& name, T const& value)
|
void Element(std::string const& name, T const& value)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue