Tue, 14 Feb 2017 09:53:13 +0200
Rearranged declarations in basics.h
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | /* |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | * LDForge: LDraw parts authoring CAD |
1072 | 3 | * Copyright (C) 2013 - 2017 Teemu Piippo |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | * |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | * This program is free software: you can redistribute it and/or modify |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation, either version 3 of the License, or |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | * |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | * |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | */ |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | |
998 | 19 | #include <QMessageBox> |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
20 | #include "colors.h" |
1012 | 21 | #include "ldpaths.h" |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
22 | |
1114
ffd49a28f49e
Moved some global constants into appropriate namespaces.
Teemu Piippo <teemu@hecknology.net>
parents:
1086
diff
changeset
|
23 | ColorData* LDColor::colorData = nullptr; |
ffd49a28f49e
Moved some global constants into appropriate namespaces.
Teemu Piippo <teemu@hecknology.net>
parents:
1086
diff
changeset
|
24 | const LDColor LDColor::nullColor {-1}; |
946 | 25 | |
1044 | 26 | /* |
27 | * initColors | |
28 | * | |
29 | * Initializes the color information module. | |
30 | */ | |
1114
ffd49a28f49e
Moved some global constants into appropriate namespaces.
Teemu Piippo <teemu@hecknology.net>
parents:
1086
diff
changeset
|
31 | void LDColor::initColors() |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
32 | { |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | print ("Initializing color information.\n"); |
998 | 34 | static ColorData colors; |
1114
ffd49a28f49e
Moved some global constants into appropriate namespaces.
Teemu Piippo <teemu@hecknology.net>
parents:
1086
diff
changeset
|
35 | LDColor::colorData = &colors; |
946 | 36 | } |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
37 | |
1044 | 38 | /* |
39 | * LDColor :: LDColor | |
40 | * | |
41 | * Default-constructs an LDColor to 0 (black). | |
42 | */ | |
43 | LDColor::LDColor() : | |
44 | m_index (0) {} | |
45 | ||
46 | /* | |
47 | * LDColor :: LDColor | |
48 | * | |
49 | * Constructs an LDColor by index. | |
50 | */ | |
51 | LDColor::LDColor (qint32 index) | |
52 | : m_index (index) {} | |
53 | ||
54 | /* | |
55 | * LDColor :: isValid | |
56 | * | |
57 | * Returns whether or not the color is valid. | |
58 | */ | |
946 | 59 | bool LDColor::isValid() const |
60 | { | |
998 | 61 | if (isLDConfigColor() and data().name.isEmpty()) |
946 | 62 | return false; // Unknown LDConfig color |
1044 | 63 | else |
64 | return m_index != -1; | |
795
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
65 | } |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
66 | |
1044 | 67 | /* |
68 | * LDColor :: isLDConfigColor | |
69 | * | |
70 | * Returns whether or not this color is defined in LDConfig.ldr. | |
71 | * This is false for e.g. direct colors. | |
72 | */ | |
946 | 73 | bool LDColor::isLDConfigColor() const |
795
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
74 | { |
1044 | 75 | return colorData->contains(index()); |
998 | 76 | } |
77 | ||
1044 | 78 | /* |
79 | * LDColor :: data | |
80 | * | |
81 | * Returns the ColorData entry for this color. | |
82 | */ | |
998 | 83 | const ColorData::Entry& LDColor::data() const |
84 | { | |
1044 | 85 | return colorData->get(index()); |
795
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
86 | } |
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
87 | |
1044 | 88 | /* |
89 | * LDColor :: name | |
90 | * | |
91 | * Returns the name of this color. | |
92 | */ | |
946 | 93 | QString LDColor::name() const |
795
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
94 | { |
946 | 95 | if (isDirect()) |
96 | return "0x" + QString::number (index(), 16).toUpper(); | |
97 | else if (isLDConfigColor()) | |
998 | 98 | return data().name; |
946 | 99 | else if (index() == -1) |
100 | return "null color"; | |
101 | else | |
1044 | 102 | return "unknown"; |
946 | 103 | } |
104 | ||
1044 | 105 | /* |
106 | * LDColor :: hexcode | |
107 | * | |
108 | * Returns the hexadecimal code of this color. | |
109 | */ | |
946 | 110 | QString LDColor::hexcode() const |
111 | { | |
112 | return faceColor().name(); | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
113 | } |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
114 | |
1044 | 115 | /* |
116 | * LDColor :: faceColor | |
117 | * | |
118 | * Returns the color used for surfaces. | |
119 | */ | |
946 | 120 | QColor LDColor::faceColor() const |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
121 | { |
946 | 122 | if (isDirect()) |
123 | { | |
1044 | 124 | // Direct color -- compute from the index. |
946 | 125 | QColor color; |
1044 | 126 | color.setRed((index() & 0x0FF0000) >> 16); |
127 | color.setGreen((index() & 0x000FF00) >> 8); | |
128 | color.setBlue(index() & 0x00000FF); | |
946 | 129 | |
130 | if (index() >= 0x3000000) | |
1044 | 131 | color.setAlpha(128); |
946 | 132 | |
133 | return color; | |
134 | } | |
135 | else if (isLDConfigColor()) | |
136 | { | |
998 | 137 | return data().faceColor; |
946 | 138 | } |
139 | else | |
140 | { | |
141 | return Qt::black; | |
142 | } | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
143 | } |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
144 | |
1044 | 145 | /* |
146 | * LDColor :: edgeColor | |
147 | * | |
148 | * Returns the color used for edge lines. | |
149 | */ | |
946 | 150 | QColor LDColor::edgeColor() const |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
151 | { |
946 | 152 | if (isDirect()) |
1044 | 153 | return luma(faceColor()) < 48 ? Qt::white : Qt::black; |
946 | 154 | else if (isLDConfigColor()) |
998 | 155 | return data().edgeColor; |
946 | 156 | else |
157 | return Qt::black; | |
158 | } | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
159 | |
1044 | 160 | /* |
161 | * LDColor :: index | |
162 | * | |
163 | * Returns the index number of this color. | |
164 | */ | |
946 | 165 | qint32 LDColor::index() const |
166 | { | |
167 | return m_index; | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
168 | } |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
169 | |
1044 | 170 | /* |
171 | * LDColor :: indexString | |
172 | * | |
173 | * Returns a string containing the preferred representation of the index. | |
174 | */ | |
806
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
175 | QString LDColor::indexString() const |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
176 | { |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
177 | if (isDirect()) |
1044 | 178 | { |
179 | // Use hexadecimal notation for direct colors. | |
180 | return "0x" + QString::number(index(), 16).toUpper(); | |
181 | } | |
182 | else | |
183 | { | |
184 | return QString::number(index()); | |
185 | } | |
806
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
186 | } |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
187 | |
1044 | 188 | /* |
189 | * LDColor :: isDirect | |
190 | * | |
191 | * Returns whether or not this color is a direct color. | |
192 | * Direct colors are picked by RGB value and are not defined in LDConfig.ldr. | |
193 | */ | |
806
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
194 | bool LDColor::isDirect() const |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
195 | { |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
196 | return index() >= 0x02000000; |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
197 | } |
4240f47aa2d4
- moved most of LDColorData API into LDColor
Santeri Piippo <crimsondusk64@gmail.com>
parents:
797
diff
changeset
|
198 | |
1044 | 199 | /* |
200 | * qHash | |
201 | * | |
202 | * LDColors are hashed by their index. | |
203 | */ | |
1031
55c0d3beea0d
removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
204 | uint qHash(LDColor color) |
55c0d3beea0d
removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
205 | { |
55c0d3beea0d
removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
206 | return color.index(); |
55c0d3beea0d
removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
207 | } |
55c0d3beea0d
removed removeDuplicates in favor of QSet, and the unused ObjectList class
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
208 | |
1044 | 209 | /* |
210 | * luma | |
211 | * | |
212 | * Calculates the luma-value for the given color. | |
213 | * c.f. https://en.wikipedia.org/wiki/Luma_(video) | |
214 | */ | |
215 | int luma (const QColor& color) | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
216 | { |
1044 | 217 | return round((0.2126 * color.red()) + (0.7152 * color.green()) + (0.0722 * color.blue())); |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
218 | } |
795
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
219 | |
1044 | 220 | /* |
221 | * ColorData :: ColorData | |
222 | * | |
223 | * Constructs the color data array. | |
224 | */ | |
998 | 225 | ColorData::ColorData() |
795
195fa1fff9c3
- changed all color usage to use LDColor classes instead of color indices. Added support for direct colors.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
706
diff
changeset
|
226 | { |
998 | 227 | // Initialize main and edge colors, they're special like that. |
1044 | 228 | m_data[MainColor].faceColor = "#AAAAAA"; |
998 | 229 | m_data[MainColor].edgeColor = Qt::black; |
230 | m_data[MainColor].name = "Main color"; | |
231 | m_data[EdgeColor].faceColor = | |
1044 | 232 | m_data[EdgeColor].edgeColor = "#000000"; |
998 | 233 | m_data[EdgeColor].name = "Edge color"; |
1044 | 234 | |
235 | // Load the rest from LDConfig.ldr. | |
998 | 236 | loadFromLdconfig(); |
237 | } | |
238 | ||
1044 | 239 | /* |
240 | * ColorData :: contains | |
241 | * | |
242 | * Returns whether or not the given color index is present in the array. | |
243 | */ | |
244 | bool ColorData::contains(int code) const | |
946 | 245 | { |
1065
c8ecddbd99e9
Actually, let's call it countof(). Makes more sense.
Teemu Piippo <teemu@hecknology.net>
parents:
1063
diff
changeset
|
246 | return code >= 0 and code < countof(m_data); |
998 | 247 | } |
248 | ||
1044 | 249 | /* |
250 | * ColorData :: get | |
251 | * | |
252 | * Returns an entry in the color array. | |
253 | */ | |
254 | const ColorData::Entry& ColorData::get(int code) const | |
998 | 255 | { |
1044 | 256 | if (not contains(code)) |
257 | throw std::runtime_error {"Attempted to get non-existant color information"}; | |
946 | 258 | |
998 | 259 | return m_data[code]; |
260 | } | |
261 | ||
1044 | 262 | /* |
263 | * ColorData :: loadFromLdconfig | |
264 | * | |
265 | * Loads color information from LDConfig.ldr. | |
266 | */ | |
998 | 267 | void ColorData::loadFromLdconfig() |
268 | { | |
1012 | 269 | QString path = LDPaths::ldConfigPath(); |
1044 | 270 | QFile file {path}; |
998 | 271 | |
1044 | 272 | if (not file.open (QIODevice::ReadOnly)) |
946 | 273 | { |
1044 | 274 | QMessageBox::critical(nullptr, "Error", "Unable to open LDConfig.ldr for parsing: " + file.errorString()); |
946 | 275 | return; |
276 | } | |
277 | ||
998 | 278 | // TODO: maybe LDConfig can be loaded as a Document? Or would that be overkill? |
1044 | 279 | while (not file.atEnd()) |
946 | 280 | { |
1044 | 281 | QString line = QString::fromUtf8 (file.readLine()); |
946 | 282 | |
283 | if (line.isEmpty() or line[0] != '0') | |
284 | continue; // empty or illogical | |
285 | ||
1044 | 286 | line.remove('\r'); |
287 | line.remove('\n'); | |
946 | 288 | |
289 | // Parse the line | |
1044 | 290 | LDConfigParser parser = {line}; |
998 | 291 | QString name; |
292 | QString facename; | |
293 | QString edgename; | |
294 | QString codestring; | |
946 | 295 | |
296 | // Check 0 !COLOUR, parse the name | |
1044 | 297 | if (not parser.compareToken(0, "0") or not parser.compareToken(1, "!COLOUR") or not parser.getToken(name, 2)) |
946 | 298 | continue; |
299 | ||
300 | // Replace underscores in the name with spaces for readability | |
1044 | 301 | name.replace("_", " "); |
946 | 302 | |
998 | 303 | if (not parser.parseTag ("CODE", codestring)) |
946 | 304 | continue; |
305 | ||
306 | bool ok; | |
1044 | 307 | int code = codestring.toShort(&ok); |
946 | 308 | |
1044 | 309 | if (not ok or not contains(code)) |
946 | 310 | continue; |
311 | ||
1044 | 312 | if (not parser.parseTag("VALUE", facename) or not parser.parseTag("EDGE", edgename)) |
946 | 313 | continue; |
314 | ||
315 | // Ensure that our colors are correct | |
1044 | 316 | QColor faceColor = {facename}; |
317 | QColor edgeColor = {edgename}; | |
946 | 318 | |
319 | if (not faceColor.isValid() or not edgeColor.isValid()) | |
320 | continue; | |
321 | ||
1044 | 322 | // Fill in the entry now. |
998 | 323 | Entry& entry = m_data[code]; |
946 | 324 | entry.name = name; |
325 | entry.faceColor = faceColor; | |
326 | entry.edgeColor = edgeColor; | |
998 | 327 | |
1044 | 328 | // If the alpha tag is present, fill in that too. |
329 | if (parser.parseTag("ALPHA", codestring)) | |
330 | entry.faceColor.setAlpha(qBound(0, codestring.toInt(), 255)); | |
946 | 331 | } |
332 | } | |
333 | ||
1044 | 334 | /* |
335 | * LDConfigParser :: LDConfigParser | |
336 | * | |
337 | * Constructs the LDConfig.ldr parser. | |
338 | */ | |
339 | LDConfigParser::LDConfigParser(QString inputText) | |
946 | 340 | { |
1044 | 341 | m_tokens = inputText.split (' ', QString::SkipEmptyParts); |
946 | 342 | } |
343 | ||
1044 | 344 | /* |
345 | * LDConfigParser :: getToken | |
346 | * | |
347 | * Returns whether or not there is a token at the given position. | |
348 | * If there is, fills in the value parameter with it. | |
349 | */ | |
350 | bool LDConfigParser::getToken(QString& tokenText, int position) | |
946 | 351 | { |
1065
c8ecddbd99e9
Actually, let's call it countof(). Makes more sense.
Teemu Piippo <teemu@hecknology.net>
parents:
1063
diff
changeset
|
352 | if (position >= countof(m_tokens)) |
1044 | 353 | { |
946 | 354 | return false; |
1044 | 355 | } |
356 | else | |
357 | { | |
358 | tokenText = m_tokens[position]; | |
359 | return true; | |
360 | } | |
946 | 361 | } |
362 | ||
1044 | 363 | /* |
364 | * LDConfigParser :: findToken | |
365 | * | |
366 | * Attempts to find the provided token in the parsed LDConfig.ldr line. | |
367 | * If found, fills in the first parameter with the position of the token. | |
368 | * | |
369 | * The args parameter specifies how many arguments (i.e. following tokens) the token needs to have. | |
370 | */ | |
371 | bool LDConfigParser::findToken(int& tokenPosition, QString needle, int args) | |
946 | 372 | { |
1065
c8ecddbd99e9
Actually, let's call it countof(). Makes more sense.
Teemu Piippo <teemu@hecknology.net>
parents:
1063
diff
changeset
|
373 | for (int i = 0; i < (countof(m_tokens) - args); ++i) |
946 | 374 | { |
375 | if (m_tokens[i] == needle) | |
376 | { | |
1044 | 377 | tokenPosition = i; |
946 | 378 | return true; |
379 | } | |
380 | } | |
381 | ||
382 | return false; | |
383 | } | |
384 | ||
1044 | 385 | /* |
386 | * LDConfigParser :: compareToken | |
387 | * | |
388 | * Returns whether or not the token at the given position has the given text value. | |
389 | */ | |
390 | bool LDConfigParser::compareToken (int position, QString text) | |
946 | 391 | { |
1044 | 392 | QString token; |
946 | 393 | |
1044 | 394 | if (not getToken(token, position)) |
946 | 395 | return false; |
1044 | 396 | else |
397 | return (token == text); | |
946 | 398 | } |
399 | ||
1044 | 400 | /* |
401 | * LDConfig :: parseTag | |
402 | * | |
403 | * Finds an attribute in the line, and fills in its value. | |
404 | * For instance, if the line contains "ALPHA 128", this function can find the "128" for "ALPHA". | |
405 | * Returns whether or not the attribute was found. | |
406 | */ | |
407 | bool LDConfigParser::parseTag (QString key, QString& value) | |
946 | 408 | { |
1044 | 409 | int position; |
946 | 410 | |
411 | // Try find the token and get its position | |
1044 | 412 | if (not findToken (position, key, 1)) |
413 | { | |
946 | 414 | return false; |
1044 | 415 | } |
416 | else | |
417 | { | |
418 | // Get the token after it and store it in. | |
419 | return getToken (value, position + 1); | |
420 | } | |
421 | } |