Table of Contents

Class: SourceStat | eric3/UI/CodeMetrics.py
--- | ---

Class used to calculate and store the source code statistics.

Methods |
--- | ---
__init__ dedent dump getCounter inc indent push
| __init__

    __init__ ( self )

Constructor

| dedent

    dedent ( self,  tok )

### Public method used to decrement the indentation level.

#### Arguments

tok
  the token to be processed (Token)

Exceptions |
--- | ---
ValueError( "INTERNAL ERROR: Negative indent level" )

| dump

    dump ( self )

Public method used to format and print the collected statistics.

| getCounter

    getCounter (
            self,
            id,
            key,
            )

### Public method used to get a specific counter value.

#### Arguments

id
  id of the counter (string)
key
  key of the value to be retrieved (string)

#### Returns

the value of the requested counter (int)

| inc

    inc (
            self,
            key,
            value=1,
            )

### Public method used to increment the value of a key.

#### Arguments

key
  the key to be incremented
value
  the increment (int)

| indent

    indent ( self,  tok )

### Public method used to increment the indentation level.

#### Arguments

tok
  a token (Token, ignored)

| push

    push (
            self,
            identifier,
            row,
            )

### Public method used to store an identifier.

#### Arguments

identifier
  the identifier to be remembered (string)
row
  the row, the identifier is defined in (int)

Table of Contents

This document was automatically generated by HappyDoc version 2.1