2 Aesalon, a tool to visualize a program's behaviour at run-time.
3 Copyright (C) 2010, Aesalon Development Team.
5 Aesalon is distributed under the terms of the GNU GPLv3. For more
6 licensing information, see the file LICENSE included with the distribution.
8 @file monitor/src/module/Loader.cpp
14 #include "module/Loader.h"
15 #include "config/ConcreteVault.h"
16 #include "Coordinator.h"
17 #include "common/StreamAsString.h"
22 ModuleID
Loader::m_last
= 0;
24 Loader::Loader() : m_moduleList(NULL
) {
25 m_vault
= Coordinator::instance()->vault();
26 m_moduleList
= new List();
33 void Loader::loadModules() {
34 std::vector
<std::string
> modules
;
36 m_vault
->get("::modules", modules
);
38 for(std::vector
<std::string
>::iterator i
= modules
.begin(); i
!= modules
.end(); ++i
) {
43 void Loader::loadModule(std::string name
) {
44 Module
*module
= new Module(name
);
45 m_vault
->set(name
+ ":moduleID", Common::StreamAsString() << ++m_last
);
46 m_moduleList
->addModule(module
);
50 } // namespace Monitor