Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "FSMConstructor.h"
00010 #include "BTConstructor.h"
00011
00012
00013 namespace fsm_constructor{
00014
00015 std::string FSMConstructor::copy(std::string name)const{
00016 std::stringstream s; s<<fsms.at(name); return s.str();
00017 }
00018
00019 void FSMConstructor::saveXml(std::ostream& out, std::string tab, std::string name, std::string id)const{
00020 const Fsm& fsm = fsms.at(name);
00021 fsm.lib = this;
00022 fsm.tab = tab;
00023 fsm.id = id;
00024 fsm_constructor::saveXml(out, fsm);
00025 }
00026
00027 void FSMConstructor::saveDot(std::ostream& out, std::string tab, std::string name, std::string id)const{
00028 const Fsm& fsm = fsms.at(name);
00029 fsm.lib = this;
00030 fsm.tab = tab;
00031 fsm.id = id;
00032 fsm_constructor::saveDot(out, fsm);
00033 }
00034
00035 void FSMConstructor::map_ids(std::string name, std::string id)const{
00036 const Fsm& fsm = fsms.at(name);
00037 fsm.lib = this;
00038 fsm.id = id;
00039 fsm_constructor::map_ids(fsm);
00040 }
00041
00042 }
00043
00044
00045 namespace bt_constructor{
00046
00047 std::string BTConstructor::copy(std::string name)const{
00048 std::stringstream s; s<<trees.at(name); return s.str();
00049 }
00050
00051 void BTConstructor::saveXml(std::ostream& out, std::string tab, std::string name, std::string id)const{
00052 const Tree& node = trees.at(name);
00053 node.lib = this;
00054 node.tab = tab;
00055 node.id =id;
00056 bt_constructor::saveXml(out, node);
00057 }
00058
00059 void BTConstructor::saveDot(std::ostream& out, std::string tab, std::string name, std::string id)const{
00060 const Tree& node = trees.at(name);
00061 node.lib = this;
00062 node.tab = tab;
00063 node.id =id;
00064 bt_constructor::saveDot(out, node);
00065 }
00066
00067 void BTConstructor::map_ids(std::string name, std::string id)const{
00068 const Tree& node = trees.at(name);
00069 node.lib = this;
00070 node.id=id;
00071 bt_constructor::map_ids(node);
00072 }
00073
00074 std::string BTConstructor::search_simple_node(std::string name)const{
00075 return fsm_constructor::searchSimpleState(this->fsms, name);
00076 }
00077
00078 }