Skip to content

Commit a65bf14

Browse files
committed
#9 - Corrected the Interface to align with the requirement
1 parent 43e3608 commit a65bf14

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/ESPressio_IThread.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ namespace ESPressio {
7777
// Callback Getters
7878

7979
/// `GetOnInitialized` returns the callback to be invoked when the Thread is initialized.
80-
virtual std::function<void(IThread*)> GetOnInitialized() = 0;
80+
virtual std::function<void(IThread*)> GetOnInitialize() = 0;
8181

8282
/// `GetOnStarted` returns the callback to be invoked when the Thread is started.
83-
virtual std::function<void(IThread*)> GetOnStarted() = 0;
83+
virtual std::function<void(IThread*)> GetOnStarte() = 0;
8484

8585
/// `GetOnPaused` returns the callback to be invoked when the Thread is paused.
86-
virtual std::function<void(IThread*)> GetOnPaused() = 0;
86+
virtual std::function<void(IThread*)> GetOnPause() = 0;
8787

8888
/// `GetOnTerminated` returns the callback to be invoked when the Thread is terminated.
89-
virtual std::function<void(IThread*)> GetOnTerminated() = 0;
89+
virtual std::function<void(IThread*)> GetOnTerminate() = 0;
9090

9191
/// `GetOnDestroying` returns the callback to be invoked when the Thread is being destroyed.
92-
virtual std::function<void(IThread*)> GetOnDestroying() = 0;
92+
virtual std::function<void(IThread*)> GetOnDestroy() = 0;
9393

9494
// Setters
9595

@@ -109,23 +109,23 @@ namespace ESPressio {
109109

110110
/// `SetOnInitialized` sets the callback to be invoked when the Thread is initialized.
111111
/// The callback function takes `IThread*` and ideally named `sender`.
112-
virtual void SetOnInitialized(std::function<void(IThread*)>) = 0;
112+
virtual void SetOnInitialize(std::function<void(IThread*)>) = 0;
113113

114114
/// `SetOnStarted` sets the callback to be invoked when the Thread is started.
115115
/// The callback function takes `IThread*` and ideally named `sender`.
116-
virtual void SetOnStarted(std::function<void(IThread*)>) = 0;
116+
virtual void SetOnStarte(std::function<void(IThread*)>) = 0;
117117

118118
/// `SetOnPaused` sets the callback to be invoked when the Thread is paused.
119119
/// The callback function takes `IThread*` and ideally named `sender`.
120-
virtual void SetOnPaused(std::function<void(IThread*)>) = 0;
120+
virtual void SetOnPause(std::function<void(IThread*)>) = 0;
121121

122122
/// `SetOnTerminated` sets the callback to be invoked when the Thread is terminated.
123123
/// The callback function takes `IThread*` and ideally named `sender`.
124-
virtual void SetOnTerminated(std::function<void(IThread*)>) = 0;
124+
virtual void SetOnTerminate(std::function<void(IThread*)>) = 0;
125125

126126
/// `SetOnDestroying` sets the callback to be invoked when the Thread is being destroyed.
127127
/// The callback function takes `IThread*` and ideally named `sender`.
128-
virtual void SetOnDestroying(std::function<void(IThread*)>) = 0;
128+
virtual void SetOnDestroy(std::function<void(IThread*)>) = 0;
129129
};
130130

131131
}

src/ESPressio_Thread.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,23 @@ namespace ESPressio {
169169

170170
// Callback Getters
171171

172-
std::function<void(IThread*)> GetOnInitialized() {
172+
std::function<void(IThread*)> GetOnInitialize() {
173173
return _onInitialize;
174174
}
175175

176-
std::function<void(IThread*)> GetOnStarted() {
176+
std::function<void(IThread*)> GetOnStarte() {
177177
return _onStarte;
178178
}
179179

180-
std::function<void(IThread*)> GetOnPaused() {
180+
std::function<void(IThread*)> GetOnPause() {
181181
return _onPause;
182182
}
183183

184-
std::function<void(IThread*)> GetOnTerminated() {
184+
std::function<void(IThread*)> GetOnTerminate() {
185185
return _onTerminate;
186186
}
187187

188-
std::function<void(IThread*)> GetOnDestroying() {
188+
std::function<void(IThread*)> GetOnDestroy() {
189189
return _onDestroy;
190190
}
191191

@@ -213,23 +213,23 @@ namespace ESPressio {
213213

214214
// Callback Setters
215215

216-
void SetOnInitialized(std::function<void(IThread*)> value) {
216+
void SetOnInitialize(std::function<void(IThread*)> value) {
217217
_onInitialize = value;
218218
}
219219

220-
void SetOnStarted(std::function<void(IThread*)> value) {
220+
void SetOnStarte(std::function<void(IThread*)> value) {
221221
_onStarte = value;
222222
}
223223

224-
void SetOnPaused(std::function<void(IThread*)> value) {
224+
void SetOnPause(std::function<void(IThread*)> value) {
225225
_onPause = value;
226226
}
227227

228-
void SetOnTerminated(std::function<void(IThread*)> value) {
228+
void SetOnTerminate(std::function<void(IThread*)> value) {
229229
_onTerminate = value;
230230
}
231231

232-
void SetOnDestroying(std::function<void(IThread*)> value) {
232+
void SetOnDestroy(std::function<void(IThread*)> value) {
233233
_onDestroy = value;
234234
}
235235
};

0 commit comments

Comments
 (0)