AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
ValueEvent.Declaration.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17//-----------------------------------------------
18// AUTOMATICALLY GENERATED EVENT, DO NOT EDIT!
19//-----------------------------------------------
20
21#ifndef GENERATED_AGX_VALUE_H_DECLARATION
22#define GENERATED_AGX_VALUE_H_DECLARATION
23
24#include <agx/macros.h>
25
27class EventDispatch;
28
29class AGXCORE_EXPORT EventListener
30{
31public:
32
33 EventListener(agx::Object *owner = nullptr);
34 virtual ~EventListener();
35
36 agx::Object* getOwner();
37 template <typename T>
38 T* getOwner();
39
40 virtual void destroyCallback(agxData::Value* value);
41 virtual void updateCallback(agxData::Value* value);
42 virtual void bindCallback(agxData::Value* value, agxData::Value* binding, agxData::Value* oldBinding);
43
44private:
45 friend class EventDispatch;
46private:
47 agx::Object* m_owner;
48 agx::UInt32 m_numRegistered;
49};
50
51class AGXCORE_EXPORT EventDispatch
52{
53public:
54 EventDispatch();
55 ~EventDispatch();
56
57public:
58 void addListener(EventListener* listener);
59 void removeListener(EventListener* listener);
60 bool hasListener(EventListener* listener) const;
61
63 const EventListenerPtrVector& getListeners() const;
64
65public:
66 void triggerDestroyEvent(agxData::Value* value);
67 void triggerUpdateEvent(agxData::Value* value);
68 void triggerBindEvent(agxData::Value* value, agxData::Value* binding, agxData::Value* oldBinding);
69
70private:
71 EventListenerPtrVector m_listeners;
72 agx::Thread *m_activeThread;
73 agx::UInt32 m_iterationIndex;
74};
75
76class AGXCORE_EXPORT DestroyEvent : public agx::Object::Event
77{
78public:
79 DestroyEvent(agxData::Value* value);
80
81 agxData::Value* getValue();
82
83protected:
84 virtual ~DestroyEvent();
85
86private:
87 agxData::Value* m_value;
88};
89
90class AGXCORE_EXPORT UpdateEvent : public agx::Object::Event
91{
92public:
93 UpdateEvent(agxData::Value* value);
94
95 agxData::Value* getValue();
96
97protected:
98 virtual ~UpdateEvent();
99
100private:
101 agxData::Value* m_value;
102};
103
104class AGXCORE_EXPORT BindEvent : public agx::Object::Event
105{
106public:
107 BindEvent(agxData::Value* value, agxData::Value* binding, agxData::Value* oldBinding);
108
109 agxData::Value* getValue();
110 agxData::Value* getBinding();
111 agxData::Value* getOldBinding();
112
113protected:
114 virtual ~BindEvent();
115
116private:
117 agxData::Value* m_value;
118 agxData::Value* m_binding;
119 agxData::Value* m_oldBinding;
120};
121
122
124#endif // GENERATED_AGX_VALUE_H_DECLARATION
#define AGXCORE_EXPORT
Abstract representation of a value.
Definition: Value.h:49
agx::Object is a refcounted object with a name.
Definition: Object.h:59
agx::Thread is a representation of an OS specific implementation of a computational thread.
Definition: Thread.h:199
Vector containing 'raw' data.
Definition: agx/Vector.h:246
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
agx::Vector< EventListener * > EventListenerPtrVector
Definition: EventListener.h:31
uint32_t UInt32
Definition: Integer.h:32