Class: FFI::Clang::Cursor::PlatformAvailability
- Inherits:
-
AutoPointer
- Object
- AutoPointer
- FFI::Clang::Cursor::PlatformAvailability
- Defined in:
- lib/ffi/clang/cursor.rb
Class Method Summary collapse
Instance Method Summary collapse
- #deprecated ⇒ Object
-
#initialize(memory_pointer) ⇒ PlatformAvailability
constructor
A new instance of PlatformAvailability.
- #introduced ⇒ Object
- #message ⇒ Object
- #obsoleted ⇒ Object
- #platform ⇒ Object
- #unavailable ⇒ Object
Constructor Details
#initialize(memory_pointer) ⇒ PlatformAvailability
Returns a new instance of PlatformAvailability.
512 513 514 515 516 517 518 519 520 |
# File 'lib/ffi/clang/cursor.rb', line 512 def initialize(memory_pointer) pointer = FFI::Pointer.new(memory_pointer) super(pointer) # I'm not sure this is safe. # Keep a reference to CXPlatformAvailability itself allocated by MemoryPointer. @memory_pointer = memory_pointer @platform_availability = Lib::CXPlatformAvailability.new(memory_pointer) end |
Class Method Details
.release(pointer) ⇒ Object
522 523 524 525 |
# File 'lib/ffi/clang/cursor.rb', line 522 def self.release(pointer) # Memory allocated by get_cursor_platform_availability is managed by AutoPointer. Lib.dispose_platform_availability(Lib::CXPlatformAvailability.new(pointer)) end |
Instance Method Details
#deprecated ⇒ Object
535 536 537 |
# File 'lib/ffi/clang/cursor.rb', line 535 def deprecated @platform_availability[:deprecated] end |
#introduced ⇒ Object
531 532 533 |
# File 'lib/ffi/clang/cursor.rb', line 531 def introduced @platform_availability[:introduced] end |
#message ⇒ Object
547 548 549 |
# File 'lib/ffi/clang/cursor.rb', line 547 def Lib.get_string @platform_availability[:message] end |
#obsoleted ⇒ Object
539 540 541 |
# File 'lib/ffi/clang/cursor.rb', line 539 def obsoleted @platform_availability[:obsoleted] end |
#platform ⇒ Object
527 528 529 |
# File 'lib/ffi/clang/cursor.rb', line 527 def platform Lib.get_string @platform_availability[:platform] end |
#unavailable ⇒ Object
543 544 545 |
# File 'lib/ffi/clang/cursor.rb', line 543 def unavailable @platform_availability[:unavailable] != 0 end |