/**
 * @file
 * @ingroup <<<GROUP>>>
 * @brief   <<<BRIEF>>>
 *
 *          This code is Autogenerated from '<<<PYIFGENNAME>>>' with the MIT License.
 *          As such, please only hand-code within 'USER' tags.
 *
 * @author  <<<AUTHOR>>>
 */
#pragma once
#include "basetypes.h"

/// {{{USER_HEADER_INCLUDES}}}
/// {{{USER_HEADER_INCLUDES}}}

#ifdef _DEBUG
//#define _OUT_<<<STATEMACHINENAME>>>_DISP_
#endif

/// {{{USER_FORWARD_DECLARATIONS}}}
/// {{{USER_FORWARD_DECLARATIONS}}}

namespace <<<NAMESPACE>>>
{
    /// {{{USER_LOCALS}}}
    /// {{{USER_LOCALS}}}

    //// Events //////////////////////////////
    namespace <<<STATEMACHINENAME>>>Events
    {
        // Base for events.
        struct EventData {
            virtual ~EventData(){} // For this to be seen as a polymorphic type.
        };

        /// @{ Events
        <<<PER_EVENT_BEGIN>>>
        CGEN_DECL_STRUCT_PTR(<<<EVENTNAME>>>);
        struct <<<EVENTNAME>>> : EventData {
        <<<MEMBERSDECLARE>>>
        };
        <<<PER_EVENT_END>>>
        /// @}
    }

    ////Controller Interface //////////////////
    CGEN_DECL_CLASS_PTR(I<<<STATEMACHINENAME>>>Controller);
    class <<<DLL_EXPORT>>> I<<<STATEMACHINENAME>>>Controller
    {
    public:
        virtual ~I<<<STATEMACHINENAME>>>Controller(){}

        /// @{ Guards
        <<<PER_GUARD_BEGIN>>>
        virtual bool <<<GUARDNAME>>>()
        {
            /// {{{USER_<<<GUARDNAME>>>}}}
            /// {{{USER_<<<GUARDNAME>>>}}}
            std::string info = "I<<<STATEMACHINENAME>>>Controller : Guard >> <<<GUARDNAME>>> : ";
            info.append((m_<<<GUARDNAME>>>) ? ("True") : ("False"));
#ifdef _OUT_<<<STATEMACHINENAME>>>_DISP_
            std::cout <<  info << std::endl;
#endif
            return m_<<<GUARDNAME>>>;
        }
        <<<PER_GUARD_END>>>
        /// @}

        /// @{ State Entry and Exit
        <<<PER_STATE_BEGIN>>>
        virtual void <<<STATENAME>>>_on_entry()
        {
            std::string info = "I<<<STATEMACHINENAME>>>Controller : State Enter >> <<<STATENAME>>> ...";
            /// {{{USER_<<<STATENAME>>>_on_entry}}}
            /// {{{USER_<<<STATENAME>>>_on_entry}}}
#ifdef _OUT_<<<STATEMACHINENAME>>>_DISP_
            std::cout << info << std::endl;
#endif
        }

        virtual void <<<STATENAME>>>_on_exit()
        {
            std::string info = "I<<<STATEMACHINENAME>>>Controller : State Exit >> <<<STATENAME>>> ...";
            /// {{{USER_<<<STATENAME>>>_on_exit}}}
            /// {{{USER_<<<STATENAME>>>_on_exit}}}
#ifdef _OUT_<<<STATEMACHINENAME>>>_DISP_
            std::cout << info << std::endl;
#endif
        }
        <<<PER_STATE_END>>>
        /// @}

        /// @{ Actions
        <<<PER_ACTION_SIGNATURE_BEGIN>>>
        virtual void <<<ACTIONNAME>>>(<<<STATEMACHINENAME>>>Events::<<<EVENTNAME>>> const& data)
        {
            std::string info = "I<<<STATEMACHINENAME>>>Controller : Action >> <<<ACTIONNAME>>> on event <<<EVENTNAME>>> ...";
            /// {{{USER_<<<ACTIONNAME>>>_<<<EVENTNAME>>>}}}
            /// {{{USER_<<<ACTIONNAME>>>_<<<EVENTNAME>>>}}}
#ifdef _OUT_<<<STATEMACHINENAME>>>_DISP_
            std::cout << info << std::endl;
#endif
        };
        <<<PER_ACTION_SIGNATURE_END>>>
        /// @}

        /// {{{USER_PUBLIC_MEMBERS}}}
        /// {{{USER_PUBLIC_MEMBERS}}}

    protected:
        I<<<STATEMACHINENAME>>>Controller()
        {
            <<<PER_GUARD_BEGIN>>>
            m_<<<GUARDNAME>>> = false;
            <<<PER_GUARD_END>>>
            /// {{{USER_CONSTRUCTOR}}}
            /// {{{USER_CONSTRUCTOR}}}
        }

        <<<PER_GUARD_BEGIN>>>
        bool m_<<<GUARDNAME>>>;
        <<<PER_GUARD_END>>>

        /// {{{USER_PROTECTED_MEMBERS}}}
        /// {{{USER_PROTECTED_MEMBERS}}}
    };
}