pddl-workspace
Version:
76 lines (75 loc) • 2.31 kB
TypeScript
import { FileInfo } from "./FileInfo";
import { DocumentPositionResolver } from "./DocumentPositionResolver";
import { PddlLanguage } from "./language";
import { URI } from "vscode-uri";
export declare enum HappeningType {
/** Action start. */
START = 0,
/** Action end */
END = 1,
/** Instantaneous (non-durative) action */
INSTANTANEOUS = 2,
/** Timed-action e.g. time-initial literal/fluent. */
TIMED = 3
}
/**
* Plan happenings file.
*/
export declare class HappeningsInfo extends FileInfo {
problemName: string;
domainName: string;
private happenings;
constructor(fileUri: URI, version: number, problemName: string, domainName: string, text: string, positionResolver: DocumentPositionResolver);
getLanguage(): PddlLanguage;
setHappenings(happenings: Happening[]): void;
getHappenings(): Happening[];
isHappenings(): boolean;
}
/**
* Single plan happening e.g. a thing that happens at a given time.
*/
export declare class Happening {
private time;
private type;
private fullActionName;
readonly counter: number;
readonly lineIndex?: number | undefined;
private actionName;
objects: string[];
/**
* Constructs happening instance.
* @param time happening time
* @param type happening type
* @param fullActionName action name including parameter names
* @param counter same happening counter
* @param lineIndex line index in the file
*/
constructor(time: number, type: HappeningType, fullActionName: string, counter: number, lineIndex?: number | undefined);
/**
* Happening time.
*/
getTime(): number;
/**
* Happening type: start/end/instantaneous/til/tif
*/
getType(): HappeningType;
/**
* Action name without parameters.
*/
getAction(): string;
/**
* Action name with parameters.
*/
getFullActionName(): string;
/**
* Counter for the equivalent actions within the same plan.
*/
getCounter(): number;
/**
* Returns true if this happening belongs to the other happening.
* It is decided by comparing the full action name and the counter.
*/
belongsTo(other: Happening): boolean;
toString(): string;
toHappeningType(type: HappeningType): string;
}