public SinTD ParseIDL(string idlString, SinTD targetSinTD) { CurrentlyParsedSinTD = targetSinTD; lineNumberParsed = 0; currentlyParsing = ParseMode.NONE; wasParsingBeforeComment = ParseMode.NONE; string[] idlLines = idlString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); foreach (string line in idlLines) { ++lineNumberParsed; parseLine(line.Trim()); } return(CurrentlyParsedSinTD); }
public SinTD ParseIDL(string idlString, SinTD targetSinTD) { CurrentlyParsedSinTD = targetSinTD; lineNumberParsed = 0; currentlyParsing = ParseMode.NONE; wasParsingBeforeComment = ParseMode.NONE; string[] idlLines = idlString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); foreach (string line in idlLines) { ++lineNumberParsed; parseLine(line.Trim()); } return CurrentlyParsedSinTD; }
public void TestSetUp() { i32 = SinTDInstance.GetSinTDType("i32"); SinTDString = SinTDInstance.GetSinTDType("string"); SinTDBool = SinTDInstance.GetSinTDType("boolean"); intStruct = new SinTDStruct("intStruct"); intStruct.members["x"] = i32; intStruct.members["y"] = i32; aStruct = new SinTDStruct("arrayStruct"); aStruct.members.Add("arr", new SinTDArray(i32)); SinTDInstance.RegisterType(aStruct); mStruct = new SinTDStruct("mapStruct"); mStruct.members.Add("map", new SinTDMap(SinTDString, SinTDBool)); SinTDInstance.RegisterType(mStruct); sStruct = new SinTDStruct("structStruct"); sStruct.members.Add("child", intStruct); SinTDInstance.RegisterType(sStruct); SinTDInstance = new SinTD(); }
public void Setup() { SinTDInstance = new SinTD(); SinTDInstance.SINFONIServices = new ServiceRegistry(); i32 = SinTDInstance.GetSinTDType("i32"); SinTD_string = SinTDInstance.GetSinTDType("string"); intStruct = new SinTDStruct("intStruct"); intStruct.members["x"] = i32; intStruct.members["y"] = i32; serviceFunction = new ServiceFunctionDescription("function", new SinTDType("void")); serviceFunction.Parameters.Add("intParameter", i32); serviceFunction.Parameters.Add("stringParameter", SinTD_string); service = new SINFONIService("service"); service.serviceFunctions.Add("function", serviceFunction); SinTDInstance.SINFONIServices.services.Add("service", service); connection = new TestConnection(); connection.SinTD = SinTDInstance; }