summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/client/ModelEngineInterface.cpp8
-rw-r--r--src/libs/client/ModelEngineInterface.h4
-rw-r--r--src/libs/client/NodeModel.cpp3
-rw-r--r--src/libs/client/PatchLibrarian.cpp6
4 files changed, 14 insertions, 7 deletions
diff --git a/src/libs/client/ModelEngineInterface.cpp b/src/libs/client/ModelEngineInterface.cpp
index 3add8854..40de205c 100644
--- a/src/libs/client/ModelEngineInterface.cpp
+++ b/src/libs/client/ModelEngineInterface.cpp
@@ -56,14 +56,14 @@ ModelEngineInterface::create_node_with_data(const string& plugin_uri,
/** Create a patch.
*/
void
-ModelEngineInterface::create_patch_from_model(const PatchModel* pm)
+ModelEngineInterface::create_patch_with_data(const Path& path, size_t poly, const MetadataMap& data)
{
- create_patch(pm->path().c_str(), pm->poly());
- set_metadata_map(pm->path(), pm->metadata());
+ create_patch(path, poly);
+ set_metadata_map(path, data);
}
-/** Set all pieces of metadata in a model.
+/** Set all pieces of metadata in a map.
*/
void
ModelEngineInterface::set_metadata_map(const Path& subject, const MetadataMap& data)
diff --git a/src/libs/client/ModelEngineInterface.h b/src/libs/client/ModelEngineInterface.h
index 7bc65d1a..e97947a3 100644
--- a/src/libs/client/ModelEngineInterface.h
+++ b/src/libs/client/ModelEngineInterface.h
@@ -44,7 +44,9 @@ class ModelEngineInterface : public virtual Shared::EngineInterface
public:
virtual ~ModelEngineInterface() {}
- virtual void create_patch_from_model(const PatchModel* pm);
+ virtual void create_patch_with_data(const Path& path,
+ size_t poly,
+ const MetadataMap& initial_data);
virtual void create_node_with_data(const string& plugin_uri,
const Path& path,
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index cb46bafc..c5e399d2 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -122,6 +122,9 @@ NodeModel::add_port(CountedPtr<PortModel> pm)
// Store should have handled this by merging the two
assert(existing == m_ports.end());
+
+ m_ports.push_back(pm);
+ new_port_sig.emit(pm);
}
diff --git a/src/libs/client/PatchLibrarian.cpp b/src/libs/client/PatchLibrarian.cpp
index 9fc70ee7..ebc33f36 100644
--- a/src/libs/client/PatchLibrarian.cpp
+++ b/src/libs/client/PatchLibrarian.cpp
@@ -479,7 +479,8 @@ PatchLibrarian::load_patch(CountedPtr<PatchModel> pm, bool wait, bool existing)
if (wait) {
//int id = _engine->get_next_request_id();
//_engine->set_wait_response_id(id);
- _engine->create_patch_from_model(pm.get());
+ cerr << "FIXME: create patch\n";
+ //_engine->create_patch_from_model(pm.get());
//bool succeeded = _engine->wait_for_response();
// If creating the patch failed, bail out so we don't load all these nodes
@@ -489,7 +490,8 @@ PatchLibrarian::load_patch(CountedPtr<PatchModel> pm, bool wait, bool existing)
return "";
}*/ // FIXME
} else {
- _engine->create_patch_from_model(pm.get());
+ cerr << "FIXME: create patch (2)\n";
+ //_engine->create_patch_from_model(pm.get());
}
}