// Path: src/org/udalov/jclang/CXFile.java
// public class CXFile extends PointerType {
//     @NotNull
//     public File toFile() {
//         CXString.ByValue name = LibClang.I.getFileName(this);
//         NativePool.I.record(name);
//         return new File(LibClang.I.getCString(name));
//     }
// }
// 
// Path: src/org/udalov/jclang/DeclarationInfo.java
// public class DeclarationInfo {
//     private final EntityInfo entityInfo;
//     private final Cursor cursor;
//     private final IndexLocation location;
//     private final ContainerInfo semanticContainer;
//     private final ContainerInfo lexicalContainer;
//     private final boolean isRedeclaration;
//     private final boolean isDefinition;
//     private final boolean isContainer;
//     @Nullable
//     private final ContainerInfo declAsContainer;
//     private final boolean isImplicit;
//     private final List<IndexAttribute> attributes;
// 
//     public DeclarationInfo(@NotNull CXIdxDeclInfo info) {
//         this.entityInfo = new EntityInfo(info.entityInfo);
//         this.cursor = new Cursor(info.cursor);
//         this.location = new IndexLocation(info.loc);
//         this.semanticContainer = new ContainerInfo(info.semanticContainer);
//         this.lexicalContainer = new ContainerInfo(info.lexicalContainer);
//         this.isRedeclaration = info.isRedeclaration;
//         this.isDefinition = info.isDefinition;
//         this.isContainer = info.isContainer;
//         this.declAsContainer = info.declAsContainer == null ? null : new ContainerInfo(info.declAsContainer);
//         this.isImplicit = info.isImplicit;
//         this.attributes = IndexAttribute.createFromNative(info.attributes, info.numAttributes);
//     }
// 
//     @NotNull
//     public EntityInfo getEntityInfo() {
//         return entityInfo;
//     }
// 
//     @NotNull
//     public Cursor getCursor() {
//         return cursor;
//     }
// 
//     @NotNull
//     public IndexLocation getLocation() {
//         return location;
//     }
// 
//     @NotNull
//     public ContainerInfo getSemanticContainer() {
//         return semanticContainer;
//     }
// 
//     @NotNull
//     public ContainerInfo getLexicalContainer() {
//         return lexicalContainer;
//     }
// 
//     public boolean isRedeclaration() {
//         return isRedeclaration;
//     }
// 
//     public boolean isDefinition() {
//         return isDefinition;
//     }
// 
//     public boolean isContainer() {
//         return isContainer;
//     }
// 
//     @Nullable
//     public ContainerInfo getDeclAsContainer() {
//         return declAsContainer;
//     }
// 
//     public boolean isImplicit() {
//         return isImplicit;
//     }
// 
//     @NotNull
//     public List<IndexAttribute> getAttributes() {
//         return Collections.unmodifiableList(attributes);
//     }
// }
// 
// Path: src/org/udalov/jclang/IndexerCallback.java
// public interface IndexerCallback {
//     IndexerCallback DO_NOTHING = new AbstractIndexerCallback() {};
// 
//     void enteredMainFile(@NotNull File mainFile);
// 
//     void startedTranslationUnit();
// 
//     void indexDeclaration(@NotNull DeclarationInfo info);
// }


