27 #include "../common/STLUtils.h"
54 assert(newName.empty() ==
false);
98 return m_onlineResource;
103 m_onlineResource = r;
110 m_colorSchemeGroups.push_back(group);
116 std::vector<ColorSchemeGroup*>::iterator it = std::find(m_colorSchemeGroups.begin(), m_colorSchemeGroups.end(), group);
118 if(it != m_colorSchemeGroups.end())
119 m_colorSchemeGroups.erase(it);
124 return m_colorSchemeGroups;
const std::string & getDescription() const
It returns the catalog description.
const std::vector< ColorSchemeGroup * > & getColorSchemeGroups() const
It returns the list of color scheme groups in the catalog.
This class represents a group of color schemes.
~ColorSchemeCatalog()
Destructor.
void setCopyright(const std::string &c)
It sets the catalog copyright notice.
void setDescription(const std::string &d)
It sets the catalog description.
const std::string & getAuthor() const
It returns the catalog author name.
void setAuthor(const std::string &author)
It sets the catalog author name.
The ColorSchemeCatalogManager is a singleton that can be used to manage all loaded color scheme catal...
void push_back(ColorSchemeGroup *group)
It adds a new group to the catalog and sets its relationship.
static T & getInstance()
It returns a reference to the singleton instance.
const std::string & getName() const
It returns the catalog name.
void setOnlineResource(const std::string &r)
It sets the link for more information about the catalog.
void disconnect(ColorSchemeGroup *group)
It removes the internal reference to the group.
ColorSchemeCatalog(const std::string &name)
It initializes a new ColorSchemeCatalog.
const std::string & getCopyright() const
It returns the catalog copyright notice.
The concept of color scheme.
This class represents a group of color schemes.
void setParent(ColorSchemeCatalog *parent)
It sets the parent color catalog for this group.
A catalog for color schemes groups.
void setName(const std::string &newName)
It changes the catalog name and adjusts its entry in the catalog manager if needed.
const std::string & getOnlineResource() const
It returns a link for more information about the catalog.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...