Xcos MVC: implement clone / delete on the Model side
[scilab.git] / scilab / modules / scicos / src / cpp / view_scilab / StateAdapter.cpp
index 2277619..ad4184e 100644 (file)
@@ -6,7 +6,7 @@
  *  This source file is licensed as described in the file COPYING, which
  *  you should have received as part of this distribution.  The terms
  *  are also available at
- *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  */
 
@@ -24,16 +24,17 @@ namespace org_scilab_modules_scicos
 {
 namespace view_scilab
 {
+namespace
+{
 
-template<> property<StateAdapter>::props_t property<StateAdapter>::fields = property<StateAdapter>::props_t();
+} /* namespace */
 
-StateAdapter::StateAdapter(const StateAdapter& o) :
-    BaseAdapter<StateAdapter, org_scilab_modules_scicos::model::Diagram>(o) {}
+template<> property<StateAdapter>::props_t property<StateAdapter>::fields = property<StateAdapter>::props_t();
 
-StateAdapter::StateAdapter(org_scilab_modules_scicos::model::Diagram* o) :
-    BaseAdapter<StateAdapter, org_scilab_modules_scicos::model::Diagram>(o)
+StateAdapter::StateAdapter(bool ownAdaptee, org_scilab_modules_scicos::model::Diagram* adaptee) :
+    BaseAdapter<StateAdapter, org_scilab_modules_scicos::model::Diagram>(ownAdaptee, adaptee)
 {
-    if (property<StateAdapter>::properties_has_not_been_set())
+    if (property<StateAdapter>::properties_have_not_been_set())
     {
         // FIXME: add some properties
     }
@@ -43,12 +44,6 @@ StateAdapter::~StateAdapter()
 {
 }
 
-bool StateAdapter::toString(std::wostringstream& ostr)
-{
-    ostr << L"StateAdapter.hxx: Dunno what to display there";
-    return true;
-}
-
 std::wstring StateAdapter::getTypeStr()
 {
     return getSharedTypeStr();
@@ -58,5 +53,5 @@ std::wstring StateAdapter::getShortTypeStr()
     return getSharedTypeStr();
 }
 
-} /* view_scilab */
+} /* namespace view_scilab */
 } /* namespace org_scilab_modules_scicos */