|
| 1 | +/* |
| 2 | +Copyright libCellML Contributors |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +#pragma once |
| 18 | + |
| 19 | +#include "libcellml/logger.h" |
| 20 | + |
| 21 | +namespace libcellml { |
| 22 | + |
| 23 | +/** |
| 24 | + * @brief The GeneratorContext class. |
| 25 | + * |
| 26 | + * The GeneratorContext class is for representing a CellML GeneratorContext. |
| 27 | + */ |
| 28 | +class LIBCELLML_EXPORT GeneratorContext: public Logger |
| 29 | +{ |
| 30 | +public: |
| 31 | + ~GeneratorContext(); /**< Destructor, @private. */ |
| 32 | + GeneratorContext(const GeneratorContext &rhs) = delete; /**< Copy constructor, @private. */ |
| 33 | + GeneratorContext(GeneratorContext &&rhs) noexcept = delete; /**< Move constructor, @private. */ |
| 34 | + GeneratorContext &operator=(GeneratorContext rhs) = delete; /**< Assignment operator, @private. */ |
| 35 | + |
| 36 | + /** |
| 37 | + * @brief Create a @ref GeneratorContext object. |
| 38 | + * |
| 39 | + * Factory method to create a @ref GeneratorContext. Create a GeneratorContext with:: |
| 40 | + * |
| 41 | + * @code |
| 42 | + * auto GeneratorContext = libcellml::GeneratorContext::create(); |
| 43 | + * @endcode |
| 44 | + * |
| 45 | + * @return A smart pointer to a @ref GeneratorContext object. |
| 46 | + */ |
| 47 | + static GeneratorContextPtr create() noexcept; |
| 48 | + |
| 49 | +private: |
| 50 | + GeneratorContext(); /**< Constructor, @private. */ |
| 51 | + |
| 52 | + struct GeneratorContextImpl; |
| 53 | + |
| 54 | + GeneratorContextImpl *pFunc(); /**< Getter for private implementation pointer, @private. */ |
| 55 | + const GeneratorContextImpl *pFunc() const; /**< Const getter for private implementation pointer, @private. */ |
| 56 | +}; |
| 57 | + |
| 58 | +} // namespace libcellml |
0 commit comments