From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_term_8cpp_source.html | 239 ++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 Doc/doxygen/html/_term_8cpp_source.html (limited to 'Doc/doxygen/html/_term_8cpp_source.html') diff --git a/Doc/doxygen/html/_term_8cpp_source.html b/Doc/doxygen/html/_term_8cpp_source.html new file mode 100644 index 0000000..5728a62 --- /dev/null +++ b/Doc/doxygen/html/_term_8cpp_source.html @@ -0,0 +1,239 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/Parser/Term.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Term.cpp
+
+
+Go to the documentation of this file.
1 /* Project STARS
+
2  John DiCamillo Software Consulting
+
3  Copyright (C) 1997-2000. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: Stars
+
6  FILE: Term.cpp
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Implementation of the Term class
+
13 */
+
14 
+
15 
+
16 #include "MemDebug.h"
+
17 #include "Term.h"
+
18 
+
19 void Print(const char* fmt, ...);
+
20 
+
21 // +-------------------------------------------------------------------+
+
22 
+
23 Term*
+
24 error(char* s1, char* s2)
+
25 {
+
26  Print("ERROR: ");
+
27  if (s1) Print(s1);
+
28  if (s2) Print(s2);
+
29  Print("\n\n");
+
30  return 0;
+
31 }
+
32 
+
33 // +-------------------------------------------------------------------+
+
34 
+
35 void TermBool::print(int level) { if (level > 0) Print(val? "true" : "false"); else Print("..."); }
+
36 void TermNumber::print(int level){ if (level > 0) Print("%g", val); else Print("..."); }
+
37 void TermText::print(int level) { if (level > 0) Print("\"%s\"", val.data()); else Print("..."); }
+
38 
+
39 // +-------------------------------------------------------------------+
+
40 
+ +
42 {
+
43  elems = elist;
+
44 }
+
45 
+ +
47 {
+
48  if (elems) elems->destroy();
+
49  delete elems;
+
50 }
+
51 
+
52 void
+
53 TermArray::print(int level)
+
54 {
+
55  if (level > 1) {
+
56  Print("(");
+
57 
+
58  if (elems) {
+
59  for (int i = 0; i < elems->size(); i++) {
+
60  elems->at(i)->print(level-1);
+
61  if (i < elems->size() -1)
+
62  Print(", ");
+
63  }
+
64  }
+
65 
+
66  Print(") ");
+
67  }
+
68  else Print("(...) ");
+
69 }
+
70 
+
71 // +-------------------------------------------------------------------+
+
72 
+ +
74 {
+
75  elems = elist;
+
76 }
+
77 
+ +
79 {
+
80  if (elems) elems->destroy();
+
81  delete elems;
+
82 }
+
83 
+
84 void
+ +
86 {
+
87  if (level > 1) {
+
88  Print("{");
+
89 
+
90  if (elems) {
+
91  for (int i = 0; i < elems->size(); i++) {
+
92  elems->at(i)->print(level-1);
+
93  if (i < elems->size() -1)
+
94  Print(", ");
+
95  }
+
96  }
+
97 
+
98  Print("} ");
+
99  }
+
100  else Print("{...} ");
+
101 }
+
102 
+
103 // +-------------------------------------------------------------------+
+
104 
+ +
106 {
+
107  delete mname;
+
108  delete mval;
+
109 }
+
110 
+
111 void
+
112 TermDef::print(int level)
+
113 {
+
114  if (level >= 0) {
+
115  mname->print(level);
+
116  Print(": ");
+
117  mval->print(level-1);
+
118  }
+
119  else Print("...");
+
120 }
+
121 
+
122 // +-------------------------------------------------------------------+
+
+
+ + + + -- cgit v1.1