ibondiez / ticpp

Automatically exported from code.google.com/p/ticpp
0 stars 0 forks source link

RemoveAttribute && HasAttribute #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, i would like to have these functions:

bool HasAttribute(std::string const & name)
{
  ValidatePointer();
  return m_tiXmlPointer->Attribute( name.c_str() );
}

Default-value-way isn't enough, because any value can be in attribute-
value, and it's expensive to use exceptions to check only existence.

And second function:
void RemoveAttribute(std::string const & name)
{
  ValidatePointer();
  m_tiXmlPointer->RemoveAttribute()
}

For now i don't see any way to do this, so i added this function.

Thanks.

Original issue reported on code.google.com by VoidE...@gmail.com on 5 Jul 2008 at 11:11

GoogleCodeExporter commented 9 years ago
Here's the patch.

Original comment by VoidE...@gmail.com on 6 Jul 2008 at 9:59

Attachments:

GoogleCodeExporter commented 9 years ago
svn r92

Original comment by rjmy...@gmail.com on 17 Jul 2008 at 1:56