Mercurial > repos > prog > lcmsmatching
comparison MsDbInputStream.R @ 6:f86fec07f392 draft default tip
planemo upload commit c397cd8a93953798d733fd62653f7098caac30ce
| author | prog |
|---|---|
| date | Fri, 22 Feb 2019 16:04:22 -0500 |
| parents | fb9c0409d85c |
| children |
comparison
equal
deleted
inserted
replaced
| 5:fb9c0409d85c | 6:f86fec07f392 |
|---|---|
| 1 if ( ! exists('MsDbInputStream')) { # Do not load again if already loaded | |
| 2 | |
| 3 library('methods') | |
| 4 source('msdb-common.R') | |
| 5 | |
| 6 ##################### | |
| 7 # CLASS DECLARATION # | |
| 8 ##################### | |
| 9 | |
| 10 MsDbInputStream <- setRefClass("MsDbInputStream", fields = list(.input.fields = "ANY")) | |
| 11 | |
| 12 ############### | |
| 13 # CONSTRUCTOR # | |
| 14 ############### | |
| 15 | |
| 16 MsDbInputStream$methods( initialize = function(input.fields = msdb.get.dft.input.fields(), ...) { | |
| 17 | |
| 18 .input.fields <<- input.fields | |
| 19 | |
| 20 callSuper(...) | |
| 21 }) | |
| 22 | |
| 23 ########## | |
| 24 # GET MZ # | |
| 25 ########## | |
| 26 | |
| 27 MsDbInputStream$methods( getMz = function() { | |
| 28 stop("Method getMz() not implemented in concrete class.") | |
| 29 }) | |
| 30 | |
| 31 ########## | |
| 32 # GET RT # | |
| 33 ########## | |
| 34 | |
| 35 MsDbInputStream$methods( getRt = function() { | |
| 36 stop("Method getRt() not implemented in concrete class.") | |
| 37 }) | |
| 38 | |
| 39 ########### | |
| 40 # GET ALL # | |
| 41 ########### | |
| 42 | |
| 43 MsDbInputStream$methods( getAll = function(but = NULL) { | |
| 44 stop("Method getUnused() not implemented in concrete class.") | |
| 45 }) | |
| 46 | |
| 47 ############### | |
| 48 # NEXT VALUES # | |
| 49 ############### | |
| 50 | |
| 51 MsDbInputStream$methods( nextValues = function() { | |
| 52 stop("Method nextValues() not implemented in concrete class.") | |
| 53 }) | |
| 54 | |
| 55 ################### | |
| 56 # HAS NEXT VALUES # | |
| 57 ################### | |
| 58 | |
| 59 MsDbInputStream$methods( hasNextValues = function() { | |
| 60 stop("Method hasNextValues() not implemented in concrete class.") | |
| 61 }) | |
| 62 | |
| 63 } # end of load safe guard |
