src/utilities/filetypes/ForwardTranslatorOptions.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 UTILITIES_FILETYPES_FORWARDTRANSLATOROPTIONS_HPP | ||
| 7 | #define UTILITIES_FILETYPES_FORWARDTRANSLATOROPTIONS_HPP | ||
| 8 | |||
| 9 | #include "../UtilitiesAPI.hpp" | ||
| 10 | |||
| 11 | #include "../core/Logger.hpp" | ||
| 12 | |||
| 13 | namespace Json { | ||
| 14 | class Value; | ||
| 15 | } | ||
| 16 | |||
| 17 | namespace openstudio { | ||
| 18 | namespace detail { | ||
| 19 | class WorkflowJSON_Impl; | ||
| 20 | class RunOptions_Impl; | ||
| 21 | class ForwardTranslatorOptions_Impl; | ||
| 22 | } // namespace detail | ||
| 23 | |||
| 24 | struct ForwardTranslatorOptionKeyMethod | ||
| 25 | { | ||
| 26 | std::string json_name; | ||
| 27 | std::string ft_method_name; | ||
| 28 | }; | ||
| 29 | UTILITIES_API std::ostream& operator<<(std::ostream& out, const ForwardTranslatorOptionKeyMethod& opt); | ||
| 30 | |||
| 31 | class UTILITIES_API ForwardTranslatorOptions | ||
| 32 | { | ||
| 33 | public: | ||
| 34 | ForwardTranslatorOptions(); | ||
| 35 | |||
| 36 | void reset(); | ||
| 37 | |||
| 38 | /// Construct from JSON formatted string | ||
| 39 | static boost::optional<ForwardTranslatorOptions> fromString(const std::string& s); | ||
| 40 | |||
| 41 | Json::Value toJSON() const; | ||
| 42 | |||
| 43 | /// Serialize to JSON formatted string | ||
| 44 | std::string string() const; | ||
| 45 | |||
| 46 | bool keepRunControlSpecialDays() const; | ||
| 47 | bool isKeepRunControlSpecialDaysDefaulted() const; | ||
| 48 | void setKeepRunControlSpecialDays(bool keepRunControlSpecialDays); | ||
| 49 | void resetKeepRunControlSpecialDays(); | ||
| 50 | |||
| 51 | bool iPTabularOutput() const; | ||
| 52 | bool isIPTabularOutputDefaulted() const; | ||
| 53 | void setIPTabularOutput(bool iPTabularOutput); | ||
| 54 | void resetIPTabularOutput(); | ||
| 55 | |||
| 56 | bool excludeLCCObjects() const; | ||
| 57 | bool isExcludeLCCObjectsDefaulted() const; | ||
| 58 | void setExcludeLCCObjects(bool excludeLCCObjects); | ||
| 59 | void resetExcludeLCCObjects(); | ||
| 60 | |||
| 61 | bool excludeSQliteOutputReport() const; | ||
| 62 | bool isExcludeSQliteOutputReportDefaulted() const; | ||
| 63 | void setExcludeSQliteOutputReport(bool excludeSQliteOutputReport); | ||
| 64 | void resetExcludeSQliteOutputReport(); | ||
| 65 | |||
| 66 | bool excludeHTMLOutputReport() const; | ||
| 67 | bool isExcludeHTMLOutputReportDefaulted() const; | ||
| 68 | void setExcludeHTMLOutputReport(bool excludeHTMLOutputReport); | ||
| 69 | void resetExcludeHTMLOutputReport(); | ||
| 70 | |||
| 71 | bool excludeVariableDictionary() const; | ||
| 72 | bool isExcludeVariableDictionaryDefaulted() const; | ||
| 73 | void setExcludeVariableDictionary(bool excludeVariableDictionary); | ||
| 74 | void resetExcludeVariableDictionary(); | ||
| 75 | |||
| 76 | bool excludeSpaceTranslation() const; | ||
| 77 | bool isExcludeSpaceTranslationDefaulted() const; | ||
| 78 | void setExcludeSpaceTranslation(bool excludeSpaceTranslation); | ||
| 79 | void resetExcludeSpaceTranslation(); | ||
| 80 | |||
| 81 | bool excludeSpaceLoadInstances() const; | ||
| 82 | bool isExcludeSpaceLoadInstancesDefaulted() const; | ||
| 83 | void setExcludeSpaceLoadInstances(bool excludeSpaceLoadInstances); | ||
| 84 | void resetExcludeSpaceLoadInstances(); | ||
| 85 | |||
| 86 | /* Any non-defaulted value from other is brought over */ | ||
| 87 | void overrideValuesWith(const ForwardTranslatorOptions& other); | ||
| 88 | |||
| 89 | // TODO: keep? | ||
| 90 | static std::vector<ForwardTranslatorOptionKeyMethod> forwardTranslatorOptionKeyMethods(); | ||
| 91 | |||
| 92 | protected: | ||
| 93 | static ForwardTranslatorOptions fromJSON(const Json::Value& value); | ||
| 94 | |||
| 95 | // get the impl | ||
| 96 | 2 | std::shared_ptr<detail::ForwardTranslatorOptions_Impl> getImpl() const { | |
| 97 | 2 | return m_impl; | |
| 98 | } | ||
| 99 | |||
| 100 | explicit ForwardTranslatorOptions(std::shared_ptr<detail::ForwardTranslatorOptions_Impl> impl); | ||
| 101 | |||
| 102 | friend class detail::ForwardTranslatorOptions_Impl; | ||
| 103 | friend class RunOptions; | ||
| 104 | friend class detail::RunOptions_Impl; | ||
| 105 | |||
| 106 | private: | ||
| 107 | // configure logging | ||
| 108 | − | REGISTER_LOGGER("openstudio.ForwardTranslatorOptions"); | |
| 109 | |||
| 110 | // pointer to implementation | ||
| 111 | std::shared_ptr<detail::ForwardTranslatorOptions_Impl> m_impl; | ||
| 112 | }; | ||
| 113 | |||
| 114 | UTILITIES_API std::ostream& operator<<(std::ostream& os, const ForwardTranslatorOptions& forwardTranslatorOptions); | ||
| 115 | |||
| 116 | } // namespace openstudio | ||
| 117 | |||
| 118 | #endif // UTILITIES_FILETYPES_FORWARDTRANSLATOROPTIONS_HPP | ||
| 119 |