Enhancement - Record accessors
- Implemented a variety of get/set routines for Record.
This commit is contained in:
15
src/T.cpp
15
src/T.cpp
@@ -215,21 +215,6 @@ void T::setAttribute (const std::string& name, const std::string& value)
|
||||
mAttributes[name] = value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void T::setAttributes (const std::map <std::string, std::string>& attributes)
|
||||
{
|
||||
foreach (i, attributes)
|
||||
{
|
||||
if (i->first.find (' ') != std::string::npos)
|
||||
throw std::string ("An attribute name may not contain spaces");
|
||||
|
||||
if (i->second.find (' ') != std::string::npos)
|
||||
throw std::string ("An attribute value may not contain spaces");
|
||||
|
||||
mAttributes[i->first] = i->second;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void T::removeAttribute (const std::string& name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user