File tree 4 files changed +28
-27
lines changed
4 files changed +28
-27
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,10 @@ struct TEvBootstrapper {
19
19
20
20
static_assert (EvEnd < EventSpaceEnd(TKikimrEvents::ES_BOOTSTRAPPER), " event space overrun" );
21
21
22
- struct TEvActivate : public TEventBase <TEvActivate, EvActivate> {
23
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvActivate, " TEvBootstrapper::Activate" );
22
+ struct TEvActivate : public TEventSimpleNonLocal <TEvActivate, EvActivate> {
24
23
};
25
24
26
- struct TEvStandBy : public TEventBase <TEvStandBy, EvStandBy> {
27
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvStandBy, " TEvBootstrapper::StandBy" );
25
+ struct TEvStandBy : public TEventSimpleNonLocal <TEvStandBy, EvStandBy> {
28
26
};
29
27
30
28
struct TEvWatch ;
Original file line number Diff line number Diff line change @@ -374,17 +374,25 @@ namespace NActors {
374
374
typedef TAutoPtr<THandle> TPtr;
375
375
};
376
376
377
- #define DEFINE_SIMPLE_NONLOCAL_EVENT (eventType, header ) \
378
- TString ToStringHeader () const override { \
379
- return TString (header); \
380
- } \
381
- bool SerializeToArcadiaStream (NActors::TChunkSerializer*) const override { \
382
- return true ; \
383
- } \
384
- static IEventBase* Load (NActors::TEventSerializedData*) { \
385
- return new eventType (); \
386
- } \
387
- bool IsSerializable () const override { \
388
- return true ; \
389
- }
377
+
378
+ // Non-local event with empty serialization
379
+ template <typename TEv, ui32 TEventType>
380
+ class TEventSimpleNonLocal : public TEventBase <TEv, TEventType> {
381
+ public:
382
+ TString ToStringHeader () const override {
383
+ return TypeName<TEv>();
384
+ }
385
+
386
+ bool SerializeToArcadiaStream (TChunkSerializer* /* serializer*/ ) const override {
387
+ return true ;
388
+ }
389
+
390
+ bool IsSerializable () const override {
391
+ return true ;
392
+ }
393
+
394
+ static IEventBase* Load (TEventSerializedData*) {
395
+ return new TEv ();
396
+ }
397
+ };
390
398
}
Original file line number Diff line number Diff line change @@ -48,12 +48,10 @@ namespace NActors {
48
48
static_assert (End < EventSpaceEnd(ES_HELLOWORLD), " expect End < EventSpaceEnd(ES_HELLOWORLD)" );
49
49
};
50
50
51
- struct TEvPing : public TEventBase <TEvPing, THelloWorld::Ping> {
52
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPing, " HelloWorld: Ping" );
51
+ struct TEvPing : public TEventSimpleNonLocal <TEvPing, THelloWorld::Ping> {
53
52
};
54
53
55
- struct TEvPong : public TEventBase <TEvPong, THelloWorld::Pong> {
56
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPong, " HelloWorld: Pong" );
54
+ struct TEvPong : public TEventSimpleNonLocal <TEvPong, THelloWorld::Pong> {
57
55
};
58
56
59
57
struct TEvBlob : public TEventBase <TEvBlob, THelloWorld::Blob> {
@@ -116,8 +114,7 @@ namespace NActors {
116
114
struct TEvBootstrap : public TEventLocal <TEvBootstrap, TSystem::Bootstrap> {
117
115
};
118
116
119
- struct TEvPoison : public TEventBase <TEvPoison, TSystem::Poison> {
120
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPoison, " System: TEvPoison" )
117
+ struct TEvPoison : public TEventSimpleNonLocal <TEvPoison, TSystem::Poison> {
121
118
};
122
119
123
120
struct TEvWakeup : public TEventLocal <TEvWakeup, TSystem::Wakeup> {
Original file line number Diff line number Diff line change @@ -50,8 +50,7 @@ namespace NYql::NDqs {
50
50
explicit TEvReadyState (NDqProto::TReadyState&& proto);
51
51
};
52
52
53
- struct TEvPullResult : NActors::TEventBase<TEvPullResult, TDqExecuterEvents::ES_PULL_RESULT> {
54
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPullResult, " " );
53
+ struct TEvPullResult : NActors::TEventSimpleNonLocal<TEvPullResult, TDqExecuterEvents::ES_PULL_RESULT> {
55
54
};
56
55
57
56
struct TEvGraphExecutionEvent
@@ -99,8 +98,7 @@ namespace NYql::NDqs {
99
98
explicit TEvFullResultWriterStatusResponse (NDqProto::TFullResultWriterStatusResponse& data);
100
99
};
101
100
102
- struct TEvGraphFinished : NActors::TEventBase<TEvGraphFinished, TDqExecuterEvents::ES_GRAPH_FINISHED> {
103
- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvGraphFinished, " " );
101
+ struct TEvGraphFinished : NActors::TEventSimpleNonLocal<TEvGraphFinished, TDqExecuterEvents::ES_GRAPH_FINISHED> {
104
102
};
105
103
106
104
struct TEvFullResultWriterWriteRequest
You can’t perform that action at this time.
0 commit comments