File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -380,4 +380,32 @@ namespace NActors {
380
380
typedef TEventHandle<TEventType> THandle;
381
381
typedef typename THandle::TPtr TPtr;
382
382
};
383
+
384
+ #define DEFINE_SIMPLE_LOCAL_EVENT (eventType, header ) \
385
+ TString ToStringHeader () const override { \
386
+ return TString (header); \
387
+ } \
388
+ bool SerializeToArcadiaStream (NActors::TChunkSerializer*) const override { \
389
+ Y_ABORT (" Local event " #eventType " is not serializable" ); \
390
+ } \
391
+ static IEventBase* Load (NActors::TEventSerializedData*) { \
392
+ Y_ABORT (" Local event " #eventType " has no load method" ); \
393
+ } \
394
+ bool IsSerializable () const override { \
395
+ return false ; \
396
+ }
397
+
398
+ #define DEFINE_SIMPLE_NONLOCAL_EVENT (eventType, header ) \
399
+ TString ToStringHeader () const override { \
400
+ return TString (header); \
401
+ } \
402
+ bool SerializeToArcadiaStream (NActors::TChunkSerializer*) const override { \
403
+ return true ; \
404
+ } \
405
+ static IEventBase* Load (NActors::TEventSerializedData*) { \
406
+ return new eventType (); \
407
+ } \
408
+ bool IsSerializable () const override { \
409
+ return true ; \
410
+ }
383
411
}
You can’t perform that action at this time.
0 commit comments