/** @file common/TCL/tcl_container.h @author Petr Wolf */ #ifndef COMMON_TCL_TCL_CONTAINER #define COMMON_TCL_TCL_CONTAINER #include "common/TCL/tcl_script.h" template class TTCL_Container : public std::map { public: /** Zapis dat do prostredi TCL interpretu. @param interpreter interpret jazyka TCL @param name nazev promenne odpovidajici seznamu */ void writeToTCL(TTCL_Interpreter & interpreter, const char * name); }; template void TTCL_Container::writeToTCL(TTCL_Interpreter & interpreter, const char * name) { typename TTCL_Container::iterator i; char itemName[MAX_STRLEN]; for (i = this->begin(); i != this->end(); i++) { sprintf(itemName, "%s(%d)", name, i->first); i->second->writeToTCL(interpreter, itemName); } } #endif