Warning: Can't use blame annotator:
svn blame failed on trunk/src/scriptbuilder/structures/events/CADEvent.java: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/structures/events/CADEvent.java @ 47

Revision 47, 1.1 KB checked in by bmcguffin, 9 years ago (diff)

Updated toXML behaviors for several classes to bring final adjustments in line with desired output.

RevLine 
1/*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6package scriptbuilder.structures.events;
7
8import java.util.StringTokenizer;
9import scriptbuilder.structures.ELEMENT;
10import scriptbuilder.structures.I_XML_Writable;
11import scriptbuilder.structures.ScriptEvent;
12import scriptbuilder.structures.XMLWriter;
13
14/**
15 * Data model for a CAD incident event. CAD events have a string description of
16 * what is occurring at that time, and may or may not have sub-events.
17 *
18 * @author Bryan McGuffin
19 */
20public class CADEvent extends ScriptEvent implements I_XML_Writable
21{
22
23    public CADEvent()
24    {
25        super(ScriptEventType.CAD_EVENT);
26    }
27
28    public boolean hasSubEvents = false;
29
30    public String detail = "";
31
32    @Override
33    public String toXML()
34    {
35        StringTokenizer tok = new StringTokenizer(detail, "\n");
36        String output = "";
37        while (tok.hasMoreTokens())
38        {
39            output += XMLWriter.simpleTag(tok.nextToken(), ELEMENT.DETAIL);
40        }
41        return output;
42    }
43}
Note: See TracBrowser for help on using the repository browser.