OpenWalnut  1.5.0dev
WLoadFinishedEvent.cpp
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #include <vector>
26 #include <string>
27 
28 #include "WEventTypes.h"
29 
30 #include "WLoadFinishedEvent.h"
31 
32 WLoadFinishedEvent::WLoadFinishedEvent( boost::filesystem::path filename, std::vector< std::string > errors, std::vector< std::string > warnings )
33  : QEvent( static_cast< QEvent::Type >( WQT_LOADFINISHED ) ),
34  m_filename( filename ),
35  m_errors( errors ),
36  m_warnings( warnings )
37 {
38  // initialize members
39 }
40 
42 {
43  // cleanup
44 }
45 
46 const std::vector< std::string >& WLoadFinishedEvent::getErrors() const
47 {
48  return m_errors;
49 }
50 
51 const std::vector< std::string >& WLoadFinishedEvent::getWarnings() const
52 {
53  return m_warnings;
54 }
55 
57 {
58  return m_filename.string();
59 }
60 
const std::vector< std::string > & getWarnings() const
Returns the list of warnings.
std::vector< std::string > m_errors
The error list.
const std::vector< std::string > & getErrors() const
Returns the list of errors.
WLoadFinishedEvent(boost::filesystem::path filename, std::vector< std::string > errors, std::vector< std::string > warnings)
Creates a new event instance denoting that a asynchronous load was finished.
virtual ~WLoadFinishedEvent()
Destructor.
std::string getFilename() const
The filename of the file loaded.
std::vector< std::string > m_warnings
The warnings list.
boost::filesystem::path m_filename
The filename of the file loaded.