prjbase/src/ChangeSet.i3


---------------------------------------------------------------------------
INTERFACE ChangeSet;

IMPORT Rd, Wr, Time, TextSeq, TextTextTbl;
A ChangeSet.T is a named set of three-tuples: (packagename, pre-change-tag, post-change-tag) with an optional textual description.

---------------------------------------------------------------------------

CONST Brand = "Elego ComPact change set description class";
---------------------------------------------------------------------------
EXCEPTION Error(TEXT);
---------------------------------------------------------------------------
TYPE
  T <: Public;

  Public = OBJECT
  METHODS
    (*-----------------------------------------------------------------------*)
    init(name : TEXT) : T;

    (*-----------------------------------------------------------------------*)
    getName() : TEXT;

    (*-----------------------------------------------------------------------*)
    getDate() : Time.T;

    (*-----------------------------------------------------------------------*)
    getUser() : TEXT;

    (*-----------------------------------------------------------------------*)
    description() : TEXT;

    (*-----------------------------------------------------------------------*)
    packages() : TextSeq.T;

    (*-----------------------------------------------------------------------*)
    preState() : TextTextTbl.T;

    (*-----------------------------------------------------------------------*)
    postState() : TextTextTbl.T;

    (*-----------------------------------------------------------------------*)
    setName(name : TEXT);

    (*-----------------------------------------------------------------------*)
    setDate(date : Time.T);

    (*-----------------------------------------------------------------------*)
    setUser(user : TEXT);

    (*-----------------------------------------------------------------------*)
    setDescription(desc : TEXT);

    (*-----------------------------------------------------------------------*)
    add(pkg, pre, post: TEXT);

    (*-----------------------------------------------------------------------*)
    getPreTag(pkg : TEXT) : TEXT;

    (*-----------------------------------------------------------------------*)
    getPostTag(pkg : TEXT) : TEXT;

    (*-----------------------------------------------------------------------*)
    parse(rd : Rd.T; fn : TEXT := "unknown") RAISES {Error};

    (*-----------------------------------------------------------------------*)
    read(fn : TEXT) RAISES {Error};

    (*-----------------------------------------------------------------------*)
    write(wr : Wr.T; fn : TEXT := "unknown") RAISES {Error};

    (*-----------------------------------------------------------------------*)
    save(fn : TEXT) RAISES {Error};

    (*-----------------------------------------------------------------------*)
    toText() : TEXT;

    (*-----------------------------------------------------------------------*)
    logText() : TEXT;

  END;

END ChangeSet.