MythTV master
BaseClasses.cpp
Go to the documentation of this file.
1/* BaseClasses.cpp
2
3 Copyright (C) David C. J. Matthews 2004 dm at prolingua.co.uk
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 Or, point your browser to http://www.gnu.org/copyleft/gpl.html
19
20*/
21
22#include "BaseClasses.h"
23
24#include <algorithm>
25
26#include "ParseNode.h"
27#include "Engine.h"
28#include "ASN1Codes.h"
29#include "Logging.h"
30
31#ifdef _DEBUG
32#undef THIS_FILE
33static char THIS_FILE[] = __FILE__;
34#define new DEBUG_NEW
35#endif
36
37// Construct from a string
38MHOctetString::MHOctetString(const char *str, int nLen)
39{
40 if (nLen < 0)
41 {
42 nLen = strlen(str);
43 }
44
45 // Add a NUL terminator just past the end of the string for
46 // consistency with the prior version of the constructor.
47 m_pChars.reserve(nLen+1);
48 m_pChars.assign(str, str + nLen);
49 m_pChars.push_back(0);
50 m_pChars.pop_back();
51}
52
53MHOctetString::MHOctetString(const unsigned char *str, int nLen)
54{
55 // Add a NUL terminator just past the end of the string for
56 // consistency with the prior version of the constructor. This
57 // allows it to be referenced as a C string. If std::string could
58 // be used it would handle the termination, but std::string
59 // doesn't support 'unsigned char'.
60 m_pChars.reserve(nLen+1);
61 m_pChars.assign(str, str + nLen);
62 m_pChars.push_back(0);
63 m_pChars.pop_back();
64}
65
66// Construct a substring.
67MHOctetString::MHOctetString(const MHOctetString &str, int nOffset, int nLen)
68{
69 if (nLen < 0)
70 {
71 nLen = str.Size() - nOffset; // The rest of the string.
72 }
73 nLen = std::clamp(nLen, 0, str.Size());
74
75 // Add a NUL terminator just past the end of the string for
76 // consistency with the prior version of the constructor.
77 m_pChars.reserve(nLen+1);
78 m_pChars.assign(str.m_pChars.data() + nOffset,
79 str.m_pChars.data() + nOffset + nLen);
80 m_pChars.push_back(0);
81 m_pChars.pop_back();
82}
83
84// Copy a string
86{
87 if (this == &str)
88 return;
89
90 m_pChars = str.m_pChars;
91 m_pChars.push_back(0);
92 m_pChars.pop_back();
93}
94
95// Print the string in a suitable format.
96// For the moment it uses quoted printable.
97void MHOctetString::PrintMe(FILE *fd, int /*nTabs*/) const
98{
99 putc('\'', fd);
100
101 for (const uint8_t ch : as_const(m_pChars))
102 {
103 // Escape a non-printable character or an equal sign or a quote.
104 if (ch == '=' || ch == '\'' || ch < ' ' || ch >= 127)
105 {
106 fprintf(fd, "=%02X", ch);
107 }
108 else
109 {
110 putc(ch, fd);
111 }
112 }
113
114 putc('\'', fd);
115}
116
117// Test strings.
119{
120 int nLength = std::min(Size(), str.Size());
121
122 // Test up to the length of the shorter string.
123 int nTest = 0;
124
125 if (nLength > 0)
126 {
127 nTest = memcmp(str.m_pChars.data(), m_pChars.data(), nLength);
128 }
129
130 // If they differ return the result
131 if (nTest != 0)
132 {
133 return nTest;
134 }
135
136 // If they are the same then the longer string is greater.
137 if (m_pChars.size() == str.m_pChars.size())
138 {
139 return 0;
140 }
141 if (m_pChars.size() < str.m_pChars.size())
142 {
143 return -1;
144 }
145 return 1;
146}
147
148// Add text to the end of the string.
150{
151 if (str.m_pChars.empty())
152 {
153 return; // Nothing to do and it simplifies the code
154 }
155
156#ifdef __cpp_lib_containers_ranges
157 m_pChars.append_range(str.m_pChars);
158#else
159 m_pChars.insert(m_pChars.end(), str.m_pChars.cbegin(), str.m_pChars.cend());
160#endif
161}
162
163// Colour
165{
166 if (p->m_nNodeType == MHParseNode::PNInt)
167 {
168 m_nColIndex = p->GetIntValue();
169 }
170 else
171 {
172 p->GetStringValue(m_colStr);
173 }
174}
175
176void MHColour::PrintMe(FILE *fd, int nTabs) const
177{
178 if (m_nColIndex >= 0)
179 {
180 fprintf(fd, " %d ", m_nColIndex);
181 }
182 else
183 {
184 m_colStr.PrintMe(fd, nTabs);
185 }
186}
187
188void MHColour::SetFromString(const char *str, int nLen)
189{
190 m_nColIndex = -1;
191 m_colStr.Copy(MHOctetString(str, nLen));
192}
193
194void MHColour::Copy(const MHColour &col)
195{
198}
199
200// An object reference is used to identify and refer to an object.
201// Internal objects have the m_groupId field empty.
202
203MHObjectRef MHObjectRef::Null; // This has zero for the object number and an empty group id.
204
205// An object reference is either an integer or a pair of a group id and an integer.
207{
208 if (p->m_nNodeType == MHParseNode::PNInt)
209 {
210 m_nObjectNo = p->GetIntValue();
211 // Set the group id to the id of this group.
212 m_groupId.Copy(engine->GetGroupId());
213 }
214 else if (p->m_nNodeType == MHParseNode::PNSeq)
215 {
216 MHParseNode *pFirst = p->GetSeqN(0);
217 MHOctetString groupId;
218 pFirst->GetStringValue(m_groupId);
219 m_nObjectNo = p->GetSeqN(1)->GetIntValue();
220 }
221 else
222 {
223 MHParseNode::Failure("ObjectRef: Argument is not int or sequence");
224 }
225}
226
227void MHObjectRef::PrintMe(FILE *fd, int nTabs) const
228{
229 if (m_groupId.Size() == 0)
230 {
231 fprintf(fd, " %d ", m_nObjectNo);
232 }
233 else
234 {
235 fprintf(fd, " ( ");
236 m_groupId.PrintMe(fd, nTabs);
237 fprintf(fd, " %d ) ", m_nObjectNo);
238 }
239}
240
242{
243 if (m_groupId.Size() == 0)
244 {
245 return QString(" %1 ").arg(m_nObjectNo);
246 }
247 return QString(" ( ") + m_groupId.Printable() + QString(" %1 ").arg(m_nObjectNo);
248}
249
250// Make a copy of an object reference.
252{
255}
256
257// The object references may not be identical but may nevertheless refer to the same
258// object. The only safe way to do this is to compare the canonical paths.
259bool MHObjectRef::Equal(const MHObjectRef &objr, MHEngine *engine) const
260{
261 return m_nObjectNo == objr.m_nObjectNo && engine->GetPathName(m_groupId) == engine->GetPathName(objr.m_groupId);
262}
263
264bool MHContentRef::Equal(const MHContentRef &cr, MHEngine *engine) const
265{
266 return engine->GetPathName(m_contentRef) == engine->GetPathName(cr.m_contentRef);
267}
268
269// "Generic" versions of int, bool etc can be either the value or the an indirect reference.
270
272{
274 {
275 // Indirect reference.
276 m_fIsDirect = false;
277 m_indirect.Initialise(pArg->GetArgN(0), engine);
278 }
279 else // Simple integer value.
280 {
281 m_fIsDirect = true;
282 m_fDirect = pArg->GetBoolValue();
283 }
284}
285
286void MHGenericBoolean::PrintMe(FILE *fd, int nTabs) const
287{
288 if (m_fIsDirect)
289 {
290 fprintf(fd, "%s ", m_fDirect ? "true" : "false");
291 }
292 else
293 {
294 fprintf(fd, ":IndirectRef ");
295 m_indirect.PrintMe(fd, nTabs + 1);
296 }
297}
298
299// Return the value, looking up any indirect ref.
301{
302 if (m_fIsDirect)
303 {
304 return m_fDirect;
305 }
306
307 MHUnion result;
308 MHRoot *pBase = engine->FindObject(m_indirect);
309 pBase->GetVariableValue(result, engine);
311 return result.m_fBoolVal;
312}
313
314// Return the indirect reference or fail if it's direct
316{
317 if (m_fIsDirect)
318 {
319 MHERROR("Expected indirect reference");
320 }
321
322 return &m_indirect;
323}
324
326{
328 {
329 // Indirect reference.
330 m_fIsDirect = false;
331 m_indirect.Initialise(pArg->GetArgN(0), engine);
332 }
333 else // Simple integer value.
334 {
335 m_fIsDirect = true;
336 m_nDirect = pArg->GetIntValue();
337 }
338}
339
340void MHGenericInteger::PrintMe(FILE *fd, int nTabs) const
341{
342 if (m_fIsDirect)
343 {
344 fprintf(fd, "%d ", m_nDirect);
345 }
346 else
347 {
348 fprintf(fd, ":IndirectRef ");
349 m_indirect.PrintMe(fd, nTabs + 1);
350 }
351}
352
353// Return the value, looking up any indirect ref.
355{
356 if (m_fIsDirect)
357 {
358 return m_nDirect;
359 }
360
361 MHUnion result;
362 MHRoot *pBase = engine->FindObject(m_indirect);
363 pBase->GetVariableValue(result, engine);
364
365 // From my reading of the MHEG documents implicit conversion is only
366 // performed when assigning variables. Nevertheless the Channel 4
367 // Teletext assumes that implicit conversion takes place here as well.
368 if (result.m_Type == MHUnion::U_String)
369 {
370 // Implicit conversion of string to integer.
371 int v = 0;
372 int p = 0;
373 bool fNegative = false;
374
375 if (result.m_strVal.Size() > 0 && result.m_strVal.GetAt(0) == '-')
376 {
377 p++;
378 fNegative = true;
379 }
380
381 for (; p < result.m_strVal.Size(); p++)
382 {
383 unsigned char ch = result.m_strVal.GetAt(p);
384
385 if (ch < '0' || ch > '9')
386 {
387 break;
388 }
389
390 v = (v * 10) + ch - '0';
391 }
392
393 if (fNegative)
394 {
395 return -v;
396 }
397 return v;
398 }
399
401 return result.m_nIntVal;
402}
403
405{
407 {
408 // Indirect reference.
409 m_fIsDirect = false;
410 m_indirect.Initialise(pArg->GetArgN(0), engine);
411 }
412 else // Simple string value.
413 {
414 m_fIsDirect = true;
416 }
417}
418
419void MHGenericOctetString::PrintMe(FILE *fd, int /*nTabs*/) const
420{
421 if (m_fIsDirect)
422 {
423 m_direct.PrintMe(fd, 0);
424 }
425 else
426 {
427 fprintf(fd, ":IndirectRef ");
428 m_indirect.PrintMe(fd, 0);
429 }
430}
431
432// Return the value, looking up any indirect ref.
434{
435 if (m_fIsDirect)
436 {
437 str.Copy(m_direct);
438 }
439 else
440 {
441 MHUnion result;
442 MHRoot *pBase = engine->FindObject(m_indirect);
443 pBase->GetVariableValue(result, engine);
444
445 // From my reading of the MHEG documents implicit conversion is only
446 // performed when assigning variables. Nevertheless the Channel 4
447 // Teletext assumes that implicit conversion takes place here as well.
448 if (result.m_Type == MHUnion::U_Int)
449 {
450 // Implicit conversion of int to string.
451 str.Copy(std::to_string(result.m_nIntVal).data());
452 }
453 else
454 {
456 str.Copy(result.m_strVal);
457 }
458 }
459}
460
462{
464 {
465 // Indirect reference.
466 m_fIsDirect = false;
467 m_indirect.Initialise(pArg->GetArgN(0), engine);
468 }
469 else // Direct reference.
470 {
471 m_fIsDirect = true;
472 m_objRef.Initialise(pArg, engine);
473 }
474}
475
476void MHGenericObjectRef::PrintMe(FILE *fd, int nTabs) const
477{
478 if (m_fIsDirect)
479 {
480 m_objRef.PrintMe(fd, nTabs + 1);
481 }
482 else
483 {
484 fprintf(fd, ":IndirectRef ");
485 m_indirect.PrintMe(fd, nTabs + 1);
486 }
487}
488
489// Return the value, looking up any indirect ref.
491{
492 if (m_fIsDirect)
493 {
494 ref.Copy(m_objRef);
495 }
496 else
497 {
498 // LVR - Hmm I don't think this is right. Should be: ref.Copy(m_indirect);
499 // But it's used in several places so workaround in Stream::MHActionGenericObjectRefFix
500 MHUnion result;
501 MHRoot *pBase = engine->FindObject(m_indirect);
502 pBase->GetVariableValue(result, engine);
504 ref.Copy(result.m_objRefVal);
505 }
506}
507
509{
510 if (pArg->GetTagNo() == C_INDIRECTREFERENCE)
511 {
512 // Indirect reference.
513 m_fIsDirect = false;
514 m_indirect.Initialise(pArg->GetArgN(0), engine);
515 }
516 else if (pArg->GetTagNo() == C_CONTENT_REFERENCE) // Direct reference.
517 {
518 m_fIsDirect = true;
519 m_direct.Initialise(pArg->GetArgN(0), engine);
520 }
521 else
522 {
523 MHERROR("Expected direct or indirect content reference");
524 }
525}
526
527void MHGenericContentRef::PrintMe(FILE *fd, int /*nTabs*/) const
528{
529 if (m_fIsDirect)
530 {
531 m_direct.PrintMe(fd, 0);
532 }
533 else
534 {
535 fprintf(fd, ":IndirectRef ");
536 m_indirect.PrintMe(fd, 0);
537 }
538}
539
540// Return the value, looking up any indirect ref.
542{
543 if (m_fIsDirect)
544 {
545 ref.Copy(m_direct);
546 }
547 else
548 {
549 MHUnion result;
550 MHRoot *pBase = engine->FindObject(m_indirect);
551 pBase->GetVariableValue(result, engine);
553 ref.Copy(result.m_contentRefVal);
554 }
555}
556
557// Copies the argument, getting the value of an indirect args.
558void MHUnion::GetValueFrom(const MHParameter &value, MHEngine *engine)
559{
560 switch (value.m_Type)
561 {
563 m_Type = U_Int;
564 m_nIntVal = value.m_intVal.GetValue(engine);
565 break;
567 m_Type = U_Bool;
568 m_fBoolVal = value.m_boolVal.GetValue(engine);
569 break;
571 m_Type = U_String;
572 value.m_strVal.GetValue(m_strVal, engine);
573 break;
575 m_Type = U_ObjRef;
576 value.m_objRefVal.GetValue(m_objRefVal, engine);
577 break;
579 m_Type = U_ContentRef;
581 break;
583 m_Type = U_None;
584 break;
585 }
586}
587
589{
590 switch (t)
591 {
592 case U_Int:
593 return "int";
594 case U_Bool:
595 return "bool";
596 case U_String:
597 return "string";
598 case U_ObjRef:
599 return "objref";
600 case U_ContentRef:
601 return "contentref";
602 case U_None:
603 return "none";
604 }
605
606 return ""; // Not reached.
607}
608
610{
611 if (m_Type != t)
612 {
613 MHERROR(QString("Type mismatch - expected %1 found %2")
614 .arg(GetAsString(m_Type), GetAsString(t)));
615 }
616}
617
618QString MHUnion::Printable() const
619{
620 switch (m_Type)
621 {
622 case U_Int: return QString::number(m_nIntVal);
623 case U_Bool: return m_fBoolVal ? "true" : "false";
624 case U_String: return m_strVal.Printable();
625 case U_ObjRef: return m_objRefVal.Printable();
627 case U_None: break;
628 }
629 return "";
630}
631
632// A parameter is a generic whose argument is either the value itself or an indirect reference.
634{
635 switch (p->GetTagNo())
636 {
638 m_Type = P_Bool;
639 m_boolVal.Initialise(p->GetArgN(0), engine);
640 break;
642 m_Type = P_Int;
643 m_intVal.Initialise(p->GetArgN(0), engine);
644 break;
646 m_Type = P_String;
647 m_strVal.Initialise(p->GetArgN(0), engine);
648 break;
650 m_Type = P_ObjRef;
651 m_objRefVal.Initialise(p->GetArgN(0), engine);
652 break;
654 m_Type = P_ContentRef;
655 m_contentRefVal.Initialise(p->GetArgN(0), engine);
656 break;
657 default:
658 MHParseNode::Failure("Expected generic");
659 }
660}
661
662void MHParameter::PrintMe(FILE *fd, int nTabs) const
663{
664 PrintTabs(fd, nTabs);
665
666 switch (m_Type)
667 {
668 // Direct values.
669 case P_Int:
670 fprintf(fd, ":GInteger ");
671 m_intVal.PrintMe(fd, 0);
672 break;
673 case P_Bool:
674 fprintf(fd, ":GBoolean ");
675 m_boolVal.PrintMe(fd, 0);
676 break;
677 case P_String:
678 fprintf(fd, ":GOctetString ");
679 m_strVal.PrintMe(fd, 0);
680 break;
681 case P_ObjRef:
682 fprintf(fd, ":GObjectRef ");
683 m_objRefVal.PrintMe(fd, 0);
684 break;
685 case P_ContentRef:
686 fprintf(fd, ":GObjectRef ");
688 break;
689 case P_Null:
690 break;
691 }
692}
693
694// Return the indirect reference so that it can be updated. We don't need to check
695// the type at this stage. If we assign the wrong value that will be picked up in
696// the assignment.
698{
699 switch (m_Type)
700 {
701 case P_Int:
702 return m_intVal.GetReference();
703 case P_Bool:
704 return m_boolVal.GetReference();
705 case P_String:
706 return m_strVal.GetReference();
707 case P_ObjRef:
708 return m_objRefVal.GetReference();
709 case P_ContentRef:
711 case P_Null:
712 return nullptr;
713 }
714
715 return nullptr; // To keep VC++ happy
716}
717
718// A content reference is simply a string.
719MHContentRef MHContentRef::Null; // This is the empty string.
720
722{
723 p->GetStringValue(m_contentRef);
724}
725
727{
728 if (p->m_nNodeType == MHParseNode::PNString)
729 {
730 p->GetStringValue(m_dirFont);
731 }
732 else
733 {
734 m_indirFont.Initialise(p, engine);
735 }
736}
737
738void MHFontBody::PrintMe(FILE *fd, int nTabs) const
739{
740 if (m_dirFont.Size() > 0)
741 {
742 m_dirFont.PrintMe(fd, nTabs);
743 }
744 else
745 {
746 m_indirFont.PrintMe(fd, nTabs);
747 }
748}
749
751{
754}
755
757{
758 m_x.Initialise(p->GetSeqN(0), engine);
759 m_y.Initialise(p->GetSeqN(1), engine);
760}
761
762void MHPointArg::PrintMe(FILE *fd, int nTabs) const
763{
764 fprintf(fd, "( ");
765 m_x.PrintMe(fd, nTabs);
766 m_y.PrintMe(fd, nTabs);
767 fprintf(fd, ") ");
768}
769
@ C_NEW_GENERIC_OCTETSTRING
Definition: ASN1Codes.h:263
@ C_INDIRECTREFERENCE
Definition: ASN1Codes.h:272
@ C_NEW_GENERIC_BOOLEAN
Definition: ASN1Codes.h:261
@ C_NEW_GENERIC_CONTENT_REF
Definition: ASN1Codes.h:265
@ C_CONTENT_REFERENCE
Definition: ASN1Codes.h:105
@ C_NEW_GENERIC_OBJECT_REF
Definition: ASN1Codes.h:264
@ C_NEW_GENERIC_INTEGER
Definition: ASN1Codes.h:262
#define MHERROR(__text)
Definition: Logging.h:42
void PrintTabs(FILE *fd, int n)
Definition: ParseNode.cpp:34
void Initialise(MHParseNode *p, MHEngine *engine)
void PrintMe(FILE *fd, int nTabs) const
MHOctetString m_colStr
Definition: BaseClasses.h:144
void SetFromString(const char *str, int nLen)
void Copy(const MHColour &col)
int m_nColIndex
Definition: BaseClasses.h:145
void Initialise(MHParseNode *p, MHEngine *engine)
static MHContentRef Null
Definition: BaseClasses.h:183
MHOctetString m_contentRef
Definition: BaseClasses.h:186
void Copy(const MHContentRef &cr)
Definition: BaseClasses.h:180
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.h:179
bool Equal(const MHContentRef &cr, MHEngine *engine) const
QString Printable() const
Definition: BaseClasses.h:184
MHRoot * FindObject(const MHObjectRef &oRef, bool failOnNotFound=true)
Definition: Engine.cpp:574
QString GetPathName(const MHOctetString &str)
Definition: Engine.cpp:523
MHOctetString & GetGroupId()
Definition: Engine.h:153
MHObjectRef m_indirFont
Definition: BaseClasses.h:316
void Copy(const MHFontBody &fb)
void PrintMe(FILE *fd, int nTabs) const
MHOctetString m_dirFont
Definition: BaseClasses.h:315
void Initialise(MHParseNode *p, MHEngine *engine)
MHObjectRef m_indirect
Definition: BaseClasses.h:196
MHObjectRef * GetReference()
void PrintMe(FILE *fd, int nTabs) const
void Initialise(MHParseNode *p, MHEngine *engine)
bool GetValue(MHEngine *engine) const
void GetValue(MHContentRef &ref, MHEngine *engine) const
void Initialise(MHParseNode *p, MHEngine *engine)
void PrintMe(FILE *fd, int nTabs) const
MHContentRef m_direct
Definition: BaseClasses.h:251
void Initialise(MHParseNode *p, MHEngine *engine)
int GetValue(MHEngine *engine) const
void PrintMe(FILE *fd, int nTabs) const
void Initialise(MHParseNode *p, MHEngine *engine)
void PrintMe(FILE *fd, int nTabs) const
MHObjectRef m_objRef
Definition: BaseClasses.h:240
void GetValue(MHObjectRef &ref, MHEngine *engine) const
MHOctetString m_direct
Definition: BaseClasses.h:229
void PrintMe(FILE *fd, int nTabs) const
void Initialise(MHParseNode *p, MHEngine *engine)
void GetValue(MHOctetString &str, MHEngine *engine) const
MHOctetString m_groupId
Definition: BaseClasses.h:167
bool Equal(const MHObjectRef &objr, MHEngine *engine) const
QString Printable() const
void PrintMe(FILE *fd, int nTabs) const
static MHObjectRef Null
Definition: BaseClasses.h:156
void Initialise(MHParseNode *p, MHEngine *engine)
void Copy(const MHObjectRef &objr)
void Copy(const MHOctetString &str)
Definition: BaseClasses.cpp:85
int Size() const
Definition: BaseClasses.h:118
unsigned char GetAt(int i) const
Definition: BaseClasses.h:122
void Append(const MHOctetString &str)
std::vector< uint8_t > m_pChars
Definition: BaseClasses.h:131
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:97
QString Printable() const
Definition: BaseClasses.h:126
MHOctetString()=default
int Compare(const MHOctetString &str) const
MHGenericContentRef m_contentRefVal
Definition: BaseClasses.h:276
MHGenericOctetString m_strVal
Definition: BaseClasses.h:274
MHGenericBoolean m_boolVal
Definition: BaseClasses.h:273
MHGenericObjectRef m_objRefVal
Definition: BaseClasses.h:275
MHGenericInteger m_intVal
Definition: BaseClasses.h:272
MHObjectRef * GetReference()
enum MHParameter::ParamTypes P_Null
void Initialise(MHParseNode *p, MHEngine *engine)
void PrintMe(FILE *fd, int nTabs) const
MHParseNode * GetArgN(int n)
Definition: ParseNode.cpp:78
static void Failure(const char *p)
Definition: ParseNode.cpp:43
void GetStringValue(MHOctetString &str)
Definition: ParseNode.cpp:203
int GetTagNo()
Definition: ParseNode.cpp:49
bool GetBoolValue()
Definition: ParseNode.cpp:192
enum NodeType m_nNodeType
Definition: ParseNode.h:46
int GetIntValue()
Definition: ParseNode.cpp:170
MHGenericInteger m_x
Definition: BaseClasses.h:325
void PrintMe(FILE *fd, int nTabs) const
MHGenericInteger m_y
Definition: BaseClasses.h:325
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: Root.h:45
virtual void GetVariableValue(MHUnion &, MHEngine *)
Definition: Root.h:107
QString Printable() const
bool m_fBoolVal
Definition: BaseClasses.h:300
int m_nIntVal
Definition: BaseClasses.h:299
MHObjectRef m_objRefVal
Definition: BaseClasses.h:302
MHContentRef m_contentRefVal
Definition: BaseClasses.h:303
void GetValueFrom(const MHParameter &value, MHEngine *engine)
void CheckType(enum UnionTypes t) const
@ U_ContentRef
Definition: BaseClasses.h:295
enum MHUnion::UnionTypes U_None
static const char * GetAsString(enum UnionTypes t)
MHOctetString m_strVal
Definition: BaseClasses.h:301
int FILE
Definition: mythburn.py:137
static eu8 clamp(eu8 value, eu8 low, eu8 high)
Definition: pxsup2dast.c:201