Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUICommandResource.h
Go to the documentation of this file.
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUI_COMMAND_RESOURCE__H_
11#define GUI_COMMAND_RESOURCE__H_
12#include "eC_Types.h"
13#include <limits.h>
14
16//
17// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
18// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
19// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
20//
21
22// -----------------------------------------------------------------------------------------
24
25//Add Guiliani-CommandClassID_t here (with negative IDs, DUMMY_COMMAND has to stay 0, see COMMAND_START_TAG below)
26// always add new commands as the first entry!!
27#define COMMAND_TABLE \
28ENTRY(CMD_SETDATAPOOL, CGUISetDataPoolCmd) \
29ENTRY(CMD_STOP_ANIMATIONCHAIN, CGUIStopAnimationChainCmd) \
30ENTRY(CMD_CALLAPI, CGUICallAPICmd) \
31ENTRY(CMD_DELAY, CGUIDelayCmd) \
32ENTRY(CMD_SETOBJECTVISUALS, CGUISetObjectVisualsCmd) \
33ENTRY(CMD_SWITCH_RESOURCESETS, CGUISwitchResourceSetsCmd) \
34ENTRY(CMD_START_ANIMATIONCHAIN, CGUIStartAnimationChainCmd) \
35ENTRY(CMD_LOAD_ANIMATIONS, CGUILoadAnimationsCmd) \
36ENTRY(CMD_SETOBJECTSTATE, CGUISetObjectStateCmd) \
37ENTRY(CMD_DIALOG_TRANSITION, CGUITransitionCmd) \
38ENTRY(CMD_PLAYBACK_SOUND, CGUIPlaybackSoundCmd) \
39ENTRY(CMD_LOAD_DIALOG, CGUILoadDialogCmd) \
40ENTRY(CMD_QUIT, CGUIQuitCmd)
41
42// Calculate the value for the START_TAG used in th enum definition below.
43#define ENTRY_ENUM(a) -1
44#define ENTRY(cmd, cmdclass) -1
46#undef ENTRY
47#undef ENTRY_ENUM
48
51{
52 COMMAND_START_TAG = ciCalculatedCmdStartTag - 1, // we left out DUMMY_COMMAND
53 #define ENTRY_ENUM(a) a,
54 #define ENTRY(cmd_id, cmd_classname) cmd_id,
56
57 DUMMY_COMMAND,
58#undef ENTRY
59#undef ENTRY_ENUM
60 NOF_COMMANDCLASSES,
61 GUILIANI_INTERNAL_CMD = INT_MAX // Do not touch this. Required for ensuring consistent enum type size across libraries.
62};
63
64// Check if the DUMMY value is always 0. If not compile error!
65typedef int static_assert_something[(DUMMY_COMMAND == 0) ? 1 : -1];
66
67extern const eC_UInt cuiNOFCommandClasses;
68#endif
CommandClassID_t
List of command class ids.
Definition: GUICommandResource.h:51
const eC_UInt cuiNOFCommandClasses
Used to contain the highest index cuiNOFXXXClasses = MAP_PROPID_TO_ARRAY(NOF_XXXCLASSES);.
Definition: GUIConfig.cpp:71
int static_assert_something[(DUMMY_COMMAND==0) ? 1 :-1]
Will throw compile error negative subscript if DUMMY_COMMAND is NOT 0!
Definition: GUICommandResource.h:65
const int ciCalculatedCmdStartTag
preprocessor generates for all entries of SOUND_TABLE: -1 -1 -1..., resulting in a mathematical expre...
Definition: GUICommandResource.h:45
#define COMMAND_TABLE
CommandClassIDs.
Definition: GUICommandResource.h:27