Documented GViewport a small amount, fixed a translation bug in BasicViewport.
[aesalon.git] / src / visualizer / ArtisanManager.cpp
blobbbebeb632a1f921968c83cd9c4faed702a6f2aa7
1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file src/visualizer/ArtisanManager.cpp
8 */
10 #include "visualizer/StringHacks.h"
11 #include "visualizer/ArtisanManager.h"
14 namespace Visualizer {
16 ArtisanManager::ArtisanManager() {
20 ArtisanManager::~ArtisanManager() {
24 ArtisanWrapper *ArtisanManager::artisan(const std::string &name) {
25 ArtisanWrapper *artisan = m_artisanHash[name];
26 if(artisan != NULL) return artisan;
28 artisan = new ArtisanWrapper(name);
29 if(artisan->interface() == NULL) {
30 delete artisan;
31 return NULL;
34 m_artisanHash[name] = artisan;
35 emit newArtisan(name);
37 return artisan;
40 QList<std::string> ArtisanManager::artisanList() {
41 return m_artisanHash.keys();
44 } // namespace Visualizer