SPeCS Packages Documentation
    Preparing search index...

    Class LoggerBase<T>Abstract

    Logger object, for inserting code that prints/saves information to files.

    Not implemented, please ignore

    If set, instead of printing, will insert code for writing output to this file

    Type Parameters

    Hierarchy (View Summary)

    Index
    afterJp: T | undefined = undefined
    currentElements: ElementType[] = []
    filename: string | undefined
    isGlobal: boolean
    printfFormat: Record<number, string | undefined> = ...

    Used for both C and Java printf functions

    Type: Map<string, number> = ...
    • Parameters

      • functionId: string
      • nameGenerator: () => string

        Function that receives no arguments and generates a new name

      Returns { alreadyDeclared: boolean; name: string }

    • Inserts the given code before/after the given join point.

      Override this method if you need to specialize the insertion.

      Parameters

      • $jp: T
      • insertBefore: boolean
      • code: string

      Returns void

    • Generates printf like code for c and java

      Parameters

      • printFunctionName: string

        The name of the function to use (printf for C, System.out.println for Java)

      • prefix: string = "("
      • suffix: string = ");"
      • delimiter: string = '"'

      Returns string

    • Verifies that the given $jp is inside a function.

      Requires global attribute 'ancestor'.

      Parameters

      • $jp: any
      • functionJpName: string = "function"

      Returns boolean

      true if $jp is inside a function, false otherwise