Class: FFI::Clang::CompilationDatabase::CompileCommand
- Inherits:
-
Object
- Object
- FFI::Clang::CompilationDatabase::CompileCommand
- Defined in:
- lib/ffi/clang/compilation_database.rb
Instance Method Summary collapse
- #arg(i) ⇒ Object
- #args ⇒ Object
- #directory ⇒ Object
-
#initialize(pointer) ⇒ CompileCommand
constructor
A new instance of CompileCommand.
- #mapped_source_content(i) ⇒ Object
- #mapped_source_path(i) ⇒ Object
- #mapped_sources ⇒ Object
- #num_args ⇒ Object
- #num_mapped_sources ⇒ Object
Constructor Details
#initialize(pointer) ⇒ CompileCommand
Returns a new instance of CompileCommand.
68 69 70 |
# File 'lib/ffi/clang/compilation_database.rb', line 68 def initialize(pointer) @pointer = pointer end |
Instance Method Details
#arg(i) ⇒ Object
80 81 82 |
# File 'lib/ffi/clang/compilation_database.rb', line 80 def arg(i) Lib.extract_string Lib.compile_command_get_arg(@pointer, i) end |
#args ⇒ Object
84 85 86 |
# File 'lib/ffi/clang/compilation_database.rb', line 84 def args num_args.times.map { |i| arg(i) } end |
#directory ⇒ Object
72 73 74 |
# File 'lib/ffi/clang/compilation_database.rb', line 72 def directory Lib.extract_string Lib.compile_command_get_directory(@pointer) end |
#mapped_source_content(i) ⇒ Object
98 99 100 101 |
# File 'lib/ffi/clang/compilation_database.rb', line 98 def mapped_source_content(i) raise NotImplementedError # Lib.extract_string Lib.compile_command_get_mapped_source_content(@pointer, i) end |
#mapped_source_path(i) ⇒ Object
93 94 95 96 |
# File 'lib/ffi/clang/compilation_database.rb', line 93 def mapped_source_path(i) raise NotImplementedError # Lib.extract_string Lib.compile_command_get_mapped_source_path(@pointer, i) end |
#mapped_sources ⇒ Object
103 104 105 106 107 |
# File 'lib/ffi/clang/compilation_database.rb', line 103 def mapped_sources num_mapped_sources.times.map { |i| {path: mapped_source_path(i), content: mapped_source_content(i)} } end |
#num_args ⇒ Object
76 77 78 |
# File 'lib/ffi/clang/compilation_database.rb', line 76 def num_args Lib.compile_command_get_num_args(@pointer) end |
#num_mapped_sources ⇒ Object
88 89 90 91 |
# File 'lib/ffi/clang/compilation_database.rb', line 88 def num_mapped_sources raise NotImplementedError # Lib.compile_command_get_num_mapped_sources(@pointer) end |