resource.hpp
Go to the documentation of this file.
00001 
00063 #ifndef COB_3D_MAPPING_TOOLS_GUI_RESOURCE_HPP_
00064 #define COB_3D_MAPPING_TOOLS_GUI_RESOURCE_HPP_
00065 
00066 #include "boost/make_shared.hpp"
00067 #include "cob_3d_mapping_tools/gui/resource.h"
00068 
00069 
00070   /* ----------------------------*/
00071  /* --------- Resource ---------*/
00072 /* ----------------------------*/
00073 template<typename RT>
00074 void Gui::Resource<RT>::resourceChanged()
00075 {
00076   for(std::map<std::string, ViewBase*>::iterator it = views_.begin(); it != views_.end(); ++it)
00077   { it->second->onDataChanged(); }
00078 }
00079 
00080 template<typename RT>
00081 template<typename VT>
00082 Gui::View<RT,VT>* Gui::Resource<RT>::createView(const std::string& name, Gui::ViewTypes::View2D)
00083 {
00084   ViewBase* ptr = new ImageView<RT,VT>(name, this);
00085   views_.insert(std::pair<std::string, ViewBase*>(name, ptr));
00086   return static_cast<View<RT, VT>* >(ptr);
00087 }
00088 
00089 template<typename RT>
00090 template<typename VT>
00091 Gui::View<RT,VT>* Gui::Resource<RT>::createView(const std::string& name, Gui::ViewTypes::ViewText)
00092 {
00093   ViewBase* ptr = new TextView<RT,VT>(name, this);
00094   views_.insert(std::pair<std::string, ViewBase*>(name, ptr));
00095   return static_cast<View<RT, VT>* >(ptr);
00096 }
00097 
00098 
00099 
00100 #endif


cob_3d_mapping_tools
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:04:27