33 const char*
what() const noexcept;
36 std::
string errorMessage;
39#define AURORE_BIND(type, name, id) aurore::BoundView<type> name = aurore::BoundView<type>(id, this)
57 , ownerActivity(owner)
69 return this->getView();
74 return this->getView();
79 return this->getView() == value;
87 View* ownerView =
nullptr;
89 unsigned generation = 0;
102 if (this->view && this->ownerActivity && this->generation != this->ownerActivity->
getContentGeneration())
103 this->view =
nullptr;
111 this->view =
dynamic_cast<T*
>(this->ownerView->
getView(this->
id));
117 else if (this->ownerActivity)
119 this->view = (T*)this->ownerActivity->
getView(this->id);
123 throw ViewNotFoundException(this->ownerActivity, this->
id);
127 throw std::logic_error(
"No owner view or activity given to BoundView");
Definition activity.hpp:45
unsigned getContentGeneration() const
Definition activity.hpp:100
View * getView(std::string id)
BoundView(std::string id, Activity *owner)
Definition bind.hpp:55
bool operator==(const T *value)
Definition bind.hpp:77
T * getView()
Definition bind.hpp:61
BoundView(std::string id, View *owner)
Definition bind.hpp:49
T * operator->()
Definition bind.hpp:72
ViewNotFoundException(View *owner, std::string searchedId)
ViewNotFoundException(Activity *owner, std::string searchedId)
const char * what() const noexcept
virtual View * getView(std::string id)
Definition actions.hpp:25