Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script interface Backend Replacement #3794

Merged
merged 147 commits into from
Aug 24, 2020
Merged
Changes from 1 commit
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
acd2767
script_interface: Cleanup
fweik Feb 20, 2019
b24dedd
utils: De-static Utils::Factory
fweik Feb 20, 2019
dc175e2
script_interface: Map remote objects by reference
fweik May 13, 2019
1037afc
script_interface: Don't swallow exceptions for object creation
fweik May 14, 2019
76e4b6f
script_interface: Fixed python object creation
fweik May 14, 2019
638d85d
script_interface: Factored out packing functions
fweik May 14, 2019
2acb203
script_interface: boost::get -> get_value
fweik May 14, 2019
8201d7a
script_interface: pack/unpack
fweik May 15, 2019
5d80c8e
script_interface: Pack state into string
fweik May 15, 2019
041f664
script_interface: Removerd checkpointing
fweik May 15, 2019
136ada4
script_interface: ScriptInterfaceBase -> ObjectHandle
fweik May 16, 2019
8d56560
script_interface: Privatize parameter setters
fweik May 16, 2019
0be36d7
script_interface: Removed redundant ParallelScriptInterface::get_para…
fweik May 16, 2019
68a4aae
script_interface: Keep alive all parameters
fweik May 16, 2019
0aca6ee
script_interface: cleanup
fweik May 16, 2019
3f17d9f
script_interface: cleanup
fweik May 16, 2019
a42ba01
ParallelScriptInterfaceSlave -> RemoteObjectHandle
fweik May 16, 2019
e9f468f
utils: type_id + test
fweik May 16, 2019
6b0edac
utils: Removed unused method from Factory
fweik May 16, 2019
54e5cfd
utils: Avoid some heap allocations in Factory
fweik May 16, 2019
14507a6
Formatting
fweik May 16, 2019
2c1cd23
script_interface: Cleanup
fweik May 16, 2019
3f08e7d
script_interface: ObjectHandle::call_method -> ObjectHandle::do_call_…
fweik May 17, 2019
b9c35e4
script_interface: Made ObjectHandle::do_call_method private.
fweik May 17, 2019
3c0d5b0
Formatting
fweik May 17, 2019
bfa6ad7
script_interface: Defer creation of remote objects until they are nee…
fweik May 18, 2019
b66fd74
script_interface: Merge ::NEW and ::CONSTRUCT callbacks
fweik May 18, 2019
686b395
script_interface: Reorder communication during obejct creation
fweik May 18, 2019
dc93397
script_interface: Do proper two-stage construction for ObjectHandle
fweik May 18, 2019
662b550
script_interface: Hide implementation of ObjectHandle::construct
fweik May 18, 2019
dff77e9
Formatting
fweik May 18, 2019
9cf253d
script_interface: Devirtualize ObjectHandle::get_parameters
fweik May 18, 2019
8b5b791
script_interface: Removed old remote handle stuff
fweik May 20, 2019
ba274a0
script_interface: Added ObjectRef to Variant
fweik May 20, 2019
1ce904a
script_interface: Removed code returning object ids
fweik May 20, 2019
830fa3e
utils: Made ObejctId std hashable
fweik May 20, 2019
c992ed7
script_interface: Make it work again (mostly)
fweik May 20, 2019
7abfd71
script_interface: Cleanup
fweik May 20, 2019
8dbd2dd
script_interface: Formatting
fweik May 20, 2019
3c9ddf4
script_interface: Removed unused function
fweik May 20, 2019
38f5504
script_interface: Slightly better names
fweik May 20, 2019
9ea8890
script_interface: Removed rest of variant CallbackAction
fweik May 20, 2019
132f5e7
script_interface: Removed unused id stuff
fweik May 20, 2019
6ced2bf
script_interface: Removed AutoObjectId stuff
fweik May 21, 2019
9be8560
script_interface: Fixed cython regressions
fweik May 21, 2019
aff62ce
script_interface: Cleanup
fweik May 21, 2019
c5bf11f
script_interface: Removed unused function.
fweik May 21, 2019
90899c0
script_interface: recursive_visitor for void
fweik May 21, 2019
f9a048f
script_interface: Fixed build
fweik Jun 16, 2019
b1d1c0b
script_interface: Reintroduce ObjectHandle::set_state
fweik Jun 16, 2019
e738ace
utils: Moved pack/unpack to Utils + test
fweik Jun 16, 2019
1c30f01
script_interface: Split of PackedVariant
fweik Jun 16, 2019
983986f
script_interface: Cleanup
fweik Jun 16, 2019
ab3fb64
script_interface: Replaced custom packing functions
fweik Jun 16, 2019
41e5d26
script_interface: Cleanup
fweik Jun 16, 2019
c3d56fb
script_interface: Reintroduce serialization
fweik Jun 17, 2019
16a2d0b
script_interface: Reintroduce interanl state serialization
fweik Jun 17, 2019
fc912f7
script_interface: Removed unit test for removed class
fweik Jun 17, 2019
ce2493d
utils: Removed unused function
fweik Jun 17, 2019
6ad59d1
script_interface: Handle exceptions on the head node
fweik Jun 17, 2019
78332b5
script_interface: Customization point for destructor, fixed mpi deadl…
fweik Jun 17, 2019
91110bb
script_interface: ScriptObjectRegistry -> ObjectList, cleanup
fweik Jun 18, 2019
48b89a1
script_interface: const&
fweik Jun 18, 2019
2e68bf6
Formatting
fweik Jun 18, 2019
fba9f10
script_interface: Put global state into namespace
fweik Jun 19, 2019
cdb323e
python: Shuffel things around
fweik Jun 19, 2019
4c7f195
script_interface: Initialize form python
fweik Jun 19, 2019
1335330
script_interface: Moved ObjectManager global to initialize
fweik Jul 9, 2019
782a47f
script_interface: Disentangle headers
fweik Jul 9, 2019
cc2e608
scritp_interface: Moved CreationPolicy to namespace scope
fweik Jul 11, 2019
1d52b5a
script_interface: Moved object creation + serialization to ObjectManager
fweik Jul 11, 2019
702fd33
script_interface: De-static factory moved it to ObjectManager
fweik Jul 11, 2019
f4c5217
utils: Switch factory implementation to std::unordered_map
fweik Jul 15, 2019
4b5a060
script_interface: Removed debug prints
fweik Jul 15, 2019
aa7ba56
script_interface: Moved ScriptInterface unit tests
fweik Jul 15, 2019
3e82595
script_interface: const correctness
fweik Jul 16, 2019
68ad205
script_interface: ObjectManager: Use local interface
fweik Jul 16, 2019
27b75e1
script_interface: Moved policy check to manager
fweik Jul 16, 2019
ff73195
script_interface: ObjectManager::shared_from_this
fweik Jul 17, 2019
6c3b455
script_interface: Moved name/policy info to ObjectManager
fweik Jul 18, 2019
b922fda
script_interface: Split ObjectManager and Context
fweik Jul 18, 2019
f37d348
script_interface: Separated Context interface from Implementation
fweik Jul 22, 2019
8966b18
script_interface: Cleanup
fweik Oct 7, 2019
53e4ac7
script_interface: Initial import of ClassName
fweik Oct 7, 2019
db167c6
script_interface: Fixed build
fweik Oct 11, 2019
8bcdab3
script_interface: Fixed LocalContext test
fweik Nov 19, 2019
9b85bf6
script_interface: python: Switch to object manager
fweik Nov 19, 2019
a16ca57
script_interface: Added missing class registration
fweik Nov 19, 2019
01deaa2
script_interface: Introduced node local context
fweik Nov 19, 2019
8bc50ea
scritp_interface: Context: Fixed derserialization initialization order
fweik Nov 19, 2019
d78edee
script_interface: Fixed merge regressions
fweik Nov 20, 2019
5cc509e
script_interface: Test for GlobalContext
fweik Jul 7, 2020
bde02e4
script_interface: Allow ObjectHandles without Context set
fweik Jul 7, 2020
7414db9
script_interface: Fixed Scaled coupling serialization
fweik Jul 7, 2020
89516cb
script_interface: Cleanup interface of Context
fweik Jul 9, 2020
f78ea9c
script_interface: GlobalContext: Added custom deleter do manage distr…
fweik Jul 9, 2020
9d2184b
script_interface: Removed customization point for the destruction of …
fweik Jul 9, 2020
9d29d92
python: Removed unneeded file
fweik Jul 10, 2020
0ff877b
script_interface: Fixed merge regressions
fweik Jul 10, 2020
612d8c9
script_interface: Header cleanup
fweik Jul 10, 2020
d2f7570
script_interface: removed outdated docs
fweik Jul 10, 2020
ff30a15
very important formatting patch
fweik Jul 10, 2020
193f1f4
script_interface: Fixed doxygen warnings
fweik Jul 10, 2020
6f58fdc
script_interface: Help older gcc's with scope resolution
fweik Jul 10, 2020
45b8d57
script_interface: Address clang-tidy warning
fweik Jul 10, 2020
60cd4ba
script_interface: Address clang-tidy warning
fweik Jul 10, 2020
756858b
utils: Removed unneeded make_function
fweik Jul 11, 2020
3121df2
script_interface: Do not export cpp code via script_interface
fweik Jul 11, 2020
e5b7308
script_interface: Fixed docstring
fweik Jul 11, 2020
7bce5bf
script_interface: Fixed docstring
fweik Jul 11, 2020
e244520
script_interface: Fixed merge regressions
fweik Jul 15, 2020
ca0eb69
script_interface: Removed unused function
fweik Jul 15, 2020
9020ada
script_interface: Added exception type, don't swallow unrelated excep…
fweik Jul 15, 2020
1fe6776
script_interface: Test for do_ interface of ObjectHandle
fweik Jul 15, 2020
d730827
script_interface: Test for notify_ interface of ObjectHandle
fweik Jul 15, 2020
74aa5dc
script_interface: Removed ClassName contraption
fweik Jul 15, 2020
e55bc68
script_interface: (c) header
fweik Jul 15, 2020
7556b4f
script_interface: Inlined recursive_visitor, docstrings
fweik Jul 15, 2020
29d6bd5
script_interface: Header cleanup
fweik Jul 15, 2020
0d313c0
script_interface: Hide some implementation details of Context
fweik Jul 15, 2020
4b671dc
script_interface: Consistent namening in ObjectHandle
fweik Jul 16, 2020
3c24d7a
script_interface: Removed unused template parameters from AutoParamet…
fweik Jul 16, 2020
0b7ab08
script_interface: Renamed test
fweik Jul 16, 2020
bdb9165
script_interface: Docstrings
fweik Jul 17, 2020
d2685c8
script_interface: Made Context::deserialize static
fweik Jul 23, 2020
e387e31
script_interface: Moved serialization from Context to Objecthandle 1/2
fweik Jul 23, 2020
e5dc6b2
script_interface: Moved serialization from Context to Objecthandle 2/2
fweik Jul 23, 2020
4f6a688
utils: Factory: Name lookup by dynamic type
fweik Jul 23, 2020
c7a2495
script_interface: Removed per instance stored name from ObjectHandle
fweik Jul 24, 2020
b46b8e0
utils: Factory::stable_name -> type_name
fweik Jul 24, 2020
9ef45a1
Formatting
fweik Jul 24, 2020
e06e247
script_interface: ObjectManager -> ContextManager
fweik Jul 24, 2020
5e7c5c6
script_interface: docstrings
fweik Jul 24, 2020
85f4e38
python: Fixed missing interface decl
fweik Jul 27, 2020
9511aee
script_interface: Docstrings
fweik Jul 27, 2020
31dfba5
script_interface: Improve impl of object_id.
fweik Jul 28, 2020
f3f9923
script_interface: PackedVariant.hpp -> packed_variant.hpp
fweik Jul 28, 2020
9064d69
script_interface: Test for variant packing
fweik Jul 28, 2020
7c130e6
core: Simplify code
jngrad Aug 18, 2020
a088d75
Formatting and style
jngrad Aug 18, 2020
be8215f
core: Update ScriptInterface docstrings
jngrad Aug 18, 2020
554a5d2
core: Add license headers
jngrad Aug 18, 2020
c55b0a4
core: Silence Clang-Tidy warning
jngrad Aug 18, 2020
5d0eeba
core: Document Context infrastructure
jngrad Aug 20, 2020
7d97b38
Merge branch 'python' into script_interface
jngrad Aug 20, 2020
0050aaa
core: Add missing header file
jngrad Aug 20, 2020
3035dab
Merge branch 'python' into script_interface
kodiakhq[bot] Aug 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
script_interface: Map remote objects by reference
fweik committed Jul 27, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit dc175e23b736a0bc18f81eb35e536eb8920d34da
8 changes: 4 additions & 4 deletions src/script_interface/ParallelScriptInterfaceSlave.hpp
Original file line number Diff line number Diff line change
@@ -43,8 +43,8 @@ class ParallelScriptInterfaceSlave {

std::shared_ptr<ScriptInterfaceBase> m_p;

static std::map<ObjectId, ObjectId> &get_translation_table() {
static std::map<ObjectId, ObjectId> m_translation_table;
static auto &get_translation_table() {
static std::map<ObjectId, std::weak_ptr<ScriptInterfaceBase>> m_translation_table;

return m_translation_table;
}
@@ -53,7 +53,7 @@ class ParallelScriptInterfaceSlave {
master id to a local one */
static void translate_id(Variant &v) {
if (is_type<ObjectId>(v)) {
v = get_translation_table().at(boost::get<ObjectId>(v));
v = get_translation_table().at(boost::get<ObjectId>(v)).lock()->id();
}
}

@@ -86,7 +86,7 @@ class ParallelScriptInterfaceSlave {
m_p = ScriptInterfaceBase::make_shared(
what.second, ScriptInterfaceBase::CreationPolicy::LOCAL);

get_translation_table()[what.first] = m_p->id();
get_translation_table()[what.first] = m_p;

break;
}
1 change: 1 addition & 0 deletions src/script_interface/Variant.hpp
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@
namespace ScriptInterface {
class ScriptInterfaceBase;
using ObjectId = Utils::ObjectId<ScriptInterfaceBase>;
using ObjectRef = std::shared_ptr<ScriptInterfaceBase>;
/**
* @brief None-"literal".
*/