src/isomodel/ForwardTranslator.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #ifndef ISOMODEL_FORWARDTRANSLATOR_HPP | ||
| 7 | #define ISOMODEL_FORWARDTRANSLATOR_HPP | ||
| 8 | |||
| 9 | #include "ISOModelAPI.hpp" | ||
| 10 | |||
| 11 | #include "../utilities/core/Optional.hpp" | ||
| 12 | #include "../utilities/core/Logger.hpp" | ||
| 13 | #include "../utilities/core/StringStreamLogSink.hpp" | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | |||
| 17 | namespace model { | ||
| 18 | class Model; | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace isomodel { | ||
| 22 | |||
| 23 | class UserModel; | ||
| 24 | |||
| 25 | class ISOMODEL_API ForwardTranslator | ||
| 26 | { | ||
| 27 | public: | ||
| 28 | ForwardTranslator(); | ||
| 29 | |||
| 30 | ✗ | virtual ~ForwardTranslator() = default; | |
| 31 | |||
| 32 | /** Translate an OpenStudio Model to an ISO UserModel. */ | ||
| 33 | // DLM: should this return an optional UserModel? | ||
| 34 | UserModel translateModel(const openstudio::model::Model& model); | ||
| 35 | |||
| 36 | /** Get warning messages generated by the last translation. */ | ||
| 37 | std::vector<LogMessage> warnings() const; | ||
| 38 | |||
| 39 | /** Get error messages generated by the last translation. */ | ||
| 40 | std::vector<LogMessage> errors() const; | ||
| 41 | |||
| 42 | private: | ||
| 43 | StringStreamLogSink m_logSink; | ||
| 44 | |||
| 45 | − | REGISTER_LOGGER("openstudio.isomodel.ForwardTranslator"); | |
| 46 | }; | ||
| 47 | |||
| 48 | } // namespace isomodel | ||
| 49 | } // namespace openstudio | ||
| 50 | |||
| 51 | #endif // ISOMODEL_FORWARDTRANSLATOR_HPP | ||
| 52 |