Beispiel #1
0
 public void VisitChildren(CursorVisitor visitor)
 {
     Interop.clang_visitChildren(
         Native,
         (cursor, parent, data) => visitor(new Cursor(cursor), new Cursor(parent)),
         IntPtr.Zero);
 }
Beispiel #2
0
 public void VisitChildren(CursorVisitor visitor)
 {
     clang.visitChildren(Cursor, (CXCursor cursor, CXCursor parent, IntPtr data) =>
     {
         visitor(new VisitorCursor(cursor));
         return(CXChildVisitResult.CXChildVisit_Recurse);
     }, new CXClientData(IntPtr.Zero));
 }
Beispiel #3
0
            /// <summary>
            /// Execute Translation Unit Handling Test
            /// </summary>
            private void ExecuteTranslationUnitHandlingTest()
            {
                var(target_src, command_line_args) = this.CreateTranslationUnitHandlerParameters();

                CursorVisitor.Execute(target_src, command_line_args);

                this.SendMessage();

                InclusionVisitor.Execute(target_src, command_line_args);
            }
Beispiel #4
0
        public void VisitChildren(CursorVisitor visitor, Predicate<CursorKind> kindPred)
        {
            Library.clang_visitChildren(
                Handle,
                //(cursor, parent, data) => visitor(_itemFactory.CreateCursor(cursor), _itemFactory.CreateCursor(parent)),
                delegate(Library.CXCursor cursor, Library.CXCursor parent, IntPtr data)
                {
                    if(kindPred(Library.clang_getCursorKind(cursor)))
                        return visitor(_itemFactory.CreateCursor(cursor), _itemFactory.CreateCursor(parent));
                    return ChildVisitResult.Continue;
                },

                IntPtr.Zero);
        }
Beispiel #5
0
 /// <summary>
 /// Inspect cursor's children via a callback.
 /// </summary>
 /// <param name="visitor"></param>
 public void VisitChildren(CursorVisitor visitor)
 {
     Library.clang_visitChildren(
         Handle,
         //(cursor, parent, data) => visitor(_itemFactory.CreateCursor(cursor), _itemFactory.CreateCursor(parent)),
         delegate (Library.CXCursor cursor, Library.CXCursor parent, IntPtr data) 
         {
             return visitor(_itemFactory.CreateCursor(cursor), _itemFactory.CreateCursor(parent));
         },
         
         IntPtr.Zero);
 }
Beispiel #6
0
 public static extern uint clang_visitChildren(Cursor parent, CursorVisitor visitor, ClientData clientData);
Beispiel #7
0
 public static extern uint clang_visitChildren(Cursor parent, CursorVisitor visitor, ClientData clientData);
Beispiel #8
0
 internal static extern uint clang_visitChildren(Cursor parent, CursorVisitor visitor, IntPtr clientData);
Beispiel #9
0
 /// <summary>
 /// Inspect cursor's children via a callback.
 /// </summary>
 /// <param name="visitor"></param>
 public void VisitChildren(CursorVisitor visitor)
 {
     Library.clang_visitChildren(
         Handle,
         (cursor, parent, data) => visitor(_itemFactory.CreateCursor(cursor), _itemFactory.CreateCursor(parent)),
         IntPtr.Zero);
 }
Beispiel #10
0
 public void VisitChildren(CursorVisitor visitor)
 {
     Interop.clang_visitChildren(
         Native,
         (cursor, parent, data) => visitor(new Cursor(cursor), new Cursor(parent)),
         IntPtr.Zero);
 }