class FFI::Clang::CompilationDatabase
Public Class Methods
new(dirpath)
click to toggle source
Calls superclass method
# File lib/ffi/clang/compilation_database.rb, line 28 def initialize(dirpath) uint_ptr = MemoryPointer.new :uint cdb_ptr = Lib.compilation_database_from_directory(dirpath, uint_ptr) error_code = Lib::CompilationDatabaseError[uint_ptr.read_uint] if error_code != :no_error raise DatabaseLoadError, "Cannot load database: #{error_code}" end super cdb_ptr end
release(pointer)
click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 38 def self.release(pointer) Lib.compilation_database_dispose(pointer) end
Public Instance Methods
all_compile_commands()
click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 46 def all_compile_commands CompileCommands.new Lib.compilation_database_get_all_compile_commands(self), self end
compile_commands(filename)
click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 42 def compile_commands(filename) CompileCommands.new Lib.compilation_database_get_compile_commands(self, filename), self end