2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2014-2016 - Scilab Enterprises - Clement DAVID
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
9 * This file was originally licensed under the terms of the CeCILL v2.1,
10 * and continues to be available under such terms.
11 * For more information, see the COPYING file which you should have received
12 * along with this program.
16 #ifndef LINKADAPTER_HXX_
17 #define LINKADAPTER_HXX_
22 #include "adapters_utilities.hxx"
23 #include "BaseAdapter.hxx"
24 #include "model/Link.hxx"
25 #include "model/Block.hxx"
27 namespace org_scilab_modules_scicos
32 class LinkAdapter final : public BaseAdapter<LinkAdapter, org_scilab_modules_scicos::model::Link>
35 LinkAdapter(const Controller& c, org_scilab_modules_scicos::model::Link* adaptee);
36 LinkAdapter(const LinkAdapter& adapter);
39 static const std::wstring getSharedTypeStr()
44 std::wstring getTypeStr() const override;
45 std::wstring getShortTypeStr() const override;
47 // move (if possible) the partial informations to the model
48 static void relink(Controller& controller, model::Link* adaptee, const std::vector<ScicosID>& children);
49 static void reverse_relink(Controller& controller, model::Block* adaptee, int index, const std::vector<ScicosID>& children);
50 // manage partial information after a model clone
51 static void add_partial_links_information(Controller& controller, ScicosID original, ScicosID cloned);
52 // manage partial information before a model delete
53 static void store_partial_links_information(Controller& controller, model::BaseObject* added, int index, const std::vector<ScicosID>& children);
54 // remove all information related to the link
55 static void remove_partial_links_information(ScicosID uid);
58 } /* namespace view_scilab */
59 } /* namespace org_scilab_modules_scicos */
61 #endif /* LINKADAPTER_HXX_ */