Home /Modules/operating-system/SLArchitectureSet.sleela

SLArchitectureSet.sleela

lib/operating-system/SLArchitectureSet.sleela · 85 line(s) · sleela

<< lib/operating-system/SLArchitectureSet.sleela
   SLeeLa Standard Library Definition.
   Definition: Defines SLArchitectureSet — the set of target CPU architectures
     an OS being constructed is built for. A modern distribution is multi-arch:
     the same OS composition is realised for amd64, arm64, and others. This
     class holds a primary architecture plus a manifest of additional targets,
     so the ISO builder can emit one image per architecture from a single model.
   
   It composes SLOSArchitecture (one entry per target) and records the primary
   target the single-ISO path uses when the caller does not ask for every arch.
   
   Family: operating-system. Pure design model; no native bridge calls. >>
#sleela 2.5
material;
class SLArchitectureSet {
  < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
  << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
     or catalog can read and (where appropriate) override this record.
     Values are faithful to the subject's real origin where publicly known. >>
  String metaVersion = "1.0.0";
  int metaId = 10968;
  String metaAuthor = "Kiro Agent";
  String metaDate = "2026-10-16";
  String metaCopyright = "SLeeLa project";
  String metaTrademark = "none";
  String metaCorporation = "none";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "International";
  String metaBirthDate = "2026-10-10";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 9;
  < metaNationalSchedule: a real, citable instrument or "none" >
  String metaNationalSchedule = "none";

  String getMetaVersion() { return metaVersion; }
  void setMetaVersion(String v) { metaVersion = v; }
  int getMetaId() { return metaId; }
  void setMetaId(int v) { metaId = v; }
  String getAuthor() { return metaAuthor; }
  void setAuthor(String v) { metaAuthor = v; }
  String getDate() { return metaDate; }
  void setDate(String v) { metaDate = v; }
  String getCopyright() { return metaCopyright; }
  void setCopyright(String v) { metaCopyright = v; }
  String getTrademark() { return metaTrademark; }
  void setTrademark(String v) { metaTrademark = v; }
  String getCorporation() { return metaCorporation; }
  void setCorporation(String v) { metaCorporation = v; }
  String getOrigin() { return metaOrigin; }
  void setOrigin(String v) { metaOrigin = v; }
  String getBirthDate() { return metaBirthDate; }
  void setBirthDate(String v) { metaBirthDate = v; }
  int getScienceRating() { return metaScienceRating; }
  void setScienceRating(int v) { metaScienceRating = v; }
  String getNationalSchedule() { return metaNationalSchedule; }
  void setNationalSchedule(String v) { metaNationalSchedule = v; }
  SLOSArchitecture primary;
  < newline-separated package-arch labels >
  String targets;
  int count;
  int configured;

  void configure(SLOSArchitecture primaryArch) {
    primary = primaryArch; targets = primaryArch.arch(); count = 1; configured = 1;
  }

  < Convenience: configure directly from a package-arch label. >
  void configureLabel(String arch) {
    SLOSArchitecture a = new SLOSArchitecture();
    a.configure(arch);
    configure(a);
  }

  < Add another target architecture by label. >
  void addTarget(String arch) {
    targets = targets + "\n" + arch;
    count = count + 1;
  }

  SLOSArchitecture primaryArch() { return primary; }
  String targetManifest()        { return targets; }
  int targetCount()              { return count; }
  boolean isMultiArch()          { return count > 1; }
}