Skip to content

Commit

Permalink
Rename macro for pybind11 cereal methods
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Jun 2, 2024
1 parent a7d166e commit 428abdc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class pyCrossSection : public CrossSection {
double FinalStateProbability(dataclasses::InteractionRecord const & record) const override;
std::vector<std::string> DensityVariables() const override;

RegisterPybind11Trampoline(CrossSection, pyCrossSection);
Pybind11TrampolineCerealMethods(CrossSection, pyCrossSection);
}; // class pyCrossSection

} // namespace interactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class pyDarkNewsCrossSection : public DarkNewsCrossSection {
std::vector<siren::dataclasses::InteractionSignature> GetPossibleSignaturesFromParents(siren::dataclasses::ParticleType primary_type, siren::dataclasses::ParticleType target_type) const override;
double FinalStateProbability(dataclasses::InteractionRecord const & record) const override;

RegisterPybind11Trampoline(DarkNewsCrossSection, pyDarkNewsCrossSection);
Pybind11TrampolineCerealMethods(DarkNewsCrossSection, pyDarkNewsCrossSection);
};

} // namespace interactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class pyDarkNewsDecay : public DarkNewsDecay {
std::vector<std::string> DensityVariables() const override;
double FinalStateProbability(dataclasses::InteractionRecord const & record) const override;

RegisterPybind11Trampoline(DarkNewsDecay, pyDarkNewsDecay);
Pybind11TrampolineCerealMethods(DarkNewsDecay, pyDarkNewsDecay);

}; // class pyDarkNewsDecay

Expand Down
2 changes: 1 addition & 1 deletion projects/interactions/public/SIREN/interactions/pyDecay.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class pyDecay : public Decay {
std::vector<std::string> DensityVariables() const override;
double FinalStateProbability(dataclasses::InteractionRecord const & record) const override;

RegisterPybind11Trampoline(Decay, pyDecay);
Pybind11TrampolineCerealMethods(Decay, pyDecay);
}; // class pyDecay

} // namespace interactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
return BaseType::cfuncname(__VA_ARGS__); \
} while (false);

#define RegisterPybind11Trampoline(BaseType, TrampolineType) \
#define Pybind11TrampolineCerealMethods(BaseType, TrampolineType) \
public: \
pybind11::object self; \
pybind11::object get_representation() { \
Expand Down

0 comments on commit 428abdc

Please sign in to comment.