UNPKG

@specs-feup/clava

Version:

A C/C++ source-to-source compiler written in Typescript

50 lines 2.41 kB
import LoggerBase from "@specs-feup/lara/api/lara/code/LoggerBase.js"; import { Expression, FileJp, FunctionJp, Joinpoint } from "../../Joinpoints.js"; export default class Logger extends LoggerBase<Joinpoint> { private _isCxx; constructor(isGlobal?: boolean, filename?: string); /** * Adds code that prints the message built up to that point with the append() functions. * */ log($jp: Joinpoint, insertBefore?: boolean): this | undefined; /** * Appends an expression that represents a long long. * * @param expr - the expression to append * @returns The current logger instance */ appendLongLong(expr: Expression | string): this; /** * Appends an expression that represents a long long. * * @param expr - the expression to append * @returns The current logger instance */ longLong(expr: Expression | string): this; /**** PRIVATE METHODS ****/ /** * Checks the initial constrains before executing the actual log (ancestor function, minimum of elements to log, defines the value of insertBefore) * Should be called on the beggining of each implementation of log * * @returns Undefined on failure and a $function instance if successful */ _logSetup($jp: Joinpoint, insertBefore?: boolean): FunctionJp | undefined; _log_cxx($file: FileJp, $function: FunctionJp): string; _log_cxx_specslogger($file: FileJp, $function: FunctionJp): string; /** * Sets up the code for the Logger in the file and function that is called */ _setup_cxx_specslogger($file: FileJp, $function: FunctionJp): string; _log_cxx_stdcpp($file: FileJp, $function: FunctionJp): string; _setup_cxx_stdcpp_console($file: FileJp, $function: FunctionJp): string; _setup_cxx_stdcpp_file($file: FileJp, $function: FunctionJp): string; _log_c($file: FileJp, $function: FunctionJp): string; _log_c_console($file: FileJp, $function: FunctionJp): string; _log_c_file($file: FileJp, $function: FunctionJp): string; _log_c_file_setup($file: FileJp, $function: FunctionJp): string; _insertCode($jp: Joinpoint, insertBefore: boolean, code: string): void; _clava_logger_filename_declaration(varname: string, filename: string): string; _clava_logger_filename_declaration_cpp(streamName: string, filename: string): string; } //# sourceMappingURL=Logger.d.ts.map