src/measure/OSMeasure.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 MEASURE_OSMEASURE_HPP | ||
| 7 | #define MEASURE_OSMEASURE_HPP | ||
| 8 | |||
| 9 | #include "MeasureAPI.hpp" | ||
| 10 | |||
| 11 | #include "../utilities/core/Logger.hpp" | ||
| 12 | #include "../utilities/core/Deprecated.hpp" | ||
| 13 | #include "../utilities/bcl/BCLEnums.hpp" | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | namespace measure { | ||
| 17 | |||
| 18 | class OSArgument; | ||
| 19 | class OSOutput; | ||
| 20 | class OSRunner; | ||
| 21 | |||
| 22 | /** OSMeasure is an abstract base class for a user script. There are derived types that operate | ||
| 23 | * on OpenStudio Models and EnergyPlus Workspaces. */ | ||
| 24 | class MEASURE_API OSMeasure | ||
| 25 | { | ||
| 26 | public: | ||
| 27 | /** @name Constructors and Destructors */ | ||
| 28 | //@{ | ||
| 29 | |||
| 30 | 176 | virtual ~OSMeasure() = default; | |
| 31 | |||
| 32 | //@} | ||
| 33 | /** @name Getters */ | ||
| 34 | //@{ | ||
| 35 | |||
| 36 | /// user facing name of this measure, defaults to empty | ||
| 37 | virtual std::string name() const; | ||
| 38 | |||
| 39 | /// user facing description of this measure, defaults to empty | ||
| 40 | virtual std::string description() const; | ||
| 41 | |||
| 42 | /// user facing BCL taxonomy of this measure, defaults to empty | ||
| 43 | virtual std::string taxonomy() const; | ||
| 44 | |||
| 45 | /// user facing technical description of this measure, defaults to empty | ||
| 46 | virtual std::string modeler_description() const; | ||
| 47 | |||
| 48 | MeasureType measureType() const; | ||
| 49 | |||
| 50 | //@} | ||
| 51 | /** @name Actions */ | ||
| 52 | //@{ | ||
| 53 | |||
| 54 | /** Register this script with SketchUp. Deprecated in favor of registerWithApplication(). | ||
| 55 | * Base class implementation does nothing and returns false. \deprecated */ | ||
| 56 | OS_DEPRECATED(1, 13, 0) virtual bool registerWithSketchUp() const; | ||
| 57 | |||
| 58 | /** Register this script with an Application. Base class implementation does nothing and | ||
| 59 | * returns false. \deprecated */ | ||
| 60 | OS_DEPRECATED(1, 13, 0) virtual bool registerWithApplication() const; | ||
| 61 | |||
| 62 | protected: | ||
| 63 | OSMeasure(MeasureType measureType); | ||
| 64 | |||
| 65 | //@} | ||
| 66 | private: | ||
| 67 | REGISTER_LOGGER("openstudio.measure.OSMeasure"); | ||
| 68 | MeasureType m_measureType; | ||
| 69 | }; | ||
| 70 | |||
| 71 | /** \relates OSMeasure */ | ||
| 72 | using OptionalOSMeasure = boost::optional<OSMeasure>; | ||
| 73 | |||
| 74 | /** \relates OSMeasure */ | ||
| 75 | using OSMeasureVector = std::vector<OSMeasure>; | ||
| 76 | |||
| 77 | } // namespace measure | ||
| 78 | } // namespace openstudio | ||
| 79 | |||
| 80 | #endif // MEASURE_OSMEASURE_HPP | ||
| 81 |