Class OctaveEngine.PackageDesc

  • Enclosing class:
    OctaveEngine

    public static class OctaveEngine.PackageDesc
    extends Object
    Representation of a package as returned by the octave command pkg('list') which returns a cell array of structs with fields reflected by the fields of this class. Thus the constructor has a struct as parameter and is the only place to initialize the fields which are all public and final.

    Most of the fields are defined by the DESCRIPTION file in the package as described in the manual 5.2.0, Section 37.4.1. There are mandatory fields, optional fields and there may be fields in the struct which are not documented. Currently, these are not reflected in this class.

    • Field Detail

      • name

        public final String name
        The name of the package in lower case, no matter how it is written in the DESCRIPTION FILE.
      • version

        public final String version
        A version string which typically consists of numbers separated by dots but may also contain +, - and ~. Documentation of function compare_versions shows that the form is more restricted. TBD: bugreport that versions shall be comparable.
      • date

        public final String date
        The date in iso form yyyy-mm-dd. TBD: add this to manual: make comparable. Also: seems reasonable, to allow time also. TBD: entry in manual
      • author

        public final String author
        The name of the original author, convention (TBC) name , if more than one, separated by comma.
      • dir

        public final File dir
      • archprefix

        public final File archprefix
      • isLoaded

        public final boolean isLoaded
        Whether the package is loaded. This has nothing to do with the DESCRIPTION file.
    • Constructor Detail

      • PackageDesc

        PackageDesc​(OctaveStruct pkg)
        Creates a new package description from the given struct.
        Parameters:
        pkg - a struct representing a package which has a predefined set of mandatory fields, a predefined set of optional fields and which may have also additional fields going beyond what is documented.