/// <summary> /// Reads the module from the specified file. /// </summary> public static CppModule Read(string file) { FileStream inputStream = new FileStream(file, FileMode.Open); CppModule result = Read(inputStream); inputStream.Close(); return(result); }
public virtual bool VisitCppModule(CppModule cppModule) { if (!VisitCppElement(cppModule)) { return(false); } foreach (CppInclude cppInclude in cppModule.Includes) { cppInclude.Visit(this); } return(true); }
/// <summary> /// Reads the module from the specified input. /// </summary> public static CppModule Read(Stream input) { CppModule module = null; XmlSerializer xmlSerializer = new XmlSerializer(typeof(CppModule)); using (XmlReader xmlReader = XmlReader.Create(input)) { module = xmlSerializer.Deserialize(xmlReader) as CppModule; } if (module != null) { module.ResetParents(); } return(module); }