FFI::ClangSourceFFIClangEvalResult

class EvalResult

Represents the result of evaluating a cursor as a compile-time constant.

Definitions

def kind

Get the kind of this evaluation result.

Signature

returns Symbol

The result kind (:int, :float, :str_literal, :obj_c_str_literal, :c_f_str, :other, :unexposed).

Implementation

def kind
	Lib.eval_result_get_kind(self)
end

def as_int

Get the result as an integer.

Signature

returns Integer

The integer value.

Implementation

def as_int
	Lib.eval_result_get_as_int(self)
end

def as_long_long

Get the result as a long long integer.

Signature

returns Integer

The long long value.

Implementation

def as_long_long
	Lib.eval_result_get_as_long_long(self)
end

def unsigned_int?

Check if the result is an unsigned integer.

Signature

returns Boolean

True if the result is unsigned.

Implementation

def unsigned_int?
	Lib.eval_result_is_unsigned_int(self) != 0
end

def as_unsigned

Get the result as an unsigned integer.

Signature

returns Integer

The unsigned value.

Implementation

def as_unsigned
	Lib.eval_result_get_as_unsigned(self)
end

def as_double

Get the result as a double.

Signature

returns Float

The double value.

Implementation

def as_double
	Lib.eval_result_get_as_double(self)
end

def as_str

Get the result as a string.

Signature

returns String

The string value.

Implementation

def as_str
	Lib.eval_result_get_as_str(self)
end

def self.release(pointer)

Release the evaluation result.

Signature

parameter pointer FFI::Pointer

The pointer to release.

Implementation

def self.release(pointer)
	Lib.eval_result_dispose(pointer)
end