Class: GDAL::Utils::Helpers::StringList

Inherits:
Object
  • Object
show all
Defined in:
lib/gdal/utils/helpers/string_list.rb

Overview

Note:

This class is intended only to be used internally in ffi-gdal. It’s API may change. Do not use this class directly.

A basic wrapper for CPLStringList (e.g. char **papszArgv).

Defined Under Namespace

Classes: AutoPointer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strings: []) ⇒ StringList

Returns a new instance of StringList.

Parameters:

  • strings (Array<String>) (defaults to: [])

    Strings to build the list.



28
29
30
31
# File 'lib/gdal/utils/helpers/string_list.rb', line 28

def initialize(strings: [])
  @strings = strings
  @c_pointer = AutoPointer.new(string_list_pointer)
end

Instance Attribute Details

#c_pointerFFI::Pointer (readonly)

Returns C pointer to CPLStringList (e.g. char **papszArgv).

Returns:

  • (FFI::Pointer)

    C pointer to CPLStringList (e.g. char **papszArgv).



22
23
24
# File 'lib/gdal/utils/helpers/string_list.rb', line 22

def c_pointer
  @c_pointer
end

#stringsArray<String> (readonly)

Returns Strings in the list.

Returns:

  • (Array<String>)

    Strings in the list.



25
26
27
# File 'lib/gdal/utils/helpers/string_list.rb', line 25

def strings
  @strings
end