SPeCS Packages Documentation
    Preparing search index...

    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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    afterJp: Joinpoint | 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>

    Methods

    • ** PRIVATE METHODS ***

      Parameters

      • message: string | Joinpoint
      • Optionaltype: number

      Returns this

    • Parameters

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

        Function that receives no arguments and generates a new name

      Returns { alreadyDeclared: boolean; name: string }

    • Parameters

      • element: ElementType

      Returns string

    • Parameters

      • message: string

      Returns void

    • Parameters

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

      Returns void

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

      Override this method if you need to specialize the insertion.

      Parameters

      • $jp: Joinpoint
      • 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)

      • Optionalprefix: string
      • Optionalsuffix: string
      • Optionaldelimiter: string

      Returns string

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

      Requires global attribute 'ancestor'.

      Parameters

      • $jp: any
      • OptionalfunctionJpName: string

      Returns boolean

      true if $jp is inside a function, false otherwise

    • Parameters

      • message: string

      Returns void

    • Appends the given string to the current buffer.

      Parameters

      • text: string

        The text to append

      Returns this

      The current logger instance

    • Appends an expression that represents a char.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Appends an expression that represents a double.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Appends an expression that represents a hex number.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Appends an expression that represents a int.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The same as 'append', but adds a new line at the end of the buffer.

      Parameters

      • text: string

        the text to append

      Returns this

      The current logger instance

    • Appends an expression that represents a long.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Appends an expression that represents an octal.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Appends an expression that represents a string.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The same as 'appendChar'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The same as 'appendDouble'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The 'last' join point after .log() is called.

      Returns Joinpoint | undefined

    • The same as 'appendHex'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The same as 'appendInt'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Returns void

    • Appends a new line to the buffer.

      Returns this

      The current logger instance

    • Helper method which call 'log' with 'insertBefore' set to true

      Parameters

      Returns void

    • The same as 'appendLong'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The same as 'appendOctal'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • The same as 'appendString'.

      Parameters

      • expr: string | Joinpoint

        The expression to append

      Returns this

      The current logger instance

    • Appends a tab to the buffer.

      Returns this

      The current logger instance

    • The same as 'append'.

      Parameters

      • text: string

        the text to append

      Returns this

      The current logger instance