From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sage Weil Subject: Re: Ask help for boost::statechart in PG Date: Sat, 30 Aug 2014 09:14:52 -0700 (PDT) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from cobra.newdream.net ([66.33.216.30]:44201 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689AbaH3QOw (ORCPT ); Sat, 30 Aug 2014 12:14:52 -0400 In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: star fan Cc: Ceph-devel , Loic Dachary On Sat, 30 Aug 2014, star fan wrote: > I ask the question because I am not good at boost::statechart and I > can't get answer from other way. > > To help me to good understand the PG statechart, I hope someone answer > below questions: > In Initial state, > 1. why there is not react function for custom_reaction< NullEvt > > 2. why there is not custom_reaction definition about > boost::statechart::result react(const MNotifyRec&); One thing to keep in mind is that the states form a hierarchy. If a state doesn't explicitly handle/react to an event, the parent will. You'll notice that Reset and Started both react to NullEvt, and the other states are substates/children of those. sage