cppncss.counter
Class AbstractCounter

java.lang.Object
  extended by cppast.AbstractVisitor
      extended by cppncss.counter.AbstractCounter
All Implemented Interfaces:
ParserVisitor, Counter
Direct Known Subclasses:
CcnCounter, FunctionCounter, NcssCounter

public class AbstractCounter
extends AbstractVisitor
implements Counter

Factorizes counters common behaviours.

Author:
Mathieu Champlon

Constructor Summary
AbstractCounter(java.lang.String label, CounterObserver observer)
          Create an abstract counter.
 
Method Summary
 void flush(java.lang.String item, int line)
          Notify the end of a measure.
protected  void increment()
          Increments the counter.
 
Methods inherited from class cppast.AbstractVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cppast.ParserVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 

Constructor Detail

AbstractCounter

public AbstractCounter(java.lang.String label,
                       CounterObserver observer)
Create an abstract counter.

Parameters:
label - the name of the measure
observer - a counter observer
Method Detail

flush

public final void flush(java.lang.String item,
                        int line)
Notify the end of a measure.

Specified by:
flush in interface Counter
Parameters:
item - the item measured
line - the location of the item

increment

protected final void increment()
Increments the counter.



Copyright © 2006-2007 null. All Rights Reserved.