Class: GDAL::Utils::Helpers::DatasetList
- Inherits:
-
Object
- Object
- GDAL::Utils::Helpers::DatasetList
- Defined in:
- lib/gdal/utils/helpers/dataset_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 C Array of dataset handlers (e.g. GDALDatasetH *pahSrcDS).
Instance Attribute Summary collapse
-
#c_pointer ⇒ FFI::Pointer
readonly
C pointer to the Array of dataset handlers (e.g. GDALDatasetH *pahSrcDS).
-
#datasets ⇒ Array<GDAL::Dataset>
readonly
List of datasets.
Instance Method Summary collapse
-
#count ⇒ Integer
The number of datasets in the list.
-
#initialize(datasets: []) ⇒ DatasetList
constructor
A new instance of DatasetList.
Constructor Details
#initialize(datasets: []) ⇒ DatasetList
19 20 21 22 |
# File 'lib/gdal/utils/helpers/dataset_list.rb', line 19 def initialize(datasets: []) @datasets = datasets @c_pointer = datasets_pointer end |
Instance Attribute Details
#c_pointer ⇒ FFI::Pointer (readonly)
13 14 15 |
# File 'lib/gdal/utils/helpers/dataset_list.rb', line 13 def c_pointer @c_pointer end |
#datasets ⇒ Array<GDAL::Dataset> (readonly)
16 17 18 |
# File 'lib/gdal/utils/helpers/dataset_list.rb', line 16 def datasets @datasets end |
Instance Method Details
#count ⇒ Integer
25 26 27 |
# File 'lib/gdal/utils/helpers/dataset_list.rb', line 25 def count dataset_pointers.count end |