public override object Clone() { return(new Class(new string(Name), (TemplateList)TemplateList?.CloneDeep(), Variables.Select(i => (Variable)i.CloneDeep()).ToList(), CppBlocks.Select(i => (CppBlockStatement)i.CloneDeep()).ToList(), Includes.Select(i => (Include)i.CloneDeep()).ToList())); }
public IGenerationElement Generate() { if (TemplateList == null) { throw new TemplateGenerationException(this, "Can not generate concrete class from non template class"); } var c = (Class)CloneDeep(); c.Type.TemplateList = (TemplateList)TemplateList.CloneDeep(); c.TemplateList = null; return(c); }
public override object Clone() { return(new Function { Column = Column, Line = Line, FilePath = FilePath, ReturnType = (SimpleType)ReturnType.CloneDeep(), ExtensionBase = ExtensionBase?.CloneDeep() as SimpleType, Parameter = Parameter.Select(i => (Variable)i.CloneDeep()).ToList(), Body = Body.Select(i => (IStatement)i.CloneDeep()).ToList(), TemplateList = TemplateList?.CloneDeep() as TemplateList, Name = Name, Static = Static }); }