25 #ifndef TBX_MATCHLIFETIME_H_
26 #define TBX_MATCHLIFETIME_H_
28 #include "autocreatelistener.h"
29 #include "objectdelete.h"
30 #include "application.h"
Templated class to match the lifetime of a toolbox object to a c++ class.
Definition: matchlifetime.h:42
virtual void auto_created(std::string template_name, Object object)
Create a new C++ class for the auto created object.
Definition: matchlifetime.h:64
void set_autocreate_listener(std::string template_name, AutoCreateListener *listener)
Set the AutoCreateListener to be called when an object with the specified template is created...
Definition: application.cc:173
Templated object deleted listener to delete a C++ object when a toolbox object gets deleted...
Definition: objectdelete.h:43
Base Listener for auto create events.
Definition: autocreatelistener.h:41
Application * app()
Get the current application instance.
Definition: application.h:206
Class to manipulate a toolbox object.
Definition: object.h:50
MatchLifetime(const char *template_name)
Constructor with template name automatically sets autocreate listener on the application.
Definition: matchlifetime.h:56
MatchLifetime()
Constructor with no parameters.
Definition: matchlifetime.h:49