public override void VisitClassCPPModel(ClassCPPModel model) { var delcarationParts = new[] { CPPModelTools.Modifiers(model.Modifiers, ModifersFlag.AccessTypeCPPModel), "class", model.Name }; var declarationLine = string.Join(" ", delcarationParts.Where(p => !string.IsNullOrWhiteSpace(p))); AppendLine($"{declarationLine}"); OpenBlock(); Invoke <ClassMembersCPPModelVisitor>(model.Members); CloseBlockWithSemicolon(); }
public override void VisitClassDeclaration(ClassDeclarationSyntax node) { if (node.Identifier.ToString() == "SOC") { Invoke <SOCClassVisitor>(node); return; } var _class = new ClassCPPModel(Modifiers: new ModifiersCPPModel()); _class.Name = node.Identifier.ToString(); _class.Modifiers.InstanceType = node.Modifiers.ExtractInstanceType(); using (Context.WithCodeContainer(_class)) { Invoke <ClassMembersVisitor>(node.Members); } // unsupported EnsureNullOrEmpty(node.TypeParameterList, "Generics to be implemented"); }
public override void VisitClassCPPModel(ClassCPPModel model) => Invoke <ClassCPPModelVisitor>(model);
public override void VisitClassCPPModel(ClassCPPModel model) { Context.Class = model; Invoke <ClassMembersCPPModelVisitor>(model.Members); }