29 struct StateRegistry::Impl {
33 typedef std::map<std::string, StatePtr> States;
38 const Impl&) =
delete;
40 const Impl&) =
delete;
47 StateRegistry::Impl::Impl(
48 StateRegistry* owner_) :
54 StateRegistry::Impl::~Impl() {
59 pimpl(new Impl(this)) {
68 const std::string& name_,
70 assert(!name_.empty() && state_ !=
nullptr);
71 pimpl->states.insert(Impl::States::value_type(name_, state_));
75 const std::string& name_)
const {
76 assert(!name_.empty());
77 auto iter_(pimpl->states.find(name_));
78 if(iter_ != pimpl->states.end())
79 return (*iter_).second;