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 #include "ParseNode.h"
24 #include "Engine.h"
25 #include "ASN1Codes.h"
26 #include "Logging.h"
27 
28 #ifdef _DEBUG
29 #undef THIS_FILE
30 static char THIS_FILE[] = __FILE__;
31 #define new DEBUG_NEW
32 #endif
33 
35 {
36  m_nLength = 0;
37  m_pChars = nullptr;
38 }
39 
40 // Construct from a string
41 MHOctetString::MHOctetString(const char *str, int nLen)
42 {
43  if (nLen < 0)
44  {
45  nLen = strlen(str);
46  }
47 
48  m_nLength = nLen;
49 
50  if (nLen == 0)
51  {
52  m_pChars = nullptr;
53  }
54  else
55  {
56  m_pChars = (unsigned char *)malloc(nLen + 1);
57 
58  if (! m_pChars)
59  {
60  throw "Out of memory";
61  }
62 
63  memcpy(m_pChars, str, nLen);
64  }
65 }
66 
67 MHOctetString::MHOctetString(const unsigned char *str, int nLen)
68 {
69  m_nLength = nLen;
70 
71  if (nLen == 0)
72  {
73  m_pChars = nullptr;
74  }
75  else
76  {
77  m_pChars = (unsigned char *)malloc(nLen + 1);
78 
79  if (! m_pChars)
80  {
81  throw "Out of memory";
82  }
83 
84  memcpy(m_pChars, str, nLen);
85  }
86 }
87 
88 // Construct a substring.
89 MHOctetString::MHOctetString(const MHOctetString &str, int nOffset, int nLen)
90 {
91  if (nLen < 0)
92  {
93  nLen = str.Size() - nOffset; // The rest of the string.
94  }
95 
96  if (nLen < 0)
97  {
98  nLen = 0;
99  }
100 
101  if (nLen > str.Size())
102  {
103  nLen = str.Size();
104  }
105 
106  m_nLength = nLen;
107 
108  if (nLen == 0)
109  {
110  m_pChars = nullptr;
111  }
112  else
113  {
114  m_pChars = (unsigned char *)malloc(nLen + 1);
115 
116  if (! m_pChars)
117  {
118  throw "Out of memory";
119  }
120 
121  memcpy(m_pChars, str.m_pChars + nOffset, nLen);
122  }
123 }
124 
126 {
127  free(m_pChars);
128 }
129 
130 // Copy a string
132 {
133  free(m_pChars);
134  m_pChars = nullptr;
135  m_nLength = str.m_nLength;
136 
137  if (str.m_pChars)
138  {
139  // Allocate a copy of the string. For simplicity we always add a null.
140  m_pChars = (unsigned char *)malloc(m_nLength + 1);
141 
142  if (m_pChars == nullptr)
143  {
144  throw "Out of memory";
145  }
146 
147  memcpy(m_pChars, str.m_pChars, m_nLength);
148  m_pChars[m_nLength] = 0;
149  }
150 }
151 
152 // Print the string in a suitable format.
153 // For the moment it uses quoted printable.
154 void MHOctetString::PrintMe(FILE *fd, int /*nTabs*/) const
155 {
156  putc('\'', fd);
157 
158  for (int i = 0; i < m_nLength; i++)
159  {
160  unsigned char ch = m_pChars[i];
161 
162  // Escape a non-printable character or an equal sign or a quote.
163  if (ch == '=' || ch == '\'' || ch < ' ' || ch >= 127)
164  {
165  fprintf(fd, "=%02X", ch);
166  }
167  else
168  {
169  putc(ch, fd);
170  }
171  }
172 
173  putc('\'', fd);
174 }
175 
176 // Test strings.
178 {
179  int nLength = m_nLength;
180 
181  if (nLength > str.m_nLength)
182  {
183  nLength = str.m_nLength;
184  }
185 
186  // Test up to the length of the shorter string.
187  int nTest = 0;
188 
189  if (nLength > 0)
190  {
191  nTest = memcmp(str.m_pChars, m_pChars, nLength);
192  }
193 
194  // If they differ return the result
195  if (nTest != 0)
196  {
197  return nTest;
198  }
199 
200  // If they are the same then the longer string is greater.
201  if (m_nLength == str.m_nLength)
202  {
203  return 0;
204  }
205  if (m_nLength < str.m_nLength)
206  {
207  return -1;
208  }
209  return 1;
210 }
211 
212 // Add text to the end of the string.
214 {
215  if (str.m_nLength == 0)
216  {
217  return; // Nothing to do and it simplifies the code
218  }
219 
220  int newLen = m_nLength + str.m_nLength;
221  // Allocate a new string big enough to contain both and initialised to the first string.
222  auto *p = (unsigned char *)realloc(m_pChars, newLen);
223 
224  if (p == nullptr)
225  {
226  throw "Out of memory";
227  }
228 
229  m_pChars = p;
230  // Copy the second string onto the end of the first.
231  memcpy(m_pChars + m_nLength, str.m_pChars, str.m_nLength);
232  m_nLength = newLen;
233 }
234 
235 // Colour
237 {
238  if (p->m_nNodeType == MHParseNode::PNInt)
239  {
240  m_nColIndex = p->GetIntValue();
241  }
242  else
243  {
244  p->GetStringValue(m_colStr);
245  }
246 }
247 
248 void MHColour::PrintMe(FILE *fd, int nTabs) const
249 {
250  if (m_nColIndex >= 0)
251  {
252  fprintf(fd, " %d ", m_nColIndex);
253  }
254  else
255  {
256  m_colStr.PrintMe(fd, nTabs);
257  }
258 }
259 
260 void MHColour::SetFromString(const char *str, int nLen)
261 {
262  m_nColIndex = -1;
263  m_colStr.Copy(MHOctetString(str, nLen));
264 }
265 
266 void MHColour::Copy(const MHColour &col)
267 {
268  m_nColIndex = col.m_nColIndex;
269  m_colStr.Copy(col.m_colStr);
270 }
271 
272 // An object reference is used to identify and refer to an object.
273 // Internal objects have the m_groupId field empty.
274 
275 MHObjectRef MHObjectRef::Null; // This has zero for the object number and an empty group id.
276 
277 // An object reference is either an integer or a pair of a group id and an integer.
279 {
280  if (p->m_nNodeType == MHParseNode::PNInt)
281  {
282  m_nObjectNo = p->GetIntValue();
283  // Set the group id to the id of this group.
284  m_groupId.Copy(engine->GetGroupId());
285  }
286  else if (p->m_nNodeType == MHParseNode::PNSeq)
287  {
288  MHParseNode *pFirst = p->GetSeqN(0);
289  MHOctetString groupId;
290  pFirst->GetStringValue(m_groupId);
291  m_nObjectNo = p->GetSeqN(1)->GetIntValue();
292  }
293  else
294  {
295  MHParseNode::Failure("ObjectRef: Argument is not int or sequence");
296  }
297 }
298 
299 void MHObjectRef::PrintMe(FILE *fd, int nTabs) const
300 {
301  if (m_groupId.Size() == 0)
302  {
303  fprintf(fd, " %d ", m_nObjectNo);
304  }
305  else
306  {
307  fprintf(fd, " ( ");
308  m_groupId.PrintMe(fd, nTabs);
309  fprintf(fd, " %d ) ", m_nObjectNo);
310  }
311 }
312 
313 QString MHObjectRef::Printable() const
314 {
315  if (m_groupId.Size() == 0)
316  {
317  return QString(" %1 ").arg(m_nObjectNo);
318  }
319  return QString(" ( ") + m_groupId.Printable() + QString(" %1 ").arg(m_nObjectNo);
320 }
321 
322 // Make a copy of an object reference.
324 {
325  m_nObjectNo = objr.m_nObjectNo;
326  m_groupId.Copy(objr.m_groupId);
327 }
328 
329 // The object references may not be identical but may nevertheless refer to the same
330 // object. The only safe way to do this is to compare the canonical paths.
331 bool MHObjectRef::Equal(const MHObjectRef &objr, MHEngine *engine) const
332 {
333  return m_nObjectNo == objr.m_nObjectNo && engine->GetPathName(m_groupId) == engine->GetPathName(objr.m_groupId);
334 }
335 
336 bool MHContentRef::Equal(const MHContentRef &cr, MHEngine *engine) const
337 {
338  return engine->GetPathName(m_contentRef) == engine->GetPathName(cr.m_contentRef);
339 }
340 
341 // "Generic" versions of int, bool etc can be either the value or the an indirect reference.
342 
344 {
346  {
347  // Indirect reference.
348  m_fIsDirect = false;
349  m_indirect.Initialise(pArg->GetArgN(0), engine);
350  }
351  else // Simple integer value.
352  {
353  m_fIsDirect = true;
354  m_fDirect = pArg->GetBoolValue();
355  }
356 }
357 
358 void MHGenericBoolean::PrintMe(FILE *fd, int nTabs) const
359 {
360  if (m_fIsDirect)
361  {
362  fprintf(fd, "%s ", m_fDirect ? "true" : "false");
363  }
364  else
365  {
366  fprintf(fd, ":IndirectRef ");
367  m_indirect.PrintMe(fd, nTabs + 1);
368  }
369 }
370 
371 // Return the value, looking up any indirect ref.
373 {
374  if (m_fIsDirect)
375  {
376  return m_fDirect;
377  }
378 
379  MHUnion result;
380  MHRoot *pBase = engine->FindObject(m_indirect);
381  pBase->GetVariableValue(result, engine);
382  result.CheckType(MHUnion::U_Bool);
383  return result.m_fBoolVal;
384 }
385 
386 // Return the indirect reference or fail if it's direct
388 {
389  if (m_fIsDirect)
390  {
391  MHERROR("Expected indirect reference");
392  }
393 
394  return &m_indirect;
395 }
396 
398 {
400  {
401  // Indirect reference.
402  m_fIsDirect = false;
403  m_indirect.Initialise(pArg->GetArgN(0), engine);
404  }
405  else // Simple integer value.
406  {
407  m_fIsDirect = true;
408  m_nDirect = pArg->GetIntValue();
409  }
410 }
411 
412 void MHGenericInteger::PrintMe(FILE *fd, int nTabs) const
413 {
414  if (m_fIsDirect)
415  {
416  fprintf(fd, "%d ", m_nDirect);
417  }
418  else
419  {
420  fprintf(fd, ":IndirectRef ");
421  m_indirect.PrintMe(fd, nTabs + 1);
422  }
423 }
424 
425 // Return the value, looking up any indirect ref.
427 {
428  if (m_fIsDirect)
429  {
430  return m_nDirect;
431  }
432 
433  MHUnion result;
434  MHRoot *pBase = engine->FindObject(m_indirect);
435  pBase->GetVariableValue(result, engine);
436 
437  // From my reading of the MHEG documents implicit conversion is only
438  // performed when assigning variables. Nevertheless the Channel 4
439  // Teletext assumes that implicit conversion takes place here as well.
440  if (result.m_Type == MHUnion::U_String)
441  {
442  // Implicit conversion of string to integer.
443  int v = 0;
444  int p = 0;
445  bool fNegative = false;
446 
447  if (result.m_strVal.Size() > 0 && result.m_strVal.GetAt(0) == '-')
448  {
449  p++;
450  fNegative = true;
451  }
452 
453  for (; p < result.m_strVal.Size(); p++)
454  {
455  unsigned char ch = result.m_strVal.GetAt(p);
456 
457  if (ch < '0' || ch > '9')
458  {
459  break;
460  }
461 
462  v = v * 10 + ch - '0';
463  }
464 
465  if (fNegative)
466  {
467  return -v;
468  }
469  return v;
470  }
471 
472  result.CheckType(MHUnion::U_Int);
473  return result.m_nIntVal;
474 }
475 
477 {
479  {
480  // Indirect reference.
481  m_fIsDirect = false;
482  m_indirect.Initialise(pArg->GetArgN(0), engine);
483  }
484  else // Simple string value.
485  {
486  m_fIsDirect = true;
487  pArg->GetStringValue(m_direct);
488  }
489 }
490 
491 void MHGenericOctetString::PrintMe(FILE *fd, int /*nTabs*/) const
492 {
493  if (m_fIsDirect)
494  {
495  m_direct.PrintMe(fd, 0);
496  }
497  else
498  {
499  fprintf(fd, ":IndirectRef ");
500  m_indirect.PrintMe(fd, 0);
501  }
502 }
503 
504 // Return the value, looking up any indirect ref.
506 {
507  if (m_fIsDirect)
508  {
509  str.Copy(m_direct);
510  }
511  else
512  {
513  MHUnion result;
514  MHRoot *pBase = engine->FindObject(m_indirect);
515  pBase->GetVariableValue(result, engine);
516 
517  // From my reading of the MHEG documents implicit conversion is only
518  // performed when assigning variables. Nevertheless the Channel 4
519  // Teletext assumes that implicit conversion takes place here as well.
520  if (result.m_Type == MHUnion::U_Int)
521  {
522  // Implicit conversion of int to string.
523  str.Copy(std::to_string(result.m_nIntVal).data());
524  }
525  else
526  {
528  str.Copy(result.m_strVal);
529  }
530  }
531 }
532 
534 {
536  {
537  // Indirect reference.
538  m_fIsDirect = false;
539  m_indirect.Initialise(pArg->GetArgN(0), engine);
540  }
541  else // Direct reference.
542  {
543  m_fIsDirect = true;
544  m_objRef.Initialise(pArg, engine);
545  }
546 }
547 
548 void MHGenericObjectRef::PrintMe(FILE *fd, int nTabs) const
549 {
550  if (m_fIsDirect)
551  {
552  m_objRef.PrintMe(fd, nTabs + 1);
553  }
554  else
555  {
556  fprintf(fd, ":IndirectRef ");
557  m_indirect.PrintMe(fd, nTabs + 1);
558  }
559 }
560 
561 // Return the value, looking up any indirect ref.
563 {
564  if (m_fIsDirect)
565  {
566  ref.Copy(m_objRef);
567  }
568  else
569  {
570  // LVR - Hmm I don't think this is right. Should be: ref.Copy(m_indirect);
571  // But it's used in several places so workaround in Stream::MHActionGenericObjectRefFix
572  MHUnion result;
573  MHRoot *pBase = engine->FindObject(m_indirect);
574  pBase->GetVariableValue(result, engine);
576  ref.Copy(result.m_objRefVal);
577  }
578 }
579 
581 {
582  if (pArg->GetTagNo() == C_INDIRECTREFERENCE)
583  {
584  // Indirect reference.
585  m_fIsDirect = false;
586  m_indirect.Initialise(pArg->GetArgN(0), engine);
587  }
588  else if (pArg->GetTagNo() == C_CONTENT_REFERENCE) // Direct reference.
589  {
590  m_fIsDirect = true;
591  m_direct.Initialise(pArg->GetArgN(0), engine);
592  }
593  else
594  {
595  MHERROR("Expected direct or indirect content reference");
596  }
597 }
598 
599 void MHGenericContentRef::PrintMe(FILE *fd, int /*nTabs*/) const
600 {
601  if (m_fIsDirect)
602  {
603  m_direct.PrintMe(fd, 0);
604  }
605  else
606  {
607  fprintf(fd, ":IndirectRef ");
608  m_indirect.PrintMe(fd, 0);
609  }
610 }
611 
612 // Return the value, looking up any indirect ref.
614 {
615  if (m_fIsDirect)
616  {
617  ref.Copy(m_direct);
618  }
619  else
620  {
621  MHUnion result;
622  MHRoot *pBase = engine->FindObject(m_indirect);
623  pBase->GetVariableValue(result, engine);
625  ref.Copy(result.m_contentRefVal);
626  }
627 }
628 
629 // Copies the argument, getting the value of an indirect args.
630 void MHUnion::GetValueFrom(const MHParameter &value, MHEngine *engine)
631 {
632  switch (value.m_Type)
633  {
634  case MHParameter::P_Int:
635  m_Type = U_Int;
636  m_nIntVal = value.m_intVal.GetValue(engine);
637  break;
638  case MHParameter::P_Bool:
639  m_Type = U_Bool;
640  m_fBoolVal = value.m_boolVal.GetValue(engine);
641  break;
643  m_Type = U_String;
644  value.m_strVal.GetValue(m_strVal, engine);
645  break;
647  m_Type = U_ObjRef;
648  value.m_objRefVal.GetValue(m_objRefVal, engine);
649  break;
651  m_Type = U_ContentRef;
653  break;
654  case MHParameter::P_Null:
655  m_Type = U_None;
656  break;
657  }
658 }
659 
661 {
662  switch (t)
663  {
664  case U_Int:
665  return "int";
666  case U_Bool:
667  return "bool";
668  case U_String:
669  return "string";
670  case U_ObjRef:
671  return "objref";
672  case U_ContentRef:
673  return "contentref";
674  case U_None:
675  return "none";
676  }
677 
678  return ""; // Not reached.
679 }
680 
682 {
683  if (m_Type != t)
684  {
685  MHERROR(QString("Type mismatch - expected %1 found %2").arg(GetAsString(m_Type)).arg(GetAsString(t)));
686  }
687 }
688 
689 QString MHUnion::Printable() const
690 {
691  switch (m_Type)
692  {
693  case U_Int: return QString::number(m_nIntVal);
694  case U_Bool: return m_fBoolVal ? "true" : "false";
695  case U_String: return m_strVal.Printable();
696  case U_ObjRef: return m_objRefVal.Printable();
697  case U_ContentRef: return m_contentRefVal.Printable();
698  case U_None: break;
699  }
700  return "";
701 }
702 
703 // A parameter is a generic whose argument is either the value itself or an indirect reference.
705 {
706  switch (p->GetTagNo())
707  {
709  m_Type = P_Bool;
710  m_boolVal.Initialise(p->GetArgN(0), engine);
711  break;
713  m_Type = P_Int;
714  m_intVal.Initialise(p->GetArgN(0), engine);
715  break;
717  m_Type = P_String;
718  m_strVal.Initialise(p->GetArgN(0), engine);
719  break;
721  m_Type = P_ObjRef;
722  m_objRefVal.Initialise(p->GetArgN(0), engine);
723  break;
725  m_Type = P_ContentRef;
726  m_contentRefVal.Initialise(p->GetArgN(0), engine);
727  break;
728  default:
729  MHParseNode::Failure("Expected generic");
730  }
731 }
732 
733 void MHParameter::PrintMe(FILE *fd, int nTabs) const
734 {
735  PrintTabs(fd, nTabs);
736 
737  switch (m_Type)
738  {
739  // Direct values.
740  case P_Int:
741  fprintf(fd, ":GInteger ");
742  m_intVal.PrintMe(fd, 0);
743  break;
744  case P_Bool:
745  fprintf(fd, ":GBoolean ");
746  m_boolVal.PrintMe(fd, 0);
747  break;
748  case P_String:
749  fprintf(fd, ":GOctetString ");
750  m_strVal.PrintMe(fd, 0);
751  break;
752  case P_ObjRef:
753  fprintf(fd, ":GObjectRef ");
754  m_objRefVal.PrintMe(fd, 0);
755  break;
756  case P_ContentRef:
757  fprintf(fd, ":GObjectRef ");
758  m_contentRefVal.PrintMe(fd, 0);
759  break;
760  case P_Null:
761  break;
762  }
763 }
764 
765 // Return the indirect reference so that it can be updated. We don't need to check
766 // the type at this stage. If we assign the wrong value that will be picked up in
767 // the assignment.
769 {
770  switch (m_Type)
771  {
772  case P_Int:
773  return m_intVal.GetReference();
774  case P_Bool:
775  return m_boolVal.GetReference();
776  case P_String:
777  return m_strVal.GetReference();
778  case P_ObjRef:
779  return m_objRefVal.GetReference();
780  case P_ContentRef:
781  return m_contentRefVal.GetReference();
782  case P_Null:
783  return nullptr;
784  }
785 
786  return nullptr; // To keep VC++ happy
787 }
788 
789 // A content reference is simply a string.
790 MHContentRef MHContentRef::Null; // This is the empty string.
791 
793 {
794  p->GetStringValue(m_contentRef);
795 }
796 
798 {
799  if (p->m_nNodeType == MHParseNode::PNString)
800  {
801  p->GetStringValue(m_dirFont);
802  }
803  else
804  {
805  m_indirFont.Initialise(p, engine);
806  }
807 }
808 
809 void MHFontBody::PrintMe(FILE *fd, int nTabs) const
810 {
811  if (m_dirFont.Size() > 0)
812  {
813  m_dirFont.PrintMe(fd, nTabs);
814  }
815  else
816  {
817  m_indirFont.PrintMe(fd, nTabs);
818  }
819 }
820 
822 {
825 }
826 
828 {
829  m_x.Initialise(p->GetSeqN(0), engine);
830  m_y.Initialise(p->GetSeqN(1), engine);
831 }
832 
833 void MHPointArg::PrintMe(FILE *fd, int nTabs) const
834 {
835  fprintf(fd, "( ");
836  m_x.PrintMe(fd, nTabs);
837  m_y.PrintMe(fd, nTabs);
838  fprintf(fd, ") ");
839 }
840 
MHGenericObjectRef::m_objRef
MHObjectRef m_objRef
Definition: BaseClasses.h:246
MHPointArg::m_x
MHGenericInteger m_x
Definition: BaseClasses.h:331
MHGenericBase::m_indirect
MHObjectRef m_indirect
Definition: BaseClasses.h:202
MHObjectRef
Definition: BaseClasses.h:157
MHUnion::GetAsString
static const char * GetAsString(enum UnionTypes t)
Definition: BaseClasses.cpp:660
MHParseNode::m_nNodeType
enum NodeType m_nNodeType
Definition: ParseNode.h:46
MHObjectRef::Copy
void Copy(const MHObjectRef &objr)
Definition: BaseClasses.cpp:323
MHObjectRef::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:278
MHParameter::P_ObjRef
@ P_ObjRef
Definition: BaseClasses.h:273
MHParameter
Definition: BaseClasses.h:262
MHParameter::m_contentRefVal
MHGenericContentRef m_contentRefVal
Definition: BaseClasses.h:282
MHParameter::m_objRefVal
MHGenericObjectRef m_objRefVal
Definition: BaseClasses.h:281
MHColour::m_nColIndex
int m_nColIndex
Definition: BaseClasses.h:151
MHParameter::GetReference
MHObjectRef * GetReference()
Definition: BaseClasses.cpp:768
MHUnion::CheckType
void CheckType(enum UnionTypes t) const
Definition: BaseClasses.cpp:681
MHParameter::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:733
ASN1Codes.h
MHEngine
Definition: Engine.h:72
MHParseNode::GetIntValue
int GetIntValue()
Definition: ParseNode.cpp:170
MHObjectRef::m_groupId
MHOctetString m_groupId
Definition: BaseClasses.h:173
MHParameter::P_ContentRef
@ P_ContentRef
Definition: BaseClasses.h:274
MHObjectRef::m_nObjectNo
int m_nObjectNo
Definition: BaseClasses.h:172
MHUnion::m_nIntVal
int m_nIntVal
Definition: BaseClasses.h:305
MHParseNode::PNTagged
@ PNTagged
Definition: ParseNode.h:41
MHOctetString::GetAt
unsigned char GetAt(int i) const
Definition: BaseClasses.h:127
MHGenericContentRef::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:599
MHGenericInteger::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:397
arg
arg(title).arg(filename).arg(doDelete))
MHParameter::P_String
@ P_String
Definition: BaseClasses.h:272
MHUnion::U_ObjRef
@ U_ObjRef
Definition: BaseClasses.h:301
MHObjectRef::Null
static MHObjectRef Null
Definition: BaseClasses.h:162
MHOctetString::Compare
int Compare(const MHOctetString &str) const
Definition: BaseClasses.cpp:177
MHUnion::U_Int
@ U_Int
Definition: BaseClasses.h:301
MHParameter::P_Int
@ P_Int
Definition: BaseClasses.h:270
MHGenericBoolean::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:343
MHGenericContentRef::m_direct
MHContentRef m_direct
Definition: BaseClasses.h:257
MHUnion::UnionTypes
UnionTypes
Definition: BaseClasses.h:301
MHOctetString
Definition: BaseClasses.h:111
MHParameter::P_Bool
@ P_Bool
Definition: BaseClasses.h:271
MHFontBody::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:809
mythburn.FILE
int FILE
Definition: mythburn.py:139
MHOctetString::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:154
MHEngine::GetPathName
QString GetPathName(const MHOctetString &str)
Definition: Engine.cpp:523
MHUnion::m_fBoolVal
bool m_fBoolVal
Definition: BaseClasses.h:306
MHObjectRef::Equal
bool Equal(const MHObjectRef &objr, MHEngine *engine) const
Definition: BaseClasses.cpp:331
MHEngine::GetGroupId
MHOctetString & GetGroupId()
Definition: Engine.h:153
MHGenericObjectRef::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:533
MHContentRef::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:792
MHColour::SetFromString
void SetFromString(const char *str, int nLen)
Definition: BaseClasses.cpp:260
MHFontBody::m_dirFont
MHOctetString m_dirFont
Definition: BaseClasses.h:321
MHGenericBase::m_fIsDirect
bool m_fIsDirect
Definition: BaseClasses.h:200
MHUnion::U_ContentRef
@ U_ContentRef
Definition: BaseClasses.h:301
MHColour::m_colStr
MHOctetString m_colStr
Definition: BaseClasses.h:150
MHUnion
Definition: BaseClasses.h:287
MHColour::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:236
MHOctetString::MHOctetString
MHOctetString()
Definition: BaseClasses.cpp:34
hardwareprofile.config.p
p
Definition: config.py:33
hardwareprofile.i18n.t
t
Definition: i18n.py:36
ParseNode.h
MHFontBody::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:797
MHUnion::m_objRefVal
MHObjectRef m_objRefVal
Definition: BaseClasses.h:308
PrintTabs
void PrintTabs(FILE *fd, int n)
Definition: ParseNode.cpp:34
MHGenericOctetString::GetValue
void GetValue(MHOctetString &str, MHEngine *engine) const
Definition: BaseClasses.cpp:505
MHParseNode::GetArgN
MHParseNode * GetArgN(int n)
Definition: ParseNode.cpp:78
MHEngine::FindObject
MHRoot * FindObject(const MHObjectRef &oRef, bool failOnNotFound=true)
Definition: Engine.cpp:573
MHParseNode::GetTagNo
int GetTagNo()
Definition: ParseNode.cpp:49
MHGenericOctetString::m_direct
MHOctetString m_direct
Definition: BaseClasses.h:235
MHColour
Definition: BaseClasses.h:142
MHFontBody::m_indirFont
MHObjectRef m_indirFont
Definition: BaseClasses.h:322
MHContentRef::Printable
QString Printable() const
Definition: BaseClasses.h:190
MHGenericOctetString::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:491
MHUnion::U_None
enum MHUnion::UnionTypes U_None
Engine.h
MHGenericContentRef::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:580
MHGenericBoolean::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:358
C_NEW_GENERIC_OCTETSTRING
#define C_NEW_GENERIC_OCTETSTRING
Definition: ASN1Codes.h:260
MHPointArg::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:827
MHParameter::m_boolVal
MHGenericBoolean m_boolVal
Definition: BaseClasses.h:279
MHParameter::m_intVal
MHGenericInteger m_intVal
Definition: BaseClasses.h:278
MHUnion::GetValueFrom
void GetValueFrom(const MHParameter &value, MHEngine *engine)
Definition: BaseClasses.cpp:630
MHGenericOctetString::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:476
C_NEW_GENERIC_INTEGER
#define C_NEW_GENERIC_INTEGER
Definition: ASN1Codes.h:259
MHUnion::m_contentRefVal
MHContentRef m_contentRefVal
Definition: BaseClasses.h:309
MHOctetString::Printable
QString Printable() const
Definition: BaseClasses.h:131
C_INDIRECTREFERENCE
#define C_INDIRECTREFERENCE
Definition: ASN1Codes.h:269
MHPointArg::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:833
MHParseNode::PNSeq
@ PNSeq
Definition: ParseNode.h:41
MHFontBody
Definition: BaseClasses.h:312
MHFontBody::Copy
void Copy(const MHFontBody &fb)
Definition: BaseClasses.cpp:821
MHParseNode::GetBoolValue
bool GetBoolValue()
Definition: ParseNode.cpp:192
MHOctetString::Size
int Size() const
Definition: BaseClasses.h:123
MHParameter::m_strVal
MHGenericOctetString m_strVal
Definition: BaseClasses.h:280
MHContentRef
Definition: BaseClasses.h:178
MHContentRef::Null
static MHContentRef Null
Definition: BaseClasses.h:189
C_NEW_GENERIC_OBJECT_REF
#define C_NEW_GENERIC_OBJECT_REF
Definition: ASN1Codes.h:261
MHParseNode::Failure
static void Failure(const char *p)
Definition: ParseNode.cpp:43
MHContentRef::m_contentRef
MHOctetString m_contentRef
Definition: BaseClasses.h:192
MHParameter::Initialise
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: BaseClasses.cpp:704
MHColour::Copy
void Copy(const MHColour &col)
Definition: BaseClasses.cpp:266
BaseClasses.h
MHUnion::Printable
QString Printable() const
Definition: BaseClasses.cpp:689
MHParseNode
Definition: ParseNode.h:39
MHUnion::U_String
@ U_String
Definition: BaseClasses.h:301
C_NEW_GENERIC_CONTENT_REF
#define C_NEW_GENERIC_CONTENT_REF
Definition: ASN1Codes.h:262
MHGenericInteger::GetValue
int GetValue(MHEngine *engine) const
Definition: BaseClasses.cpp:426
MHOctetString::m_pChars
unsigned char * m_pChars
Definition: BaseClasses.h:137
MHParameter::P_Null
enum MHParameter::ParamTypes P_Null
MHParseNode::GetStringValue
void GetStringValue(MHOctetString &str)
Definition: ParseNode.cpp:203
MHOctetString::m_nLength
int m_nLength
Definition: BaseClasses.h:136
MHGenericInteger::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:412
MHParseNode::PNString
@ PNString
Definition: ParseNode.h:41
MHERROR
#define MHERROR(__text)
Definition: Logging.h:42
MHGenericBase::GetReference
MHObjectRef * GetReference()
Definition: BaseClasses.cpp:387
Logging.h
MHGenericObjectRef::GetValue
void GetValue(MHObjectRef &ref, MHEngine *engine) const
Definition: BaseClasses.cpp:562
MHGenericContentRef::GetValue
void GetValue(MHContentRef &ref, MHEngine *engine) const
Definition: BaseClasses.cpp:613
MHOctetString::~MHOctetString
virtual ~MHOctetString()
Definition: BaseClasses.cpp:125
MHContentRef::Equal
bool Equal(const MHContentRef &cr, MHEngine *engine) const
Definition: BaseClasses.cpp:336
MHGenericInteger::m_nDirect
int m_nDirect
Definition: BaseClasses.h:224
MHUnion::m_strVal
MHOctetString m_strVal
Definition: BaseClasses.h:307
MHContentRef::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.h:185
MHColour::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:248
MHContentRef::Copy
void Copy(const MHContentRef &cr)
Definition: BaseClasses.h:186
MHOctetString::Append
void Append(const MHOctetString &str)
Definition: BaseClasses.cpp:213
MHParseNode::PNInt
@ PNInt
Definition: ParseNode.h:41
MHPointArg::m_y
MHGenericInteger m_y
Definition: BaseClasses.h:331
MHGenericObjectRef::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:548
MHObjectRef::PrintMe
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.cpp:299
C_NEW_GENERIC_BOOLEAN
#define C_NEW_GENERIC_BOOLEAN
Definition: ASN1Codes.h:258
MHGenericBoolean::m_fDirect
bool m_fDirect
Definition: BaseClasses.h:213
MHUnion::U_Bool
@ U_Bool
Definition: BaseClasses.h:301
MHOctetString::Copy
void Copy(const MHOctetString &str)
Definition: BaseClasses.cpp:131
MHRoot
Definition: Root.h:44
C_CONTENT_REFERENCE
#define C_CONTENT_REFERENCE
Definition: ASN1Codes.h:102
MHRoot::GetVariableValue
virtual void GetVariableValue(MHUnion &, MHEngine *)
Definition: Root.h:106
MHObjectRef::Printable
QString Printable() const
Definition: BaseClasses.cpp:313
MHGenericBoolean::GetValue
bool GetValue(MHEngine *engine) const
Definition: BaseClasses.cpp:372