Xcos MVC: partial implementation of a model.
[scilab.git] / scilab / modules / scicos / src / cpp / view_scilab / BlockAdapter.hxx
1 /*
2  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  *  Copyright (C) 2014-2014 - Scilab Enterprises - Clement DAVID
4  *
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-en.txt
10  *
11  */
12
13 #ifndef BLOCKADAPTER_HXX_
14 #define BLOCKADAPTER_HXX_
15
16 #include <sstream>
17 #include <string>
18 #include <vector>
19
20 #include "utilities.hxx"
21 #include "BaseAdapter.hxx"
22 #include "model/Block.hxx"
23
24 namespace org_scilab_modules_scicos
25 {
26 namespace view_scilab
27 {
28
29 class BlockAdapter : public BaseAdapter<BlockAdapter, org_scilab_modules_scicos::model::Block>
30 {
31 public:
32     BlockAdapter(const BlockAdapter& o);
33     BlockAdapter(org_scilab_modules_scicos::model::Block* o);
34     BlockAdapter(ScicosID uid, kind_t k);
35     ~BlockAdapter();
36
37     static const std::wstring getSharedTypeStr()
38     {
39         return L"Block";
40     }
41
42     bool toString(std::wostringstream& ostr);
43     std::wstring getTypeStr();
44     std::wstring getShortTypeStr();
45
46     types::InternalType* getDocContent() const;
47     void setDocContent(types::InternalType* v);
48 private:
49     types::InternalType* doc_content;
50 };
51
52 } /* view_scilab */
53 } /* namespace org_scilab_modules_scicos */
54
55 #endif /* BLOCKADAPTER_HXX_ */