Commit 2c8b5158 authored by Panagiotis Skarvelis's avatar Panagiotis Skarvelis
Browse files

add init for seqtypes

parent 7faba505
......@@ -10,12 +10,15 @@ import sequence from './sequence.js';
* @class FileEngine
* @implements AuditEngine
* @param {string} path - path to store the records
* @param {SEQTYPES} pnseqtype - protocol number sequence type
*/
export class FileEngine implements AuditEngine {
#path: string
#pnseqtype:SEQTYPES
constructor(path: string) {
constructor(path: string, pnseqtype?: SEQTYPES) {
this.#path = path;
this.#pnseqtype = pnseqtype || "innumerable";
}
/**
......@@ -77,7 +80,7 @@ export class FileEngine implements AuditEngine {
*/
pn(type?:SEQTYPES, path?: string): string {
const protocol_save_path = path || this.#path;
const sequence_type = type || "innumerable";
const sequence_type = type || this.#pnseqtype;
try {
return protocol(protocol_save_path,sequence_type)
} catch (error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment