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
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
) {
34 m_artisanHash
[name
] = artisan
;
35 emit
newArtisan(name
);
40 QList
<std::string
> ArtisanManager::artisanList() {
41 return m_artisanHash
.keys();
44 } // namespace Visualizer