# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# IMPORTS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
importFrom("R.methodsS3", "setMethodS3")
importFrom("R.methodsS3", "appendVarArgs")
importFrom("R.oo", "setConstructorS3")
importFrom("R.oo", "Object")
importFrom("R.oo", "finalize")
importFrom("R.oo", "Package")
importFrom("R.oo", "getPosition")
importFrom("R.oo", "getVersion")
importFrom("R.oo", "getMaintainer")
importFrom("R.oo", "startupMessage")
importFrom("R.oo", "extend")
importFrom("R.oo", "throw")

importFrom("R.utils", "isPackageInstalled")
importFrom("R.utils", "cat") ## Multi-sources: R.utils, base
importFrom("R.utils", "enter")
importFrom("R.utils", "exit")
importFrom("R.utils", "less")
importFrom("R.utils", "pushTemporaryFile", "popTemporaryFile")
importFrom("R.utils", "popState")
importFrom("R.utils", "pushState")
importFrom("R.utils", "printf")
importFrom("R.utils", "Arguments")
importFrom("R.utils", "getThreshold")
importFrom("R.utils", "setThreshold")
importFrom("R.oo", "isVisible")
importFrom("R.utils", "NullVerbose")
importFrom("R.utils", "Verbose")
importFrom("R.utils", "Options")
importFrom("R.utils", "Java")
importFrom("R.utils", "hpaste")
importFrom("R.utils", "isFile")
importFrom("R.utils", "copyFile")
importFrom("R.utils", "getOption")
importFrom("R.utils", "setOption")

importFrom("utils", "compareVersion")
importFrom("utils", "head")
importFrom("utils", "getFromNamespace")
importFrom("utils", "str")
importFrom("methods", "as")
importFrom("methods", "new")


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# EXPORTS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
export("evaluate")
export("evaluate.Matlab")
export("getOption")
export("getOption.Matlab")
export("getVariable")
export("getVariable.Matlab")
export("isOpen")
export("isOpen.Matlab")
export("Matlab")
export("R.matlab")
export("readMat")
export("setFunction")
export("setFunction.Matlab")
export("setOption") # Re-export from R.utils::setOption()
export("setOption.Matlab")
export("setVariable")
export("setVariable.Matlab")
export("setVerbose")
export("setVerbose.Matlab")
export("startServer")
export("startServer.Matlab")
export("writeMat")

## DEPRECATED:
## Exporting because CRAN package CINOEDV 2.0 (2014-11-27) calls
## readMat.default() and not readMat(). However, this will be
## removed from the public API of R.matlab in a future version.
## /HB 2016-07-05
export("readMat.default")


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# DECLARATIONS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
S3method("readMat", "default")
S3method("writeMat", "default")
S3method("isOpen", "default")

# Matlab
S3method("as.character", "Matlab")
S3method("getOption", "Matlab")
S3method("setOption", "Matlab")
S3method("open", "Matlab")
S3method("isOpen", "Matlab")
S3method("finalize", "Matlab")
S3method("close", "Matlab")
S3method("writeCommand", "Matlab")
S3method("readResult", "Matlab")
S3method("startServer", "Matlab")
S3method("evaluate", "Matlab")
S3method("getVariable", "Matlab")
S3method("setVariable", "Matlab")
S3method("setFunction", "Matlab")
S3method("setVerbose", "Matlab")
