src/alfalfa/AlfalfaJSON_Impl.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_ALFALFAJSON_IMPL_HPP | ||
| 7 | #define UTILITIES_FILETYPES_ALFALFAJSON_IMPL_HPP | ||
| 8 | |||
| 9 | #include "AlfalfaAPI.hpp" | ||
| 10 | |||
| 11 | #include "AlfalfaPoint.hpp" | ||
| 12 | |||
| 13 | #include "../utilities/core/Path.hpp" | ||
| 14 | |||
| 15 | #include <vector> | ||
| 16 | #include <json/json.h> | ||
| 17 | |||
| 18 | namespace openstudio { | ||
| 19 | namespace alfalfa { | ||
| 20 | namespace detail { | ||
| 21 | class ALFALFA_API AlfalfaJSON_Impl | ||
| 22 | { | ||
| 23 | public: | ||
| 24 | AlfalfaJSON_Impl(); | ||
| 25 | |||
| 26 | AlfalfaJSON_Impl(const openstudio::path& p); | ||
| 27 | |||
| 28 | bool save() const; | ||
| 29 | |||
| 30 | bool saveAs(const openstudio::path& p); | ||
| 31 | |||
| 32 | void setJSONPath(const openstudio::path& p); | ||
| 33 | |||
| 34 | Json::Value toJSON() const; | ||
| 35 | |||
| 36 | void exposePoint(const AlfalfaPoint& point); | ||
| 37 | |||
| 38 | std::vector<AlfalfaPoint> points() const; | ||
| 39 | |||
| 40 | private: | ||
| 41 | openstudio::path m_JSONPath; | ||
| 42 | |||
| 43 | std::vector<AlfalfaPoint> m_points; | ||
| 44 | |||
| 45 | // configure logging | ||
| 46 | − | REGISTER_LOGGER("openstudio.AlfalfaJSON"); | |
| 47 | }; | ||
| 48 | } // namespace detail | ||
| 49 | } // namespace alfalfa | ||
| 50 | } // namespace openstudio | ||
| 51 | |||
| 52 | #endif | ||
| 53 |