import com.sun.jna.Callback;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.udalov.jclang.CXFile;
import org.udalov.jclang.DeclarationInfo;
import org.udalov.jclang.IndexerCallback;
/*
 * Copyright 2013 Alexander Udalov
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.udalov.jclang.structs;


@SuppressWarnings("unused")
public class NativeIndexerCallbacks extends Structure {
    // TODO: all callbacks
    public Callback abortQuery;
    public Callback diagnostic;
    public EnteredMainFileCallback enteredMainFile;
    public Callback ppIncludedFile;
    public Callback importedASTFile;
    public StartedTranslationUnitCallback startedTranslationUnit;
    public Callback indexDeclaration;
    public Callback indexEntityReference;

    public NativeIndexerCallbacks() {
        super();
        initFieldOrder();
    }

// Path: src/org/udalov/jclang/CXFile.java
// public class CXFile extends PointerType {
//     @NotNull
//     public File toFile() {
//         CXString.ByValue name = LibClang.I.getFileName(this);
//         NativePool.I.record(name);
//         return new File(LibClang.I.getCString(name));
//     }
// }
// 
// Path: src/org/udalov/jclang/DeclarationInfo.java
// public class DeclarationInfo {
//     private final EntityInfo entityInfo;
//     private final Cursor cursor;
//     private final IndexLocation location;
//     private final ContainerInfo semanticContainer;
//     private final ContainerInfo lexicalContainer;
//     private final boolean isRedeclaration;
//     private final boolean isDefinition;
//     private final boolean isContainer;
//     @Nullable
//     private final ContainerInfo declAsContainer;
//     private final boolean isImplicit;
//     private final List<IndexAttribute> attributes;
// 
//     public DeclarationInfo(@NotNull CXIdxDeclInfo info) {
//         this.entityInfo = new EntityInfo(info.entityInfo);
//         this.cursor = new Cursor(info.cursor);
//         this.location = new IndexLocation(info.loc);
//         this.semanticContainer = new ContainerInfo(info.semanticContainer);
//         this.lexicalContainer = new ContainerInfo(info.lexicalContainer);
//         this.isRedeclaration = info.isRedeclaration;
//         this.isDefinition = info.isDefinition;
//         this.isContainer = info.isContainer;
//         this.declAsContainer = info.declAsContainer == null ? null : new ContainerInfo(info.declAsContainer);
//         this.isImplicit = info.isImplicit;
//         this.attributes = IndexAttribute.createFromNative(info.attributes, info.numAttributes);
//     }
// 
//     @NotNull
//     public EntityInfo getEntityInfo() {
//         return entityInfo;
//     }
// 
//     @NotNull
//     public Cursor getCursor() {
//         return cursor;
//     }
// 
//     @NotNull
//     public IndexLocation getLocation() {
//         return location;
//     }
// 
//     @NotNull
//     public ContainerInfo getSemanticContainer() {
//         return semanticContainer;
//     }
// 
//     @NotNull
//     public ContainerInfo getLexicalContainer() {
//         return lexicalContainer;
//     }
// 
//     public boolean isRedeclaration() {
//         return isRedeclaration;
//     }
// 
//     public boolean isDefinition() {
//         return isDefinition;
//     }
// 
//     public boolean isContainer() {
//         return isContainer;
//     }
// 
//     @Nullable
//     public ContainerInfo getDeclAsContainer() {
//         return declAsContainer;
//     }
// 
//     public boolean isImplicit() {
//         return isImplicit;
//     }
// 
//     @NotNull
//     public List<IndexAttribute> getAttributes() {
//         return Collections.unmodifiableList(attributes);
//     }
// }
// 
// Path: src/org/udalov/jclang/IndexerCallback.java
// public interface IndexerCallback {
//     IndexerCallback DO_NOTHING = new AbstractIndexerCallback() {};
// 
//     void enteredMainFile(@NotNull File mainFile);
// 
//     void startedTranslationUnit();
// 
//     void indexDeclaration(@NotNull DeclarationInfo info);
// }


// Path: src/org/udalov/jclang/structs/NativeIndexerCallbacks.java
import com.sun.jna.Callback;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.udalov.jclang.CXFile;
import org.udalov.jclang.DeclarationInfo;
import org.udalov.jclang.IndexerCallback;

/*
 * Copyright 2013 Alexander Udalov
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.udalov.jclang.structs;


@SuppressWarnings("unused")
public class NativeIndexerCallbacks extends Structure {
    // TODO: all callbacks
    public Callback abortQuery;
    public Callback diagnostic;
    public EnteredMainFileCallback enteredMainFile;
    public Callback ppIncludedFile;
    public Callback importedASTFile;
    public StartedTranslationUnitCallback startedTranslationUnit;
    public Callback indexDeclaration;
    public Callback indexEntityReference;

    public NativeIndexerCallbacks() {
        super();
        initFieldOrder();
    }

    public NativeIndexerCallbacks(@NotNull final IndexerCallback callback) {