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.
82 83 84 |
# File 'lib/ffi/clang/compilation_database.rb', line 82 def initialize(pointer) @pointer = pointer end |
Instance Method Details
#arg(i) ⇒ Object
94 95 96 |
# File 'lib/ffi/clang/compilation_database.rb', line 94 def arg(i) Lib.extract_string Lib.compile_command_get_arg(@pointer, i) end |
#args ⇒ Object
98 99 100 |
# File 'lib/ffi/clang/compilation_database.rb', line 98 def args num_args.times.map { |i| arg(i) } end |
#directory ⇒ Object
86 87 88 |
# File 'lib/ffi/clang/compilation_database.rb', line 86 def directory Lib.extract_string Lib.compile_command_get_directory(@pointer) end |
#mapped_source_content(i) ⇒ Object
112 113 114 115 |
# File 'lib/ffi/clang/compilation_database.rb', line 112 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
107 108 109 110 |
# File 'lib/ffi/clang/compilation_database.rb', line 107 def mapped_source_path(i) raise NotImplementedError # Lib.extract_string Lib.compile_command_get_mapped_source_path(@pointer, i) end |
#mapped_sources ⇒ Object
117 118 119 120 121 |
# File 'lib/ffi/clang/compilation_database.rb', line 117 def mapped_sources num_mapped_sources.times.map { |i| {path: mapped_source_path(i), content: mapped_source_content(i)} } end |
#num_args ⇒ Object
90 91 92 |
# File 'lib/ffi/clang/compilation_database.rb', line 90 def num_args Lib.compile_command_get_num_args(@pointer) end |
#num_mapped_sources ⇒ Object
102 103 104 105 |
# File 'lib/ffi/clang/compilation_database.rb', line 102 def num_mapped_sources raise NotImplementedError # Lib.compile_command_get_num_mapped_sources(@pointer) end |