-} // namespace anon
-
-//////////////////////////////////////////////////////////////////////////////
-
-bool Format::dummy() const
-{
- return extension().empty();
-}
-
-
-bool Format::IsChildFormat() const
-{
- if (name_.empty())
- return false;
- return isdigit(name_[name_.length() - 1]);
-}
-
-
-string const Format::ParentFormat() const
-{
- return name_.substr(0, name_.length() - 1);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-// This method should return a reference, and throw an exception
-// if the format named name cannot be found (Lgb)
-Format const * Formats::GetFormat(string const & name) const
-{
- FormatList::const_iterator cit =
- find_if(formatlist.begin(), formatlist.end(),
- compare_memfun(&Format::name, name));
- if (cit != formatlist.end())
- return &(*cit);
- else
- return 0;
-}
-
-
-int Formats::GetNumber(string const & name) const
-{
- FormatList::const_iterator cit =
- find_if(formatlist.begin(), formatlist.end(),
- compare_memfun(&Format::name, name));
- if (cit != formatlist.end())
- return cit - formatlist.begin();
- else
- return -1;
-}
-
-
-void Formats::Add(string const & name)
-{
- if (!GetFormat(name))
- Add(name, name, name, string());
-}
-