private void ProcessClassDetail( NativeClass thisClass, // this class to parse CXCursor cursor, // current cursor CXType type, // current cursor type CXCursor parent // parent cursor ) { // set unscoped name thisClass.UnscopedName = clang.getCursorSpelling(cursor).ToString(); // set struct or class thisClass.ClassTag = ClangTraits.ToStructOrClass(cursor.kind); // abstract thisClass.IsAbstract = clang.CXXRecord_isAbstract(cursor) != 0; // virtual base thisClass.IsVirtualBase = clang.isVirtualBase(cursor) != 0; // set template instance info if (TemplateHelper.VisitTemplate(cursor, thisClass, AST_)) { thisClass.IsFullSpecialization = true; TypeVisitContext context = new TypeVisitContext(cursor); TemplateHelper.VisitTemplateParameter(cursor, type, thisClass, AST_, context); } // set subclass if (ClangTraits.IsUserDefinedTypeDecl(parent)) { Debug.Assert(OwnerClass_ != null); thisClass.IsEmbedded = true; thisClass.OwnerClass = OwnerClass_; SubClass subClass = new SubClass { Access = ClangTraits.ToAccessSpecifier(clang.getCXXAccessSpecifier(cursor)), Class = thisClass }; OwnerClass_.AddSubClass(subClass); } }
public void AddSubClass(SubClass subClass) { SubClasses.Add(subClass); }