net.sf.latexdraw.parsers.svg.parsers
Class AbstractSVGParser

java.lang.Object
  extended by net.sf.latexdraw.parsers.CodeParser
      extended by net.sf.latexdraw.parsers.svg.parsers.AbstractSVGParser
All Implemented Interfaces:
Parser
Direct Known Subclasses:
SVGNumberParser, SVGPointsParser, URIReferenceParser

public abstract class AbstractSVGParser
extends CodeParser

Defines a model for the SVG parsers.

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

Since:
2.0.0
Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
 
Fields inherited from class net.sf.latexdraw.parsers.CodeParser
codeCore, EOC
 
Constructor Summary
AbstractSVGParser(java.lang.String code)
          The constructor.
 
Method Summary
 boolean isComment()
           
 boolean isWSP()
           
 java.lang.String skipComment()
          Skips the comment.
 void skipWSP()
          Skips the useless characters.
 void skipWSPComma()
          Skips the useless characters and a possible comma.
 
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
 
Methods inherited from interface net.sf.latexdraw.parsers.Parser
parse
 

Constructor Detail

AbstractSVGParser

public AbstractSVGParser(java.lang.String code)
The constructor.

Parameters:
code - The path to parse.
Method Detail

isComment

public boolean isComment()
Specified by:
isComment in class CodeParser
Returns:
True if the current position points to a comment token.

isWSP

public boolean isWSP()
Specified by:
isWSP in class CodeParser
Returns:
True if the current character is a whitespace/ignorable character.

skipWSP

public void skipWSP()
Description copied from class: CodeParser
Skips the useless characters.

Specified by:
skipWSP in class CodeParser

skipWSPComma

public void skipWSPComma()
Skips the useless characters and a possible comma.


skipComment

public java.lang.String skipComment()
Description copied from class: CodeParser
Skips the comment.

Specified by:
skipComment in class CodeParser
Returns:
The read comment.