コード例 #1
0
ファイル: Cursor.cs プロジェクト: JadeHub/Jade
 private unsafe OverriddenCursorSet(Library.CXCursor* handles, uint count, ITranslationUnitItemFactory factory)
 {
     _cursors = new List<Cursor>();
     for (uint i = 0; i < count; i++)
     {
         _cursors.Add(factory.CreateCursor(handles[i]));
     }
 }
コード例 #2
0
ファイル: DeclInfo.cs プロジェクト: JadeHub/Jade
        internal unsafe DeclInfo(Library.CXIdxDeclInfo handle, ITranslationUnitItemFactory itemFactory)
        {
            _handle = handle;
            _itemFactory = itemFactory;

            _entityInfo = new EntityInfo(*_handle.entityInfo, itemFactory);

            if (handle.semanticContainer != (Library.CXIdxContainerInfo*)IntPtr.Zero)
                _semanticContainer = _itemFactory.CreateCursor(handle.semanticContainer->cursor);

            if(handle.lexicalContainer != (Library.CXIdxContainerInfo*)IntPtr.Zero)
                _lexicalContainer = _itemFactory.CreateCursor(handle.lexicalContainer->cursor);

            if(handle.declAsContainer != (Library.CXIdxContainerInfo*)IntPtr.Zero)
                _declAsContainer = _itemFactory.CreateCursor(handle.declAsContainer->cursor);

           // Debug.Assert(Location == Cursor.Location);            
        }
コード例 #3
0
ファイル: EntityReference.cs プロジェクト: JadeHub/Jade
 internal unsafe EntityReference(Library.CXIdxEntityRefInfo handle, ITranslationUnitItemFactory itemFactory)
 {
     _handle = handle;
     _itemFactory = itemFactory;
     if (_handle.referencedEntity != (Library.CXIdxEntityInfo*)IntPtr.Zero)
         _refedEntity = new EntityInfo(*_handle.referencedEntity, _itemFactory);
     if (_handle.parentEntity != (Library.CXIdxEntityInfo*)IntPtr.Zero)
         _parentEntity = new EntityInfo(*_handle.parentEntity, _itemFactory);
     if(_handle.container != (Library.CXIdxContainerInfo*)IntPtr.Zero)
         _container = _itemFactory.CreateCursor(_handle.container->cursor);
 }