lintel 0.2.0
Loading...
Searching...
No Matches
PropertyNoRuntimeChangeSupported.h
Go to the documentation of this file.
1#pragma once
2
3#include <exception>
4#include <format>
5#include <string>
6#include <utility>
7
9
10namespace lintel {
12class PropertyNoRuntimeChangeSupported : public std::exception
13{
14private:
15 std::shared_ptr<PropertyBase> m_property;
16 std::string m_message;
17
18public:
20
22 explicit PropertyNoRuntimeChangeSupported(std::shared_ptr<PropertyBase> tempProperty)
23 : m_property(std::move(tempProperty)),
24 m_message(std::format("{} no runtime change allowed", m_property->toString()))
25 {}
26
27 [[nodiscard]] const char *what() const noexcept override { return m_message.c_str(); }
28
30 [[nodiscard]] const std::shared_ptr<PropertyBase> &getProperty() { return m_property; }
31};
32}// namespace lintel
Definition PropertyNoRuntimeChangeSupported.h:13
const std::shared_ptr< PropertyBase > & getProperty()
Definition PropertyNoRuntimeChangeSupported.h:30
PropertyNoRuntimeChangeSupported(std::shared_ptr< PropertyBase > tempProperty)
Definition PropertyNoRuntimeChangeSupported.h:22
const char * what() const noexcept override
Definition PropertyNoRuntimeChangeSupported.h:27
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9