com.fuckingbrit.q3astats
Class StatParser

java.lang.Object
  |
  +--com.fuckingbrit.q3astats.StatParser

public class StatParser
extends java.lang.Object

The StatParser is the core engine of the q3astats package. It provides the functionality for the system. It brings together the concept of a LogOwner, Game, optionaly a PreParser and ties them together to parse a qconsole.log file.

Version:
1.1
Author:
Michael Jervis (mike@fuckingbrit.com)

Constructor Summary
StatParser(LogOwner PrimaryPlayer, Game definition, java.io.BufferedReader logFile)
          Basic constructor.
StatParser(LogOwner PrimaryPlayer, Game definition, java.io.BufferedReader logFile, PreParser preParser)
          Prefered constructor, this one allows you to provide a pre-parser to remove the damned fluff from the log file.
 
Method Summary
 void parse()
          This method does the work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatParser

public StatParser(LogOwner PrimaryPlayer,
                  Game definition,
                  java.io.BufferedReader logFile)
Basic constructor. This just takes a player name, game definition and logfile and parses it. it will do the job, but the log files are FULL of fluff, and a pre-parser would be a bloody good idea if you ask me, and if you're reading this then you did.

Parameters:
PrimaryPlayer - the Primary Player
definition - a definition of a game
logFile - a reader for the log file ready to go.

StatParser

public StatParser(LogOwner PrimaryPlayer,
                  Game definition,
                  java.io.BufferedReader logFile,
                  PreParser preParser)
Prefered constructor, this one allows you to provide a pre-parser to remove the damned fluff from the log file. Since each line of the log is going to have to be regexp'd multiple times to match against all weapons and hits, this de-fluffing will give a SIGNIFICANT performance boost saving:
fluffLineCount * (hitTypes + killTypes)
regexp operations.

Parameters:
PrimaryPlayer - primary player
definition - a game definition, this is referenced, so don't go
logFile - a reader for the log file
preParser - the pre-parser to strip the fluff
Method Detail

parse

public void parse()
           throws QuakeParseException
This method does the work. It will read every line from the logFile and compare it to each hit and kill type in the game definition.

When this is done, simply save your LogOwner.

QuakeParseException