m_Body += value;
}
+//
+void
+Kumu::XMLElement::SetBody(const std::string& value)
+{
+ m_Body = value;
+}
+
//
Kumu::XMLElement*
Kumu::XMLElement::AddChildWithContent(const char* name, const char* value)
return outList;
}
+//
+void
+Kumu::XMLElement::DeleteAttributes()
+{
+ m_AttrList.clear();
+}
+
+//
+void
+Kumu::XMLElement::DeleteAttrWithName(const char* name)
+{
+ assert(name);
+ AttributeList::iterator i;
+ for ( i = m_AttrList.begin(); i != m_AttrList.end(); i++ )
+ {
+ if ( i->name == std::string(name) )
+ m_AttrList.erase(i);
+ }
+}
+
+//
+void
+Kumu::XMLElement::DeleteChildren()
+{
+ for ( ElementList::iterator i = m_ChildList.begin(); i != m_ChildList.end(); i++ )
+ {
+ delete *i;
+ m_ChildList.erase(i);
+ }
+}
+
+//
+void
+Kumu::XMLElement::DeleteChild(const XMLElement* element)
+{
+ if ( element != 0 )
+ {
+ for ( ElementList::iterator i = m_ChildList.begin(); i != m_ChildList.end(); i++ )
+ {
+ if ( *i == element )
+ {
+ delete *i;
+ m_ChildList.erase(i);
+ return;
+ }
+ }
+ }
+}
+
+//
+void
+Kumu::XMLElement::ForgetChild(const XMLElement* element)
+{
+ if ( element != 0 )
+ {
+ for ( ElementList::iterator i = m_ChildList.begin(); i != m_ChildList.end(); i++ )
+ {
+ if ( *i == element )
+ {
+ m_ChildList.erase(i);
+ return;
+ }
+ }
+ }
+}
+
+
//----------------------------------------------------------------------------------------------------
#ifdef HAVE_EXPAT
/*
-Copyright (c) 2005-2008, John Hurst
+Copyright (c) 2005-2009, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
// building
void SetName(const char* name);
+ void SetBody(const std::string& value);
void AppendBody(const std::string& value);
void SetAttr(const char* name, const char* value);
XMLElement* AddChild(XMLElement* element);
const ElementList& GetChildrenWithName(const char* name, ElementList& outList) const;
bool HasName(const char* name) const;
+ // altering
+ void DeleteAttributes();
+ void DeleteAttrWithName(const char* name);
+ void DeleteChildren();
+ void DeleteChild(const XMLElement* element);
+ void ForgetChild(const XMLElement* element);
};
} // namespace Kumu
class S12MTimecode : public Kumu::IArchive
{
+ protected:
ui32_t m_FrameCount;
ui32_t m_FPS;