-
Notifications
You must be signed in to change notification settings - Fork 0
Catalogue
asyndeton edited this page Jul 14, 2016
·
3 revisions
Die Klasse Catalogue stellt den Katalog als Ganzes dar. Dazu hält sie eine Liste von Project-Instanzen bereit. Öffentliche Member:
// Construktor
public Catalogue();
// Get the list of associated projects. Use getProjects().add(...) to add one.
public List<Project> getProjects();
Die Klasse Project stellt ein zu realisierendes Programmierprojekt dar. Dazu hält sie
- einen Projekttitel
- Arbeitsanweisungen
- Testvorlagen und
- Implementierungsvorlagen
Öffentliche Member:
// Create an empty project
public Project(String title);
// Get the template list. Templates may be added using getTemplates().add(...);
public List<CodeTemplate> getTemplates();
// Get test templates only. Don't try to use add() on this one.
public List<CodeTemplate> getTestTemplates();
// Get implementation templates only. Don't try to use add() on this one
public List<CodeTemplate> getImplementationTemplates();
// Get the project title
public String getTitle();
// Get the project instructions
public String getInstructions();
// Append further instructions. Spaces are added automatically.
public void appendInstructions(String newInstr);
Dabei liefert getTemplates() einfach die gesamte Liste aller CodeTemplates, während getTestTemplates() und getImplementationTemplates() diese erst entsprechend filtern.
Die Klasse CodeTemplate stellt eine Vorlage für eine Klasse dar. Dazu hält sie
- initialen Quelltext
- einen Dateinamen und
- die Kategorie der Klasse, also Test oder Implementierung
Für die Kategorie existiert folgende selbsterklärende Enumeration:
public static enum Category {
Test,
Implementation
}
Die öffentlichen Member von CodeTemplate sind:
// Constructor
public CodeTemplate(Category category, String filename, String content);
// Is this a test or an implementation template?
public Category getCategory();
// Preferred filename for this template
public String getFilename();
// The actual code
public String getContent();
\o/ Two Finger Joe \o/
Verzeichnis
Catalogue
- [Dateiformat](Catalogue.cfg Format)
- ParseSource
- ParseHelper
- CatalogueReader
- Catalogue, Project, ...
Controller
- Logic
- [Main Controller](Main Controller)
- [Project Controller](Project Controller)
File Interaction
Tracking