-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from aurusov/dev
Текущий dev
- Loading branch information
Showing
828 changed files
with
79,499 additions
and
83,420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,52 @@ | ||
#ifndef _RDO_STUDIO_CONSOLE_CONTROLLER_H_ | ||
#define _RDO_STUDIO_CONSOLE_CONTROLLER_H_ | ||
#pragma once | ||
|
||
// ----------------------------------------------------------------------- INCLUDES | ||
#include <boost/optional.hpp> | ||
#include <boost/thread/mutex.hpp> | ||
// ----------------------------------------------------------------------- SYNOPSIS | ||
#include "kernel/rdothread.h" | ||
#include "simulator/report/src/error_code.h" | ||
#include "simulator/report/src/file_message.h" | ||
// -------------------------------------------------------------------------------- | ||
|
||
namespace rdo { | ||
|
||
class console_controller: public RDOThread | ||
class ConsoleController: public RDOThread | ||
{ | ||
public: | ||
typedef std::list<std::string> StringList; | ||
ConsoleController(); | ||
virtual ~ConsoleController(); | ||
|
||
console_controller(); | ||
virtual ~console_controller(); | ||
bool isFinished() const; | ||
bool isConverted() const; | ||
bool isSimulationSuccessfully(); | ||
|
||
bool finished() const; | ||
bool converted() const; | ||
bool simulationSuccessfully(); | ||
bool isBuildError() const; | ||
bool isRuntimeError() const; | ||
bool isConvertorError() const; | ||
|
||
bool buildError() const; | ||
bool runtimeError() const; | ||
bool convertorError() const; | ||
|
||
void getBuildLogList(StringList& list) const; | ||
|
||
private: | ||
typedef rdo::simulation::report::FileMessage FileMessage; | ||
typedef rdo::simulation::report::RDOExitCode RDOExitCode; | ||
void getBuildLog(std::list<std::string>& list) const; | ||
|
||
private: | ||
void proc(RDOMessageInfo& msg); | ||
void fillBuildLogList(std::vector<FileMessage>& errors); | ||
|
||
private: | ||
enum SimulatorState | ||
{ | ||
SS_UNDEFINED, | ||
SS_IN_PROGRESS, | ||
SS_FINISHED | ||
}; | ||
|
||
SimulatorState m_state; | ||
bool m_converted; | ||
bool m_buildError; | ||
bool m_runtimeError; | ||
bool m_convertorError; | ||
RDOExitCode m_exitCode; | ||
StringList m_buildLogList; | ||
|
||
mutable boost::mutex m_stateMutex; | ||
typedef rdo::simulation::report::FileMessage FileMessage; | ||
|
||
enum class SimulatorState | ||
{ | ||
UNDEFINED, | ||
IN_PROGRESS, | ||
FINISHED | ||
}; | ||
|
||
SimulatorState state; | ||
mutable boost::mutex stateMutex; | ||
|
||
bool converted; | ||
bool buildError; | ||
bool runtimeError; | ||
bool convertorError; | ||
std::list<std::string> buildLog; | ||
|
||
void proc(RDOMessageInfo& msg); | ||
void appendToBuildLog(std::vector<FileMessage>& errors); | ||
}; | ||
|
||
} // namespace rdo | ||
|
||
#endif // _RDO_STUDIO_CONSOLE_CONTROLLER_H_ |
Oops, something went wrong.