41 g_log.
debug() <<
"\"" << name <<
"\" not registered as a real name, trying an alias.\n";
48 g_log.
error() <<
"UserSubWindowFactory: \"" + name +
"\" is not registered as an interface name.\n";
50 " is not registered or recognised as "
51 "an alias of a known interface.\n",
68 return QSet<QString>();
87 QString alias = QString::fromStdString(name);
89 std::string
error =
"Alias \"" + name +
"\" is defined for multiple real interfaces: \"";
90 QListIterator<std::string> itr(
m_badAliases.value(alias));
91 while (itr.hasNext()) {
114 QStringList key_list;
116 for (
const auto &key :
keys) {
117 key_list.append(QString::fromStdString(key));
132 auto itemIt =
m_encoders.find(subWindow->windowTitle().toStdString());
134 auto item = itemIt->second->createUnwrappedInstance();
151 auto item = itemIt->second->createUnwrappedInstance();
std::map< std::string, std::shared_ptr< Mantid::Kernel::AbstractInstantiator< BaseEncoder > > > m_encoders
UserSubWindowFactoryImpl()
Private Constructor for singleton class.
QHash< QString, QSet< QString > > m_categoryLookup
A map of interfaces to their categories.
BaseEncoder * findEncoder(QWidget *window)
Finds the Encoder for the given window and returns a raw pointer to it.
QHash< QString, std::string > m_aliasLookup
A map of alias names to "real" names.
QStringList keys() const
The keys associated with UserSubWindow classes.
BaseDecoder * findDecoder(const std::string &decodeString)
Finds the Decoder for the given window and returns a raw pointer to it.
std::map< std::string, std::shared_ptr< Mantid::Kernel::AbstractInstantiator< BaseDecoder > > > m_decoders
UserSubWindow * createFromAlias(const std::string &name) const
Try to create a sub window from the list of aliases for an interface.
QSet< QString > categories(const QString &interfaceName) const
Return the set of categories that the interface with the given name belongs to.
UserSubWindow * createUnwrapped(const std::string &name) const override
Create a raw pointer to the interface with the given name.
QHash< QString, QList< std::string > > m_badAliases
An index of multiply defined aliases.
This is the base class all customised user interfaces that do not wish to be tied to a specific Manti...
virtual Base * createUnwrapped(const std::string &className) const
Creates a new instance of the class with the given name, which is not wrapped in a boost shared_ptr.
virtual const std::vector< std::string > getKeys() const
Returns the keys in the map.
Exception for when an item is not found in a collection.
The Logger class is in charge of the publishing messages from the framework through various channels.
void debug(const std::string &msg)
Logs at debug level.
void error(const std::string &msg)
Logs at error level.
Kernel::Logger g_log("ExperimentInfo")
static logger object