feat(python): Repaired python bindings
Python bindings have now been brought back up to feature pairity with C++. Further, stubs have been added for all python features so that code completion will work
This commit is contained in:
44
src/python/policy/trampoline/py_policy.h
Normal file
44
src/python/policy/trampoline/py_policy.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
#include "gridfire/policy/policy.h"
|
||||
|
||||
class PyNetworkPolicy final : public gridfire::policy::NetworkPolicy {
|
||||
public:
|
||||
[[nodiscard]] std::string name() const override;
|
||||
|
||||
[[nodiscard]] const std::set<fourdst::atomic::Species>& get_seed_species() const override;
|
||||
|
||||
[[nodiscard]] const gridfire::reaction::ReactionSet& get_seed_reactions() const override;
|
||||
|
||||
[[nodiscard]] gridfire::engine::DynamicEngine& construct() override;
|
||||
|
||||
[[nodiscard]] gridfire::policy::NetworkPolicyStatus get_status() const override;
|
||||
|
||||
[[nodiscard]] const std::vector<std::unique_ptr<gridfire::engine::DynamicEngine>> &get_engine_stack() const override;
|
||||
|
||||
[[nodiscard]] std::vector<gridfire::engine::EngineTypes> get_engine_types_stack() const override;
|
||||
|
||||
[[nodiscard]] const std::unique_ptr<gridfire::partition::PartitionFunction>& get_partition_function() const override;
|
||||
};
|
||||
|
||||
class PyReactionChainPolicy final : public gridfire::policy::ReactionChainPolicy {
|
||||
public:
|
||||
[[nodiscard]] const gridfire::reaction::ReactionSet & get_reactions() const override;
|
||||
|
||||
[[nodiscard]] bool contains(const std::string &id) const override;
|
||||
|
||||
[[nodiscard]] bool contains(const gridfire::reaction::Reaction &reaction) const override;
|
||||
|
||||
[[nodiscard]] std::unique_ptr<ReactionChainPolicy> clone() const override;
|
||||
|
||||
[[nodiscard]] std::string name() const override;
|
||||
|
||||
[[nodiscard]] uint64_t hash(uint64_t seed) const override;
|
||||
|
||||
[[nodiscard]] bool operator==(const ReactionChainPolicy &other) const override;
|
||||
|
||||
[[nodiscard]] bool operator!=(const ReactionChainPolicy &other) const override;
|
||||
};
|
||||
Reference in New Issue
Block a user