34 std::shared_ptr<Element> manage( std::shared_ptr<Element> el );
36 void remove( std::shared_ptr<Element>& el );
38 void link( Element::ElementID rootID, Element::ElementID childID,
int numIn );
39 void unlink( Element::ElementID rootID, Element::ElementID childID );
40 void extlink(
const std::string& name, Element::ElementID childID,
int numIn );
42 void setIn( Element::ElementID ID,
int inNum,
long state );
43 long getOut( Element::ElementID ID );
49 typedef std::unordered_map<Element::ElementID, std::shared_ptr<Element>> ElementMap;
50 typedef std::list<INLink> InternalList;
51 typedef std::list<EXTLink> ExternalList;
52 typedef std::list<EXTOut> OutputsList;
55 typedef ElementMap::const_iterator iterator;
56 inline Schema::iterator begin()
60 inline Schema::iterator end()
74 typedef InternalList::const_iterator INTiterator;
75 inline Schema::INTiterator intBegin()
77 return inLinks.begin();
79 inline Schema::INTiterator intEnd()
85 return inLinks.size();
87 inline bool intEmpty()
89 return inLinks.empty();
93 typedef ExternalList::const_iterator EXTiterator;
94 inline Schema::EXTiterator extBegin()
96 return extLinks.begin();
98 inline Schema::EXTiterator extEnd()
100 return extLinks.end();
104 return extLinks.size();
106 inline bool extEmpty()
108 return extLinks.empty();
112 typedef OutputsList::const_iterator OUTiterator;
113 inline Schema::OUTiterator outBegin()
115 return outList.begin();
117 inline Schema::OUTiterator outEnd()
119 return outList.end();
123 return outList.size();
125 inline bool outEmpty()
127 return outList.empty();
131 std::shared_ptr<Element> find(Element::ElementID
id);
132 std::shared_ptr<Element> findExtLink(
const std::string& name);
133 std::shared_ptr<Element> findOut(
const std::string& name);
140 INLink(std::shared_ptr<Element> f, std::shared_ptr<Element> t,
int ni):
144 std::shared_ptr<Element> from;
145 std::shared_ptr<Element> to;
153 EXTLink(
const std::string& n, std::shared_ptr<Element> t,
int ni):
154 name(n), to(t), numInput(ni) {}
155 EXTLink(): name(
""), numInput(0) {}
158 std::shared_ptr<Element> to;
165 EXTOut(
const std::string& n, std::shared_ptr<Element>& f):
170 std::shared_ptr<Element> from;
175 InternalList inLinks;
176 ExternalList extLinks;