2
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3
* http://www.gnu.org/licenses/gpl-3.0.html
6
* $Id: compiler_defs.cpp 4909 2008-02-27 13:15:26Z mortenmacfly $
7
* $HeadURL: svn://svn.berlios.de/codeblocks/tags/8.02/src/plugins/compilergcc/compiler_defs.cpp $
11
#include "compiler_defs.h"
12
#include <cbproject.h>
13
#include <projectbuildtarget.h>
15
#include <wx/listimpl.cpp>
16
WX_DEFINE_LIST(CompilerCommands);
18
CompilerQueue::CompilerQueue()
23
CompilerQueue::~CompilerQueue()
28
void CompilerQueue::Clear()
30
m_Commands.DeleteContents(true);
32
m_Commands.DeleteContents(false);
35
size_t CompilerQueue::GetCount() const
37
return m_Commands.GetCount();
40
bool CompilerQueue::LastCommandWasRun() const
45
void CompilerQueue::Add(CompilerCommand* cmd)
49
if (cmd->dir.IsEmpty() && cmd->project)
50
cmd->dir = cmd->project->GetBasePath();
51
m_Commands.Append(cmd);
55
void CompilerQueue::Add(CompilerQueue* queue)
57
wxCompilerCommandsNode* node = queue->m_Commands.GetFirst();
61
Add(new CompilerCommand(*(node->GetData())));
62
node = node->GetNext();
66
CompilerCommand* CompilerQueue::Peek()
68
wxCompilerCommandsNode* node = m_Commands.GetFirst();
71
return node->GetData();
74
CompilerCommand* CompilerQueue::Next()
76
wxCompilerCommandsNode* node = m_Commands.GetFirst();
79
CompilerCommand* cmd = node->GetData();
80
m_Commands.Erase(node);
81
m_LastWasRun = cmd ? cmd->isRun : false;
2
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3
* http://www.gnu.org/licenses/gpl-3.0.html
6
* $Id: compiler_defs.cpp 5929 2009-11-21 14:34:53Z biplab $
7
* $HeadURL: svn+ssh://jenslody@svn.berlios.de/svnroot/repos/codeblocks/trunk/src/plugins/compilergcc/compiler_defs.cpp $
11
#include "compiler_defs.h"
12
#include <cbproject.h>
13
#include <projectbuildtarget.h>
15
#include <wx/listimpl.cpp>
16
WX_DEFINE_LIST(CompilerCommands);
18
CompilerQueue::CompilerQueue()
23
CompilerQueue::~CompilerQueue()
28
void CompilerQueue::Clear()
30
m_Commands.DeleteContents(true);
32
m_Commands.DeleteContents(false);
35
size_t CompilerQueue::GetCount() const
37
return m_Commands.GetCount();
40
bool CompilerQueue::LastCommandWasRun() const
45
void CompilerQueue::Add(CompilerCommand* cmd)
49
if (cmd->dir.IsEmpty() && cmd->project)
50
cmd->dir = cmd->project->GetExecutionDir();
51
m_Commands.Append(cmd);
55
void CompilerQueue::Add(CompilerQueue* queue)
57
wxCompilerCommandsNode* node = queue->m_Commands.GetFirst();
61
Add(new CompilerCommand(*(node->GetData())));
62
node = node->GetNext();
66
CompilerCommand* CompilerQueue::Peek()
68
wxCompilerCommandsNode* node = m_Commands.GetFirst();
71
return node->GetData();
74
CompilerCommand* CompilerQueue::Next()
76
wxCompilerCommandsNode* node = m_Commands.GetFirst();
79
CompilerCommand* cmd = node->GetData();
80
m_Commands.Erase(node);
81
m_LastWasRun = cmd ? cmd->isRun : false;