1 module plist.types.element;
2 public import plist.exceptions;
3 public import dxml.dom;
4 public import dxml.writer;
5 public import std.range : Appender;
6 
7 enum PlistElementType {
8   PLIST_ELEMENT_DATA = "data",
9   PLIST_ELEMENT_STRING = "string",
10   PLIST_ELEMENT_BOOLEAN_TRUE = "true",
11   PLIST_ELEMENT_BOOLEAN_FALSE = "false",
12   PLIST_ELEMENT_DATE = "date",
13   PLIST_ELEMENT_INTEGER = "integer",
14   PLIST_ELEMENT_REAL = "real",
15   PLIST_ELEMENT_ARRAY = "array",
16   PLIST_ELEMENT_DICT = "dict",
17   PLIST_ELEMENT_KEY = "key"
18 }
19 
20 interface PlistElement {
21     // everything is subclassed from this
22     void instantiate(DOMEntity!(string) entity);
23     string toString(); //expected override
24     void write(ref XMLWriter!(Appender!string) writer);
25     string type();
26 }