MHEG5  18.9.0
MHEG5 Documentation
mh5action.c
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
29 /*---includes for this file--------------------------------------------------*/
30 #include "mh5profile.h"
31 #include "mh5classes.h"
32 #include "mh5memory.h"
33 #include "mh5action.h"
34 #include "mh5object.h"
35 #include "mh5link.h"
36 #include "mh5debug.h"
37 #include <stdlib.h>
38 
39 #if defined(MH5PRINTOUT) || defined(TRACING)
40 #include <string.h>
41 #include "mh5actiontokens.h"
42 #include "mh5eventtokens.h"
43 #endif
44 
45 /*---constant definitions for this file--------------------------------------*/
46 
47 
48 /*---local typedef structs for this file-------------------------------------*/
49 
50 /*---local (static) variable declarations for this file----------------------*/
51 
52 /*---local function definitions----------------------------------------------*/
53 
54 /*---global function definitions---------------------------------------------*/
55 
60 #ifdef MH5PRINTOUT
61 
62 void MHEG5actionPrint(MHEG5ActionList actions, char *out)
63 {
64  MHEG5incIndent();
65  while (actions.total--)
66  {
67  MHEG5indent(out);
68  MHEG_PRINT(out, MHEG5actionToString(actions.a_ptr->type));
69  MHEG_PRINT(out, " ( ");
70  switch (actions.a_ptr->type)
71  {
72  case MHEG5CALL:
73  MHEG5cListPrint(actions.a_ptr->firstParam, out);
74  break;
75 
76  case MHEG5SETDATA:
77  MHEG5sdListPrint(actions.a_ptr->firstParam, out);
78  break;
79 
80  case MHEG5SETVARIABLE:
81  MHEG5gListPrint(actions.a_ptr->firstParam, out, 1);
82  break;
83 
84  case MHEG5SETTEXTCOLOUR:
86  MHEG5clrListPrint(actions.a_ptr->firstParam, out);
87  break;
88 
89  case MHEG5TESTVARIABLE:
90  MHEG5gListPrint(actions.a_ptr->firstParam, out, 2);
91  break;
92 
93  case MHEG5SENDEVENT:
94  MHEG5gListPrint(actions.a_ptr->firstParam, out, 3);
95  break;
96 
97  default:
98  MHEG5gListPrint(actions.a_ptr->firstParam, out, 255);
99  break;
100  }
101  MHEG_PRINT(out, ")");
102  MHEG5newLine(out);
103  actions.a_ptr++;
104  }
105  MHEG5decIndent();
106 }
107 
108 #endif
109 
110 
119 {
120  while (actions.total--)
121  {
122  if (actions.a_ptr->firstParam)
123  {
125  }
126  actions.a_ptr++;
127  }
128 }
129 
Event to String conversion.
MHEG5ElemActionType type
Definition: mh5action.h:195
void MHEG5actionDestruct(MHEG5ActionList actions)
<Function description>="">
Definition: mh5action.c:118
MHEG5GList * firstParam
Definition: mh5action.h:193
void MHEG5gListDestruct(MHEG5GList *item)
Destruct a list of MHEG5Generic objects.
Definition: mh5base.c:933
const char * MHEG5actionToString(MHEG5ElemActionType action)
MHEG5Action * a_ptr
Definition: mh5action.h:201
This file defines the profile for the MHEG engine.
Manage elementary actions Manage a table of all actions and call a specific action which is defined b...
Implement functions to retrieve MHEG5objects by GroupID and ID.
Mheg5 logging and debug printing.
redirection include
action to string conversion
Include all classes.
MHEG5Int total
Definition: mh5action.h:202