Esempio n. 1
0
        public static CXErrorCode parseTranslationUnit2FullArgv(CXIndex @CIdx, string @source_filename, string[] @command_line_args, int @num_command_line_args, CXUnsavedFile[] @unsaved_files, uint @num_unsaved_files, uint @options, out CXTranslationUnit @out_TU)
        {
            var arr = new _CXUnsavedFile[unsaved_files.Length];

            try
            {
                BeginCXUnsavedFileMarshal(ref arr, ref unsaved_files);
                return(parseTranslationUnit2FullArgv(CIdx, source_filename, command_line_args, num_command_line_args, arr, num_unsaved_files, options, out out_TU));
            }
            finally
            {
                EndCXUnsavedFileMarshal(ref arr);
            }
        }
Esempio n. 2
0
        public static CXTranslationUnit createTranslationUnitFromSourceFile(CXIndex @CIdx, string @source_filename, int @num_clang_command_line_args, string[] @clang_command_line_args, uint @num_unsaved_files, CXUnsavedFile[] @unsaved_files)
        {
            var arr = new _CXUnsavedFile[unsaved_files.Length];

            try
            {
                BeginCXUnsavedFileMarshal(ref arr, ref unsaved_files);
                return(createTranslationUnitFromSourceFile(CIdx, source_filename, num_clang_command_line_args, clang_command_line_args, num_unsaved_files, arr));
            }
            finally
            {
                EndCXUnsavedFileMarshal(ref arr);
            }
        }
        public PInvokeGenerator(PInvokeGeneratorConfiguration config, Func <string, Stream> outputStreamFactory = null)
        {
            if (config is null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            _index = CXIndex.Create();
            _outputBuilderFactory = new OutputBuilderFactory();
            _outputStreamFactory  = outputStreamFactory ?? ((path) => {
                var directoryPath = Path.GetDirectoryName(path);
                Directory.CreateDirectory(directoryPath);
                return(new FileStream(path, FileMode.Create));
            });
            _visitedCursors = new HashSet <Cursor>();
            _diagnostics    = new List <Diagnostic>();
            _config         = config;
        }
Esempio n. 4
0
 public static extern CXTranslationUnit createTranslationUnitFromSourceFile(CXIndex @CIdx, [MarshalAs(UnmanagedType.LPStr)] string @source_filename, int @num_clang_command_line_args, string[] @clang_command_line_args, uint @num_unsaved_files, out CXUnsavedFile @unsaved_files);
Esempio n. 5
0
 public static extern uint CXIndex_getGlobalOptions(CXIndex @param0);
Esempio n. 6
0
 public static extern void CXIndex_setGlobalOptions(CXIndex @param0, uint @options);
Esempio n. 7
0
 public static extern void disposeIndex(CXIndex @index);
Esempio n. 8
0
 private Index(CXIndex handle)
 {
     Handle = handle;
 }
Esempio n. 9
0
 public static extern CXErrorCode parseTranslationUnit2(CXIndex @CIdx, [MarshalAs(UnmanagedType.LPStr)] string @source_filename, string[] @command_line_args, int @num_command_line_args, out CXUnsavedFile @unsaved_files, uint @num_unsaved_files, uint @options, out CXTranslationUnit @out_TU);
Esempio n. 10
0
 public static CXErrorCode ParseFullArgv(CXIndex index, string sourceFileName, string[] commandLineArgs, CXUnsavedFile[] unsavedFiles, CXTranslationUnit_Flags options, out CXTranslationUnit translationUnit) => clang.parseTranslationUnit2FullArgv(index, sourceFileName, commandLineArgs, commandLineArgs.Length, unsavedFiles, (uint)unsavedFiles.Length, (uint)options, out translationUnit);
Esempio n. 11
0
 public static CXTranslationUnit Parse(CXIndex index, string sourceFileName, string[] commandLineArgs, CXUnsavedFile[] unsavedFiles, CXTranslationUnit_Flags options) => clang.parseTranslationUnit(index, sourceFileName, commandLineArgs, commandLineArgs.Length, unsavedFiles, (uint)unsavedFiles.Length, (uint)options);
Esempio n. 12
0
 public static CXTranslationUnit CreateFromSourceFile(CXIndex index, string sourceFileName, string[] commandLineArgs, CXUnsavedFile[] unsavedFiles) => clang.createTranslationUnitFromSourceFile(index, sourceFileName, commandLineArgs.Length, commandLineArgs, (uint)unsavedFiles.Length, unsavedFiles);
Esempio n. 13
0
 private static extern CXErrorCode parseTranslationUnit2FullArgv(CXIndex @CIdx, [MarshalAs(UnmanagedType.LPStr)] string @source_filename, string[] @command_line_args, int @num_command_line_args, [MarshalAs(UnmanagedType.LPArray)] _CXUnsavedFile[] @unsaved_files, uint @num_unsaved_files, uint @options, out CXTranslationUnit @out_TU);
Esempio n. 14
0
 private static extern CXTranslationUnit createTranslationUnitFromSourceFile(CXIndex @CIdx, [MarshalAs(UnmanagedType.LPStr)] string @source_filename, int @num_clang_command_line_args, string[] @clang_command_line_args, uint @num_unsaved_files, [MarshalAs(UnmanagedType.LPArray)] _CXUnsavedFile[] @unsaved_files);
Esempio n. 15
0
 public static extern CXTranslationUnit createTranslationUnit(CXIndex @CIdx, [MarshalAs(UnmanagedType.LPStr)] string @ast_filename);
Esempio n. 16
0
 public static CXTranslationUnit Create(CXIndex index, string astFileName) => clang.createTranslationUnit(index, astFileName);
Esempio n. 17
0
 public static extern CXErrorCode createTranslationUnit2(CXIndex @CIdx, [MarshalAs(UnmanagedType.LPStr)] string @ast_filename, out CXTranslationUnit @out_TU);
Esempio n. 18
0
 public static CXErrorCode Create(CXIndex index, string astFileName, out CXTranslationUnit translationUnit) => clang.createTranslationUnit2(index, astFileName, out translationUnit);
Esempio n. 19
0
 public static extern CXIndexAction IndexAction_create(CXIndex @CIdx);
Esempio n. 20
0
 private static extern CXTranslationUnit parseTranslationUnit(CXIndex @CIdx, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StringMarshaler))] string @source_filename, string[] @command_line_args, int @num_command_line_args, [MarshalAs(UnmanagedType.LPArray)] _CXUnsavedFile[] @unsaved_files, uint @num_unsaved_files, uint @options);