|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.parsers.CodeParser
net.sf.latexdraw.parsers.svg.parsers.AbstractSVGParser
net.sf.latexdraw.parsers.svg.parsers.SVGNumberParser
public class SVGNumberParser
Defines a SVG number parser.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
10/20/07
Field Summary |
---|
Fields inherited from class net.sf.latexdraw.parsers.CodeParser |
---|
codeCore, EOC |
Constructor Summary | |
---|---|
SVGNumberParser(java.lang.String code)
The constructor. |
Method Summary | |
---|---|
protected boolean |
isNumber(boolean unsigned)
|
void |
parse()
Launches the parsing. |
boolean |
parseFlag()
Parses a flag (a boolean). |
double |
parseNumber(boolean unsigned)
Parses a number (a double). |
java.lang.String |
parseNumberAsString(boolean unsigned)
Parses a number (a double). |
Methods inherited from class net.sf.latexdraw.parsers.svg.parsers.AbstractSVGParser |
---|
isComment, isWSP, skipComment, skipWSP, skipWSPComma |
Methods inherited from class net.sf.latexdraw.parsers.CodeParser |
---|
getChar, getCharAt, getCode, getCodeCore, getLinePosition, getPosition, incLinePosition, initialise, isEOC, isEOL, nextChar, setCode, setCodeCore, setLinePosition, setPosition, skipWSPComments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SVGNumberParser(java.lang.String code)
code
- The code to parse.Method Detail |
---|
public boolean parseFlag() throws java.text.ParseException
java.text.ParseException
- If an error occurs.public java.lang.String parseNumberAsString(boolean unsigned) throws java.text.ParseException
unsigned
- True: the parsed number must be unsigned.
java.text.ParseException
- If an error occurs or if the parsed number is signed and unsigned
is true.public double parseNumber(boolean unsigned) throws java.text.ParseException
unsigned
- True: the parsed number must be unsigned.
java.text.ParseException
- If an error occurs or if the parsed number is signed and unsigned
is true.protected boolean isNumber(boolean unsigned)
unsigned
- True: the next number must not have a sign.
public void parse() throws java.text.ParseException
Parser
java.text.ParseException
- If an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |