2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2014-2014 - Scilab Enterprises - Clement DAVID
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
16 #include "internal.hxx"
20 #include "Controller.hxx"
21 #include "CprAdapter.hxx"
23 namespace org_scilab_modules_scicos
33 static types::InternalType* get(const CprAdapter& /*adaptor*/, const Controller& /*controller*/)
35 // Return a default empty matrix.
36 return types::Double::Empty();
39 static bool set(CprAdapter& /*adaptor*/, types::InternalType* /*v*/, Controller& /*controller*/)
41 // Everything should be right as the properties mapped using this adapter do not perform anything
48 template<> property<CprAdapter>::props_t property<CprAdapter>::fields = property<CprAdapter>::props_t();
50 CprAdapter::CprAdapter(std::shared_ptr<org_scilab_modules_scicos::model::Diagram> adaptee) :
51 BaseAdapter<CprAdapter, org_scilab_modules_scicos::model::Diagram>(adaptee)
53 if (property<CprAdapter>::properties_have_not_been_set())
55 property<CprAdapter>::fields.reserve(4);
56 property<CprAdapter>::add_property(L"state", &dummy_property::get, &dummy_property::set);
57 property<CprAdapter>::add_property(L"sim", &dummy_property::get, &dummy_property::set);
58 property<CprAdapter>::add_property(L"cor", &dummy_property::get, &dummy_property::set);
59 property<CprAdapter>::add_property(L"corinv", &dummy_property::get, &dummy_property::set);
63 CprAdapter::CprAdapter(const CprAdapter& adapter) :
64 BaseAdapter<CprAdapter, org_scilab_modules_scicos::model::Diagram>(adapter)
68 CprAdapter::~CprAdapter()
72 std::wstring CprAdapter::getTypeStr()
74 return getSharedTypeStr();
76 std::wstring CprAdapter::getShortTypeStr()
78 return getSharedTypeStr();
81 } /* namespace view_scilab */
82 } /* namespace org_scilab_modules_scicos */