OpenWalnut  1.5.0dev
WLoadFinishedEvent.h
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 #ifndef WLOADFINISHEDEVENT_H
26 #define WLOADFINISHEDEVENT_H
27 
28 #include <vector>
29 #include <string>
30 
31 #include <boost/filesystem/path.hpp>
32 
33 #include <QtCore/QEvent>
34 
35 /**
36  * Event signalling a finished asynchronous load job.
37  */
39 {
40 public:
41  /**
42  * Creates a new event instance denoting that a asynchronous load was finished.
43  *
44  * \param filename the filename of the file that was loaded
45  * \param errors the list of errors. Can be empty.
46  * \param warnings the list of warnings. Can be empty.
47  */
48  WLoadFinishedEvent( boost::filesystem::path filename, std::vector< std::string > errors, std::vector< std::string > warnings );
49 
50  /**
51  * Destructor.
52  */
53  virtual ~WLoadFinishedEvent();
54 
55  /**
56  * Returns the list of errors
57  *
58  * \return the errors.
59  */
60  const std::vector< std::string >& getErrors() const;
61 
62  /**
63  * Returns the list of warnings
64  *
65  * \return the warnings.
66  */
67  const std::vector< std::string >& getWarnings() const;
68 
69  /**
70  * The filename of the file loaded.
71  *
72  * \return the filename
73  */
74  std::string getFilename() const;
75 
76 protected:
77 private:
78  /**
79  * The filename of the file loaded
80  */
81  boost::filesystem::path m_filename;
82 
83  /**
84  * The error list.
85  */
86  std::vector< std::string > m_errors;
87 
88  /**
89  * The warnings list.
90  */
91  std::vector< std::string > m_warnings;
92 };
93 
94 #endif // WLOADFINISHEDEVENT_H
95 
96 
Event signalling a finished asynchronous load job.
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.