class OMX::OMXTables
A class to return the tables in the OMX
file
Public Class Methods
new(file)
click to toggle source
# File lib/OpenMatriX.rb, line 256 def initialize(file) @id = file.id @gId = gOpen(@id, "data",0) end
Public Instance Methods
cast_to_H5GInfoT(pointer)
click to toggle source
# File lib/OpenMatriX.rb, line 229 def cast_to_H5GInfoT pointer H5GInfoT.new pointer end
cast_to_H5_index(pointer)
click to toggle source
# File lib/OpenMatriX.rb, line 240 def cast_to_H5_index pointer H5_index.new pointer end
getNTables()
click to toggle source
A function to return the number of matrix tables. Returns an integer value of the number of tables in the matrix
# File lib/OpenMatriX.rb, line 263 def getNTables() h5gi = cast_to_H5GInfoT(FFI::MemoryPointer.new :char, H5GInfoT.size) op = nTables(@gId,h5gi) return(h5gi[:nLinks]) end
getTableNames()
click to toggle source
A function to get the table names. Returns a string array of table names.
# File lib/OpenMatriX.rb, line 270 def getTableNames() nT = self.getNTables()-1 gName = FFI::MemoryPointer.new(:string) pl = createpl(OMX::h5P_CLS_LINK_ACCESS_ID) tN ||= [] for t in 0..nT size = 1 + tNames2(@gId, ".", 0, 0, t, nil, 0, pl) tn2o = tNames2(@gId, ".", 0, 0, t, gName, size, pl) tN << gName.read_string() end return(tN) end