Skip to content

Commit

Permalink
Revert macro (broken arcadia and nbs) (ydb-platform#8758)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximyurchuk authored Sep 5, 2024
1 parent c1d76d8 commit 90dd99a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ydb/library/actors/core/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,32 @@ namespace NActors {
typedef TEventHandle<TEventType> THandle;
typedef typename THandle::TPtr TPtr;
};

#define DEFINE_SIMPLE_LOCAL_EVENT(eventType, header) \
TString ToStringHeader() const override { \
return TString(header); \
} \
bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \
Y_ABORT("Local event " #eventType " is not serializable"); \
} \
static IEventBase* Load(NActors::TEventSerializedData*) { \
Y_ABORT("Local event " #eventType " has no load method"); \
} \
bool IsSerializable() const override { \
return false; \
}

#define DEFINE_SIMPLE_NONLOCAL_EVENT(eventType, header) \
TString ToStringHeader() const override { \
return TString(header); \
} \
bool SerializeToArcadiaStream(NActors::TChunkSerializer*) const override { \
return true; \
} \
static IEventBase* Load(NActors::TEventSerializedData*) { \
return new eventType(); \
} \
bool IsSerializable() const override { \
return true; \
}
}

0 comments on commit 90dd99a

Please sign in to comment.