File tree Expand file tree Collapse file tree 4 files changed +28
-27
lines changed Expand file tree Collapse file tree 4 files changed +28
-27
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,10 @@ struct TEvBootstrapper {
1919
2020 static_assert (EvEnd < EventSpaceEnd(TKikimrEvents::ES_BOOTSTRAPPER), " event space overrun" );
2121
22- struct TEvActivate : public TEventBase <TEvActivate, EvActivate> {
23- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvActivate, " TEvBootstrapper::Activate" );
22+ struct TEvActivate : public TEventSimpleNonLocal <TEvActivate, EvActivate> {
2423 };
2524
26- struct TEvStandBy : public TEventBase <TEvStandBy, EvStandBy> {
27- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvStandBy, " TEvBootstrapper::StandBy" );
25+ struct TEvStandBy : public TEventSimpleNonLocal <TEvStandBy, EvStandBy> {
2826 };
2927
3028 struct TEvWatch ;
Original file line number Diff line number Diff line change @@ -374,17 +374,25 @@ namespace NActors {
374374 typedef TAutoPtr<THandle> TPtr;
375375 };
376376
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+ };
390398}
Original file line number Diff line number Diff line change @@ -48,12 +48,10 @@ namespace NActors {
4848 static_assert (End < EventSpaceEnd(ES_HELLOWORLD), " expect End < EventSpaceEnd(ES_HELLOWORLD)" );
4949 };
5050
51- struct TEvPing : public TEventBase <TEvPing, THelloWorld::Ping> {
52- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPing, " HelloWorld: Ping" );
51+ struct TEvPing : public TEventSimpleNonLocal <TEvPing, THelloWorld::Ping> {
5352 };
5453
55- struct TEvPong : public TEventBase <TEvPong, THelloWorld::Pong> {
56- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPong, " HelloWorld: Pong" );
54+ struct TEvPong : public TEventSimpleNonLocal <TEvPong, THelloWorld::Pong> {
5755 };
5856
5957 struct TEvBlob : public TEventBase <TEvBlob, THelloWorld::Blob> {
@@ -116,8 +114,7 @@ namespace NActors {
116114 struct TEvBootstrap : public TEventLocal <TEvBootstrap, TSystem::Bootstrap> {
117115 };
118116
119- struct TEvPoison : public TEventBase <TEvPoison, TSystem::Poison> {
120- DEFINE_SIMPLE_NONLOCAL_EVENT (TEvPoison, " System: TEvPoison" )
117+ struct TEvPoison : public TEventSimpleNonLocal <TEvPoison, TSystem::Poison> {
121118 };
122119
123120 struct TEvWakeup : public TEventLocal <TEvWakeup, TSystem::Wakeup> {
Original file line number Diff line number Diff line change @@ -50,8 +50,7 @@ namespace NYql::NDqs {
5050 explicit TEvReadyState (NDqProto::TReadyState&& proto);
5151 };
5252
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> {
5554 };
5655
5756 struct TEvGraphExecutionEvent
@@ -99,8 +98,7 @@ namespace NYql::NDqs {
9998 explicit TEvFullResultWriterStatusResponse (NDqProto::TFullResultWriterStatusResponse& data);
10099 };
101100
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> {
104102 };
105103
106104 struct TEvFullResultWriterWriteRequest
You can’t perform that action at this time.
0 commit comments