Xcos MVC: use shared_ptr on the Model 16/15416/6
authorClément DAVID <clement.david@scilab-enterprises.com>
Fri, 24 Oct 2014 09:36:39 +0000 (11:36 +0200)
committerClément DAVID <clement.david@scilab-enterprises.com>
Wed, 29 Oct 2014 16:48:53 +0000 (17:48 +0100)
commit28e6d04094a61b504baa855da940e34e36573661
tree6b6d1db417980e7a3f0d182f7f98d1a2ca9cb4b3
parentff408c4d127d7ba4faabdd35b63b3b805980c21e
Xcos MVC: use shared_ptr on the Model

Model object pointers can be retrieve by any C++ View through
Model::getObject. To track the associated memory and avoid double
delete (on the View then the Model), shared_ptr is used.

Note: this pointer access is not mapped to Java Views so these views
are just allowed to createObject / deleteObject using ScicosID.

Change-Id: Ifbab7d1bfda28105c3680bd28f52c9e35faf1824
38 files changed:
scilab/modules/ast/includes/types/arrayof.hxx
scilab/modules/ast/includes/types/internal.hxx
scilab/modules/scicos/includes/Controller.hxx
scilab/modules/scicos/includes/Model.hxx
scilab/modules/scicos/includes/utilities.hxx
scilab/modules/scicos/sci_gateway/cpp/sci_scicos_new.cpp
scilab/modules/scicos/src/cpp/Controller.cpp
scilab/modules/scicos/src/cpp/Model.cpp
scilab/modules/scicos/src/cpp/Model_getObjectProperties.cpp
scilab/modules/scicos/src/cpp/Model_setObjectProperties.cpp
scilab/modules/scicos/src/cpp/model/Annotation.hxx
scilab/modules/scicos/src/cpp/model/Block.hxx
scilab/modules/scicos/src/cpp/model/Diagram.hxx
scilab/modules/scicos/src/cpp/model/Link.hxx
scilab/modules/scicos/src/cpp/model/Port.hxx
scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/ports_management.hxx
scilab/modules/xcos/src/jni/JavaController.i