Minsky
variableInstanceList.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2020
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef VARIABLEINSTANCELIST_H
21 #define VARIABLEINSTANCELIST_H
22 #include "bookmark.h"
23 #include "item.h"
24 
25 #include <string>
26 #include <vector>
27 
30 
31 namespace minsky
32 {
33  class Group;
34 
36  {
38  std::vector<Bookmark> bookmarks;
39  std::vector<ItemPtr> items;
41  public:
45  VariableInstanceList(Group& model, const std::string& valueId);
47  void gotoInstance(std::size_t);
49  std::vector<std::string> names() const {
50  std::vector<std::string> r;
51  for (auto& b: bookmarks) r.push_back(b.name);
52  return r;
53  }
54  };
55 }
56 
57 #include "variableInstanceList.cd"
58 #endif
void gotoInstance(std::size_t)
zoom model to instance number in the list
string valueId(const string &name)
construct a valueId from fully qualified name @ name should not be canonicalised
Definition: valueId.cc:75
std::vector< std::string > names() const
return the list of names
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky&#39;s state cha...
Definition: constMap.h:22
std::vector< ItemPtr > items
std::vector< Bookmark > bookmarks
CLASSDESC_ACCESS(VariableInstanceList)