Class: FFI::Clang::EvalResult
- Inherits:
-
AutoPointer
- Object
- AutoPointer
- FFI::Clang::EvalResult
- Defined in:
- lib/ffi/clang/evaluation.rb
Overview
Represents the result of evaluating a cursor as a compile-time constant.
Class Method Summary collapse
-
.release(pointer) ⇒ Object
Release the evaluation result.
Instance Method Summary collapse
-
#as_double ⇒ Object
Get the result as a double.
-
#as_int ⇒ Object
Get the result as an integer.
-
#as_long_long ⇒ Object
Get the result as a long long integer.
-
#as_str ⇒ Object
Get the result as a string.
-
#as_unsigned ⇒ Object
Get the result as an unsigned integer.
-
#kind ⇒ Object
Get the kind of this evaluation result.
-
#unsigned_int? ⇒ Boolean
Check if the result is an unsigned integer.
Class Method Details
.release(pointer) ⇒ Object
Release the evaluation result.
56 57 58 |
# File 'lib/ffi/clang/evaluation.rb', line 56 def self.release(pointer) Lib.eval_result_dispose(pointer) end |
Instance Method Details
#as_double ⇒ Object
Get the result as a double.
44 45 46 |
# File 'lib/ffi/clang/evaluation.rb', line 44 def as_double Lib.eval_result_get_as_double(self) end |
#as_int ⇒ Object
Get the result as an integer.
20 21 22 |
# File 'lib/ffi/clang/evaluation.rb', line 20 def as_int Lib.eval_result_get_as_int(self) end |
#as_long_long ⇒ Object
Get the result as a long long integer.
26 27 28 |
# File 'lib/ffi/clang/evaluation.rb', line 26 def as_long_long Lib.eval_result_get_as_long_long(self) end |
#as_str ⇒ Object
Get the result as a string.
50 51 52 |
# File 'lib/ffi/clang/evaluation.rb', line 50 def as_str Lib.eval_result_get_as_str(self) end |
#as_unsigned ⇒ Object
Get the result as an unsigned integer.
38 39 40 |
# File 'lib/ffi/clang/evaluation.rb', line 38 def as_unsigned Lib.eval_result_get_as_unsigned(self) end |
#kind ⇒ Object
Get the kind of this evaluation result.
14 15 16 |
# File 'lib/ffi/clang/evaluation.rb', line 14 def kind Lib.eval_result_get_kind(self) end |
#unsigned_int? ⇒ Boolean
Check if the result is an unsigned integer.
32 33 34 |
# File 'lib/ffi/clang/evaluation.rb', line 32 def unsigned_int? Lib.eval_result_is_unsigned_int(self) != 0 end |