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  unsigned char *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 {
239  {
240  m_nColIndex = p->GetIntValue();
241  }
242  else
243  {
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 {
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  char buff[30]; // 30 chars is more than enough.
524 #ifdef _WIN32
525  _snprintf(buff, sizeof(buff), "%0d", result.m_nIntVal);
526 #else
527  snprintf(buff, sizeof(buff), "%0d", result.m_nIntVal);
528 #endif
529  str.Copy(buff);
530  }
531  else
532  {
534  str.Copy(result.m_StrVal);
535  }
536  }
537 }
538 
540 {
542  {
543  // Indirect reference.
544  m_fIsDirect = false;
545  m_Indirect.Initialise(pArg->GetArgN(0), engine);
546  }
547  else // Direct reference.
548  {
549  m_fIsDirect = true;
550  m_ObjRef.Initialise(pArg, engine);
551  }
552 }
553 
554 void MHGenericObjectRef::PrintMe(FILE *fd, int nTabs) const
555 {
556  if (m_fIsDirect)
557  {
558  m_ObjRef.PrintMe(fd, nTabs + 1);
559  }
560  else
561  {
562  fprintf(fd, ":IndirectRef ");
563  m_Indirect.PrintMe(fd, nTabs + 1);
564  }
565 }
566 
567 // Return the value, looking up any indirect ref.
569 {
570  if (m_fIsDirect)
571  {
572  ref.Copy(m_ObjRef);
573  }
574  else
575  {
576  // LVR - Hmm I don't think this is right. Should be: ref.Copy(m_Indirect);
577  // But it's used in several places so workaround in Stream::MHActionGenericObjectRefFix
578  MHUnion result;
579  MHRoot *pBase = engine->FindObject(m_Indirect);
580  pBase->GetVariableValue(result, engine);
582  ref.Copy(result.m_ObjRefVal);
583  }
584 }
585 
587 {
588  if (pArg->GetTagNo() == C_INDIRECTREFERENCE)
589  {
590  // Indirect reference.
591  m_fIsDirect = false;
592  m_Indirect.Initialise(pArg->GetArgN(0), engine);
593  }
594  else if (pArg->GetTagNo() == C_CONTENT_REFERENCE) // Direct reference.
595  {
596  m_fIsDirect = true;
597  m_Direct.Initialise(pArg->GetArgN(0), engine);
598  }
599  else
600  {
601  MHERROR("Expected direct or indirect content reference");
602  }
603 }
604 
605 void MHGenericContentRef::PrintMe(FILE *fd, int /*nTabs*/) const
606 {
607  if (m_fIsDirect)
608  {
609  m_Direct.PrintMe(fd, 0);
610  }
611  else
612  {
613  fprintf(fd, ":IndirectRef ");
614  m_Indirect.PrintMe(fd, 0);
615  }
616 }
617 
618 // Return the value, looking up any indirect ref.
620 {
621  if (m_fIsDirect)
622  {
623  ref.Copy(m_Direct);
624  }
625  else
626  {
627  MHUnion result;
628  MHRoot *pBase = engine->FindObject(m_Indirect);
629  pBase->GetVariableValue(result, engine);
631  ref.Copy(result.m_ContentRefVal);
632  }
633 }
634 
635 // Copies the argument, getting the value of an indirect args.
636 void MHUnion::GetValueFrom(const MHParameter &value, MHEngine *engine)
637 {
638  switch (value.m_Type)
639  {
640  case MHParameter::P_Int:
641  m_Type = U_Int;
642  m_nIntVal = value.m_IntVal.GetValue(engine);
643  break;
644  case MHParameter::P_Bool:
645  m_Type = U_Bool;
646  m_fBoolVal = value.m_BoolVal.GetValue(engine);
647  break;
649  m_Type = U_String;
650  value.m_StrVal.GetValue(m_StrVal, engine);
651  break;
653  m_Type = U_ObjRef;
654  value.m_ObjRefVal.GetValue(m_ObjRefVal, engine);
655  break;
657  m_Type = U_ContentRef;
659  break;
660  case MHParameter::P_Null:
661  m_Type = U_None;
662  break;
663  }
664 }
665 
667 {
668  switch (t)
669  {
670  case U_Int:
671  return "int";
672  case U_Bool:
673  return "bool";
674  case U_String:
675  return "string";
676  case U_ObjRef:
677  return "objref";
678  case U_ContentRef:
679  return "contentref";
680  case U_None:
681  return "none";
682  }
683 
684  return ""; // Not reached.
685 }
686 
688 {
689  if (m_Type != t)
690  {
691  MHERROR(QString("Type mismatch - expected %1 found %2").arg(GetAsString(m_Type)).arg(GetAsString(t)));
692  }
693 }
694 
695 QString MHUnion::Printable() const
696 {
697  switch (m_Type)
698  {
699  case U_Int: return QString::number(m_nIntVal);
700  case U_Bool: return m_fBoolVal ? "true" : "false";
701  case U_String: return m_StrVal.Printable();
702  case U_ObjRef: return m_ObjRefVal.Printable();
703  case U_ContentRef: return m_ContentRefVal.Printable();
704  case U_None: break;
705  }
706  return "";
707 }
708 
709 // A parameter is a generic whose argument is either the value itself or an indirect reference.
711 {
712  switch (p->GetTagNo())
713  {
715  m_Type = P_Bool;
716  m_BoolVal.Initialise(p->GetArgN(0), engine);
717  break;
719  m_Type = P_Int;
720  m_IntVal.Initialise(p->GetArgN(0), engine);
721  break;
723  m_Type = P_String;
724  m_StrVal.Initialise(p->GetArgN(0), engine);
725  break;
727  m_Type = P_ObjRef;
728  m_ObjRefVal.Initialise(p->GetArgN(0), engine);
729  break;
732  m_ContentRefVal.Initialise(p->GetArgN(0), engine);
733  break;
734  default:
735  MHParseNode::Failure("Expected generic");
736  }
737 }
738 
739 void MHParameter::PrintMe(FILE *fd, int nTabs) const
740 {
741  PrintTabs(fd, nTabs);
742 
743  switch (m_Type)
744  {
745  // Direct values.
746  case P_Int:
747  fprintf(fd, ":GInteger ");
748  m_IntVal.PrintMe(fd, 0);
749  break;
750  case P_Bool:
751  fprintf(fd, ":GBoolean ");
752  m_BoolVal.PrintMe(fd, 0);
753  break;
754  case P_String:
755  fprintf(fd, ":GOctetString ");
756  m_StrVal.PrintMe(fd, 0);
757  break;
758  case P_ObjRef:
759  fprintf(fd, ":GObjectRef ");
760  m_ObjRefVal.PrintMe(fd, 0);
761  break;
762  case P_ContentRef:
763  fprintf(fd, ":GObjectRef ");
764  m_ContentRefVal.PrintMe(fd, 0);
765  break;
766  case P_Null:
767  break;
768  }
769 }
770 
771 // Return the indirect reference so that it can be updated. We don't need to check
772 // the type at this stage. If we assign the wrong value that will be picked up in
773 // the assignment.
775 {
776  switch (m_Type)
777  {
778  case P_Int:
779  return m_IntVal.GetReference();
780  case P_Bool:
781  return m_BoolVal.GetReference();
782  case P_String:
783  return m_StrVal.GetReference();
784  case P_ObjRef:
785  return m_ObjRefVal.GetReference();
786  case P_ContentRef:
787  return m_ContentRefVal.GetReference();
788  case P_Null:
789  return nullptr;
790  }
791 
792  return nullptr; // To keep VC++ happy
793 }
794 
795 // A content reference is simply a string.
796 MHContentRef MHContentRef::Null; // This is the empty string.
797 
799 {
801 }
802 
804 {
806  {
808  }
809  else
810  {
811  m_IndirFont.Initialise(p, engine);
812  }
813 }
814 
815 void MHFontBody::PrintMe(FILE *fd, int nTabs) const
816 {
817  if (m_DirFont.Size() > 0)
818  {
819  m_DirFont.PrintMe(fd, nTabs);
820  }
821  else
822  {
823  m_IndirFont.PrintMe(fd, nTabs);
824  }
825 }
826 
828 {
831 }
832 
834 {
835  m_x.Initialise(p->GetSeqN(0), engine);
836  m_y.Initialise(p->GetSeqN(1), engine);
837 }
838 
839 void MHPointArg::PrintMe(FILE *fd, int nTabs) const
840 {
841  fprintf(fd, "( ");
842  m_x.PrintMe(fd, nTabs);
843  m_y.PrintMe(fd, nTabs);
844  fprintf(fd, ") ");
845 }
846 
void Initialise(MHParseNode *p, MHEngine *engine)
bool m_fBoolVal
Definition: BaseClasses.h:293
void PrintMe(FILE *fd, int nTabs) const
Definition: BaseClasses.h:179
static void Failure(const char *p)
Definition: ParseNode.cpp:43
void Initialise(MHParseNode *p, MHEngine *engine)
void Append(const MHOctetString &str)
int m_nIntVal
Definition: BaseClasses.h:292
void Initialise(MHParseNode *p, MHEngine *engine)
#define MHERROR(__text)
Definition: Logging.h:42
bool GetValue(MHEngine *engine) const
void PrintMe(FILE *fd, int nTabs) const
void PrintMe(FILE *fd, int nTabs) const
MHOctetString m_Direct
Definition: BaseClasses.h:229
#define C_INDIRECTREFERENCE
Definition: ASN1Codes.h:269
void PrintMe(FILE *fd, int nTabs) const
#define C_NEW_GENERIC_OCTETSTRING
Definition: ASN1Codes.h:260
static MHContentRef Null
Definition: BaseClasses.h:183
enum NodeType m_nNodeType
Definition: ParseNode.h:46
void Initialise(MHParseNode *p, MHEngine *engine)
virtual void GetVariableValue(MHUnion &, MHEngine *)
Definition: Root.h:100
QString Printable() const
enum MHParameter::ParamTypes m_Type
#define C_NEW_GENERIC_CONTENT_REF
Definition: ASN1Codes.h:262
int GetValue(MHEngine *engine) const
MHOctetString m_DirFont
Definition: BaseClasses.h:308
enum MHUnion::UnionTypes U_None
void Copy(const MHObjectRef &objr)
void GetValue(MHOctetString &str, MHEngine *engine) const
unsigned char GetAt(int i) const
Definition: BaseClasses.h:121
void PrintMe(FILE *fd, int nTabs) const
void Copy(const MHColour &col)
void Initialise(MHParseNode *p, MHEngine *engine)
MHContentRef m_ContentRefVal
Definition: BaseClasses.h:296
void GetValueFrom(const MHParameter &value, MHEngine *engine)
static const char * GetAsString(enum UnionTypes t)
MHGenericInteger m_y
Definition: BaseClasses.h:318
MHGenericContentRef m_ContentRefVal
Definition: BaseClasses.h:269
MHGenericBoolean m_BoolVal
Definition: BaseClasses.h:266
bool Equal(const MHContentRef &cr, MHEngine *engine) const
MHGenericInteger m_x
Definition: BaseClasses.h:318
void Copy(const MHContentRef &cr)
Definition: BaseClasses.h:180
void GetValue(MHObjectRef &ref, MHEngine *engine) const
MHObjectRef m_IndirFont
Definition: BaseClasses.h:309
MHGenericOctetString m_StrVal
Definition: BaseClasses.h:267
void Initialise(MHParseNode *p, MHEngine *engine)
void CheckType(enum UnionTypes) const
MHObjectRef * GetReference()
void SetFromString(const char *str, int nLen)
void PrintTabs(FILE *fd, int n)
Definition: ParseNode.cpp:34
void Copy(const MHFontBody &fb)
MHParseNode * GetSeqN(int n)
Definition: ParseNode.cpp:152
void Copy(const MHOctetString &str)
#define C_NEW_GENERIC_OBJECT_REF
Definition: ASN1Codes.h:261
int Size() const
Definition: BaseClasses.h:117
#define C_CONTENT_REFERENCE
Definition: ASN1Codes.h:102
QString Printable() const
Definition: BaseClasses.h:184
QString Printable() const
int GetIntValue()
Definition: ParseNode.cpp:170
unsigned char t
Definition: ParseText.cpp:329
QString Printable() const
Definition: BaseClasses.h:125
void Initialise(MHParseNode *p, MHEngine *engine)
void GetStringValue(MHOctetString &str)
Definition: ParseNode.cpp:203
MHObjectRef m_ObjRef
Definition: BaseClasses.h:240
void PrintMe(FILE *fd, int nTabs) const
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: Root.h:43
void PrintMe(FILE *fd, int nTabs) const
void PrintMe(FILE *fd, int nTabs) const
bool Equal(const MHObjectRef &objr, MHEngine *engine) const
int FILE
Definition: mythburn.py:110
void Initialise(MHParseNode *p, MHEngine *engine)
void PrintMe(FILE *fd, int nTabs) const
unsigned char * m_pChars
Definition: BaseClasses.h:131
int m_nColIndex
Definition: BaseClasses.h:145
MHContentRef m_Direct
Definition: BaseClasses.h:251
void Initialise(MHParseNode *p, MHEngine *engine)
MHRoot * FindObject(const MHObjectRef &oRef, bool failOnNotFound=true)
Definition: Engine.cpp:573
MHOctetString m_StrVal
Definition: BaseClasses.h:294
QString GetPathName(const MHOctetString &str)
Definition: Engine.cpp:523
void PrintMe(FILE *fd, int nTabs) const
MHGenericObjectRef m_ObjRefVal
Definition: BaseClasses.h:268
MHOctetString m_ContentRef
Definition: BaseClasses.h:186
MHOctetString & GetGroupId()
Definition: Engine.h:152
bool GetBoolValue()
Definition: ParseNode.cpp:192
virtual ~MHOctetString()
void Initialise(MHParseNode *p, MHEngine *engine)
MHOctetString m_GroupId
Definition: BaseClasses.h:167
#define C_NEW_GENERIC_BOOLEAN
Definition: ASN1Codes.h:258
MHObjectRef m_ObjRefVal
Definition: BaseClasses.h:295
MHParseNode * GetArgN(int n)
Definition: ParseNode.cpp:78
int GetTagNo()
Definition: ParseNode.cpp:49
MHGenericInteger m_IntVal
Definition: BaseClasses.h:265
int Compare(const MHOctetString &str) const
MHObjectRef m_Indirect
Definition: BaseClasses.h:196
#define C_NEW_GENERIC_INTEGER
Definition: ASN1Codes.h:259
void GetValue(MHContentRef &ref, MHEngine *engine) const
void PrintMe(FILE *fd, int nTabs) const
void PrintMe(FILE *fd, int nTabs) const
MHObjectRef * GetReference()
MHOctetString m_ColStr
Definition: BaseClasses.h:144
static MHObjectRef Null
Definition: BaseClasses.h:156