using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Globalization; namespace LoggingTool.models { class TeamUpEvent { private double timestamp; private int eventID; /* ****************************************************************************** * constructor TeamUpEvent * @description: creates a TeamUpEvent object out of the raw input String * ******************************************************************************/ public TeamUpEvent(String rawInput) { //Split the inputstring on |, the delimiter used in the input format String[] splitInput = rawInput.Split('|'); timestamp = double.Parse(splitInput[0]); eventID = int.Parse(splitInput[2]); } /* ****************************************************************************** * function toString * @return: String * @description: Returns a string representation of the TeamUpEvent object * ******************************************************************************/ public String toString() { String res = "Timestamp :" + timestamp + "\n"; res = res + "EventID :" + eventID; return res; } /* ****************************************************************************** * function toStringArray * @return: List * @description: Returns a String array containing the information of the TeamUpEvent object * ******************************************************************************/ public List toStringArray() { return new List() { timestamp.ToString(), eventID.ToString() }; } } }