AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
BufferEvent.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_BUFFER_H_DECLARATION
22#define GENERATED_AGX_BUFFER_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::Buffer* buffer);
41 virtual void resizeCallback(agxData::Buffer* buffer, agx::Index size, agx::Index oldSize);
42 virtual void updateCallback(agxData::Buffer* buffer);
43 virtual void updateCallback(agxData::Buffer* buffer, agx::Index index);
44 virtual void updateCallback(agxData::Buffer* buffer, agx::IndexRange range);
45 virtual void updateCallback(agxData::Buffer* buffer, agxData::Array< agx::Index > indexSet);
46
47private:
48 friend class EventDispatch;
49private:
50 agx::Object* m_owner;
51 agx::UInt32 m_numRegistered;
52};
53
54class AGXCORE_EXPORT EventDispatch
55{
56public:
57 EventDispatch();
58 ~EventDispatch();
59
60public:
61 void addListener(EventListener* listener);
62 void removeListener(EventListener* listener);
63 bool hasListener(EventListener* listener) const;
64
66 const EventListenerPtrVector& getListeners() const;
67
68public:
69 void triggerDestroyEvent(agxData::Buffer* buffer);
70 void triggerResizeEvent(agxData::Buffer* buffer, agx::Index size, agx::Index oldSize);
71 void triggerUpdateEvent(agxData::Buffer* buffer);
72 void triggerUpdateEvent(agxData::Buffer* buffer, agx::Index index);
73 void triggerUpdateEvent(agxData::Buffer* buffer, agx::IndexRange range);
74 void triggerUpdateEvent(agxData::Buffer* buffer, agxData::Array< agx::Index > indexSet);
75
76private:
77 EventListenerPtrVector m_listeners;
78 agx::Thread *m_activeThread;
79 agx::UInt32 m_iterationIndex;
80};
81
82class AGXCORE_EXPORT DestroyEvent : public agx::Object::Event
83{
84public:
85 DestroyEvent(agxData::Buffer* buffer);
86
87 agxData::Buffer* getBuffer();
88
89protected:
90 virtual ~DestroyEvent();
91
92private:
93 agxData::Buffer* m_buffer;
94};
95
96class AGXCORE_EXPORT ResizeEvent : public agx::Object::Event
97{
98public:
99 ResizeEvent(agxData::Buffer* buffer, agx::Index size, agx::Index oldSize);
100
101 agxData::Buffer* getBuffer();
102 agx::Index getSize();
103 agx::Index getOldSize();
104
105protected:
106 virtual ~ResizeEvent();
107
108private:
109 agxData::Buffer* m_buffer;
111 agx::Index m_oldSize;
112};
113
114class AGXCORE_EXPORT UpdateEvent : public agx::Object::Event
115{
116public:
117 UpdateEvent(agxData::Buffer* buffer);
118
119 agxData::Buffer* getBuffer();
120
121protected:
122 virtual ~UpdateEvent();
123
124private:
125 agxData::Buffer* m_buffer;
126};
127
128class AGXCORE_EXPORT UpdateEvent2 : public agx::Object::Event
129{
130public:
131 UpdateEvent2(agxData::Buffer* buffer, agx::Index index);
132
133 agxData::Buffer* getBuffer();
134 agx::Index getIndex();
135
136protected:
137 virtual ~UpdateEvent2();
138
139private:
140 agxData::Buffer* m_buffer;
141 agx::Index m_index;
142};
143
144class AGXCORE_EXPORT UpdateEvent3 : public agx::Object::Event
145{
146public:
147 UpdateEvent3(agxData::Buffer* buffer, agx::IndexRange range);
148
149 agxData::Buffer* getBuffer();
150 agx::IndexRange getRange();
151
152protected:
153 virtual ~UpdateEvent3();
154
155private:
156 agxData::Buffer* m_buffer;
157 agx::IndexRange m_range;
158};
159
160class AGXCORE_EXPORT UpdateEvent4 : public agx::Object::Event
161{
162public:
163 UpdateEvent4(agxData::Buffer* buffer, agxData::Array< agx::Index > indexSet);
164
165 agxData::Buffer* getBuffer();
166 agxData::Array< agx::Index > getIndexSet();
167
168protected:
169 virtual ~UpdateEvent4();
170
171private:
172 agxData::Buffer* m_buffer;
174};
175
176
178#endif // GENERATED_AGX_BUFFER_H_DECLARATION
#define AGXCORE_EXPORT
#define m_size
Definition: agx/Vector.h:429
Abstract representation of a data buffer.
Definition: Buffer.h:56
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
UInt32 Index
Definition: Integer.h:44