steering-wheel/TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp

104 lines
4.0 KiB
C++

/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef FRONTENDHEAPBASE_HPP
#define FRONTENDHEAPBASE_HPP
#include <common/Meta.hpp>
#include <common/Partition.hpp>
#include <mvp/MVPHeap.hpp>
#include <touchgfx/transitions/NoTransition.hpp>
#include <gui/common/FrontendApplication.hpp>
#include <gui/model/Model.hpp>
#include <gui/missionselect_screen/MissionSelectView.hpp>
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
#include <gui/ami_screen/AMIView.hpp>
#include <gui/ami_screen/AMIPresenter.hpp>
#include <gui/driverview_screen/DriverViewView.hpp>
#include <gui/driverview_screen/DriverViewPresenter.hpp>
#include <gui/debugview_screen/DebugViewView.hpp>
#include <gui/debugview_screen/DebugViewPresenter.hpp>
#include <gui/vehicleconfig_screen/VehicleConfigView.hpp>
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
/**
* This class provides the memory that shall be used for memory allocations
* in the frontend. A single instance of the FrontendHeap is allocated once (in heap
* memory), and all other frontend objects such as views, presenters and data model are
* allocated within the scope of this FrontendHeap. As such, the RAM usage of the entire
* user interface is sizeof(FrontendHeap).
*
* @note The FrontendHeap reserves memory for the most memory-consuming presenter and
* view only. The largest of these classes are determined at compile-time using template
* magic. As such, it is important to add all presenters, views and transitions to the
* type lists in this class.
*
*/
class FrontendHeapBase : public touchgfx::MVPHeap
{
public:
/**
* A list of all view types. Must end with meta::Nil.
* @note All view types used in the application MUST be added to this list!
*/
typedef touchgfx::meta::TypeList< MissionSelectView,
touchgfx::meta::TypeList< AMIView,
touchgfx::meta::TypeList< DriverViewView,
touchgfx::meta::TypeList< DebugViewView,
touchgfx::meta::TypeList< VehicleConfigView,
touchgfx::meta::Nil > > > >
> GeneratedViewTypes;
/**
* Determine (compile time) the View type of largest size.
*/
typedef touchgfx::meta::select_type_maxsize< GeneratedViewTypes >::type MaxGeneratedViewType;
/**
* A list of all presenter types. Must end with meta::Nil.
* @note All presenter types used in the application MUST be added to this list!
*/
typedef touchgfx::meta::TypeList< MissionSelectPresenter,
touchgfx::meta::TypeList< AMIPresenter,
touchgfx::meta::TypeList< DriverViewPresenter,
touchgfx::meta::TypeList< DebugViewPresenter,
touchgfx::meta::TypeList< VehicleConfigPresenter,
touchgfx::meta::Nil > > > >
> GeneratedPresenterTypes;
/**
* Determine (compile time) the Presenter type of largest size.
*/
typedef touchgfx::meta::select_type_maxsize< GeneratedPresenterTypes >::type MaxGeneratedPresenterType;
/**
* A list of all transition types. Must end with meta::Nil.
* @note All transition types used in the application MUST be added to this list!
*/
typedef touchgfx::meta::TypeList< touchgfx::NoTransition,
touchgfx::meta::Nil
> GeneratedTransitionTypes;
/**
* Determine (compile time) the Transition type of largest size.
*/
typedef touchgfx::meta::select_type_maxsize< GeneratedTransitionTypes >::type MaxGeneratedTransitionType;
virtual void gotoStartScreen(FrontendApplication& app)
{
app.gotoMissionSelectScreenNoTransition();
}
protected:
FrontendHeapBase(touchgfx::AbstractPartition& presenters, touchgfx::AbstractPartition& views, touchgfx::AbstractPartition& transitions, FrontendApplication& app)
: MVPHeap(presenters, views, transitions, app)
{
}
};
#endif // FRONTENDHEAPBASE_HPP