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/List.cpp
12 #include "module/List.h"
18 m_moduleList
.push_back(NULL
);
25 void List::addModule(Module
*module
) {
26 m_moduleList
.push_back(module
);
29 Module
*List::module(ModuleID id
) {
30 if(id
> m_moduleList
.size()) return NULL
;
31 return m_moduleList
[id
];
34 Module
*List::module(std::string name
) {
35 for(ModuleList::iterator i
= m_moduleList
.begin(); i
!= m_moduleList
.end(); ++i
) {
36 if((*i
)->moduleName() == name
) return *i
;
42 } // namespace Monitor