예제 #1
0
파일: Class.cs 프로젝트: Creepsky/Nexus
 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()));
 }
예제 #2
0
파일: Class.cs 프로젝트: Creepsky/Nexus
        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);
        }
예제 #3
0
파일: Function.cs 프로젝트: Creepsky/Nexus
 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
     });
 }