# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# IMPORTS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
importFrom("R.methodsS3", "setMethodS3")
importFrom("R.oo", "setConstructorS3")
importFrom("R.oo", "extend")
importFrom("R.oo", "uses")


## Importing Class:es
importFrom("R.oo", "Object")
importFrom("R.oo", "Package")
importFrom("R.oo", "Exception")
 importFrom("R.utils", "Arguments")
 importFrom("R.utils", "GString")
 importFrom("R.utils", "Verbose")


## Importing generics
importFrom("R.oo", "finalize")
importFrom("R.oo", "getMessage")
importFrom("R.oo", "getName")
importFrom("R.oo", "getPath")
importFrom("R.oo", "getSource")
importFrom("R.oo", "trim")
 importFrom("R.utils", "evaluate")
 importFrom("R.utils", "getAbsolutePath")
importFrom("stats", "start")
importFrom("utils", "toLatex")


## Importing functions
importFrom("R.methodsS3", "throw")
importFrom("R.oo", "attachLocally")
importFrom("R.oo", "getStaticInstance")
importFrom("R.oo", "intToChar")
importFrom("R.oo", "isVisible")
importFrom("R.oo", "newInstance")
importFrom("R.oo", "startupMessage")

## import("R.utils")
importFrom("R.utils", "capitalize")
importFrom("R.utils", "capture")
importFrom("R.utils", "cat") ## Multi-sources: R.utils, base
importFrom("R.utils", "cmdArgs")
importFrom("R.utils", "displayCode")
importFrom("R.utils", "downloadFile")
importFrom("R.utils", "enter")
importFrom("R.utils", "evalCapture")
importFrom("R.utils", "exit")
importFrom("R.utils", "filePath")
importFrom("R.utils", "getOption") ## Multi-sources: R.utils, base
importFrom("R.utils", "getParent")
importFrom("R.utils", "getRelativePath")
importFrom("R.utils", "gstring")
importFrom("R.utils", "hasUrlProtocol")
importFrom("R.utils", "hpaste")
importFrom("R.utils", "inherits") ## Multi-sources: R.utils, base
importFrom("R.utils", "intToOct")
importFrom("R.utils", "isAbsolutePath")
importFrom("R.utils", "isFile")
importFrom("R.utils", "isPackageInstalled")
importFrom("R.utils", "isUrl")
importFrom("R.utils", "less")
importFrom("R.utils", "popState")
importFrom("R.utils", "printf")
importFrom("R.utils", "pushState")
importFrom("R.utils", "sourceTo")
importFrom("R.utils", "tempvar")

importFrom("utils", "browseURL")
importFrom("utils", "capture.output")
importFrom("utils", "file_test")
importFrom("utils", "head")
importFrom("utils", "packageVersion")
importFrom("utils", "str")
importFrom("utils", "Sweave")
importFrom("utils", "tail")


## Manually added
importFrom("R.oo", "ll")
if (packageVersion("R.utils") < "1.27.5") {
  importFrom("R.utils", "getOption.default")
  importFrom("R.utils", "cat.default")
  importFrom("R.utils", "inherits.default")
}


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# EXPORTS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Export all public methods, that is, those without a preceeding dot
# in their names.
exportPattern("^[^\\.]")


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# S3 methods
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# character
S3method("toLatex", "character")

# default
S3method("browseRsp", "default")
S3method("compileAsciiDoc", "default")
S3method("compileAsciiDocNoweb", "default")
S3method("compileKnitr", "default")
S3method("compileLaTeX", "default")
S3method("compileMarkdown", "default")
S3method("compileRnw", "default")
S3method("compileRsp", "default")
S3method("compileRsp0", "default")
S3method("compileSweave", "default")
S3method("findAsciiDoc", "default")
S3method("findPandoc", "default")
S3method("importRsp", "default")
S3method("indexOfNonQuoted", "default")
S3method("parseRsp", "default")
S3method("rargs", "default")
S3method("rcat", "default")
S3method("rclean", "default")
S3method("rcompile", "default")
S3method("rfile", "default")
S3method("rscript", "default")
S3method("rsource", "default")
S3method("rsp", "default")
S3method("rstring", "default")
S3method("sourceAllRsp", "default")
S3method("sourceRsp", "default")
S3method("sourceWithTrim", "default")
S3method("splitUrl", "default")
S3method("stop", "default")
S3method("toLatex", "default")
S3method("translateRsp", "default")
S3method("translateRspV1", "default")
S3method("typeOfRnw", "default")

# FileRspResponse
S3method("flush", "FileRspResponse")
S3method("getAbsolutePath", "FileRspResponse")
S3method("getName", "FileRspResponse")
S3method("getOutput", "FileRspResponse")
S3method("getPath", "FileRspResponse")
S3method("write", "FileRspResponse")

# function
S3method("rcat", "function")
S3method("rfile", "function")
S3method("rsource", "function")
S3method("rstring", "function")

# HtmlRspLanguage
S3method("escape", "HtmlRspLanguage")
S3method("getComment", "HtmlRspLanguage")
S3method("getVerbatim", "HtmlRspLanguage")

# HttpDaemon
S3method("appendRootPaths", "HttpDaemon")
S3method("as.character", "HttpDaemon")
S3method("finalize", "HttpDaemon")
S3method("getConfig", "HttpDaemon")
S3method("getCount", "HttpDaemon")
S3method("getDefaultFilenamePattern", "HttpDaemon")
S3method("getHttpRequest", "HttpDaemon")
S3method("getPort", "HttpDaemon")
S3method("getRootPaths", "HttpDaemon")
S3method("insertRootPaths", "HttpDaemon")
S3method("isStarted", "HttpDaemon")
S3method("openUrl", "HttpDaemon")
S3method("processRsp", "HttpDaemon")
S3method("restart", "HttpDaemon")
S3method("setCount", "HttpDaemon")
S3method("setRootPaths", "HttpDaemon")
S3method("sourceTcl", "HttpDaemon")
S3method("start", "HttpDaemon")
S3method("startHelp", "HttpDaemon")
S3method("stop", "HttpDaemon")
S3method("writeResponse", "HttpDaemon")

# HttpDaemonRspResponse
S3method("flush", "HttpDaemonRspResponse")
S3method("write", "HttpDaemonRspResponse")

# HttpRequest
S3method("as.character", "HttpRequest")
S3method("getContentLength", "HttpRequest")
S3method("getContentType", "HttpRequest")
S3method("getContextPath", "HttpRequest")
S3method("getDateHeader", "HttpRequest")
S3method("getHeader", "HttpRequest")
S3method("getParameter", "HttpRequest")
S3method("getParameters", "HttpRequest")
S3method("getProtocol", "HttpRequest")
S3method("getQueryString", "HttpRequest")
S3method("getRealPath", "HttpRequest")
S3method("getRemoteAddress", "HttpRequest")
S3method("getRemoteHost", "HttpRequest")
S3method("getRemoteUser", "HttpRequest")
S3method("getRequestUri", "HttpRequest")
S3method("getRequestUrl", "HttpRequest")
S3method("getScheme", "HttpRequest")
S3method("getServerName", "HttpRequest")
S3method("getServerPort", "HttpRequest")
S3method("getServletPath", "HttpRequest")
S3method("hasParameter", "HttpRequest")
S3method("nbrOfParameters", "HttpRequest")

# Package
S3method("browseRsp", "Package")

# RRspPackage
S3method("capabilitiesOf", "RRspPackage")
S3method("isCapableOf", "RRspPackage")

# RspArguments
S3method("print", "RspArguments")

# RspCode
S3method("asRspString", "RspCode")
S3method("getCode", "RspCode")
S3method("getEcho", "RspCode")

# RspCodeChunk
S3method("asRspString", "RspCodeChunk")
S3method("getInclude", "RspCodeChunk")

# RspComment
S3method("asRspString", "RspComment")
S3method("getComment", "RspComment")

# RspConstruct
S3method("asRspString", "RspConstruct")
S3method("getComment", "RspConstruct")
S3method("getInclude", "RspConstruct")
S3method("getSuffixSpecs", "RspConstruct")

# RspDirective
S3method("asRspString", "RspDirective")
S3method("getNameContentDefaultAttributes", "RspDirective")
S3method("requireAttributes", "RspDirective")

# RspDocument
S3method("[", "RspDocument")
S3method("[<-", "RspDocument")
S3method("asRspString", "RspDocument")
S3method("dropEmptyText", "RspDocument")
S3method("evaluate", "RspDocument")
S3method("flatten", "RspDocument")
S3method("getMetadata", "RspDocument")
S3method("getPath", "RspDocument")
S3method("getSource", "RspDocument")
S3method("getType", "RspDocument")
S3method("mergeTexts", "RspDocument")
S3method("parseIfElseDirectives", "RspDocument")
S3method("preprocess", "RspDocument")
S3method("print", "RspDocument")
S3method("rcat", "RspDocument")
S3method("rclean", "RspDocument")
S3method("rcompile", "RspDocument")
S3method("rfile", "RspDocument")
S3method("rscript", "RspDocument")
S3method("rsource", "RspDocument")
S3method("rstring", "RspDocument")
S3method("setMetadata", "RspDocument")
S3method("subset", "RspDocument")
S3method("toR", "RspDocument")
S3method("trim", "RspDocument")
S3method("trimNonText", "RspDocument")

# RspEvalDirective
S3method("getContent", "RspEvalDirective")
S3method("getFile", "RspEvalDirective")

# RspException
S3method("as.character", "RspException")

# RspFileProduct
S3method("findProcessor", "RspFileProduct")
S3method("getType", "RspFileProduct")
S3method("print", "RspFileProduct")
S3method("view", "RspFileProduct")

# RspIncludeDirective
S3method("getContent", "RspIncludeDirective")
S3method("getFile", "RspIncludeDirective")
S3method("getVerbatim", "RspIncludeDirective")
S3method("getWrap", "RspIncludeDirective")

# RspLanguage
S3method("escape", "RspLanguage")
S3method("getComment", "RspLanguage")
S3method("getLanguage", "RspLanguage")
S3method("getNewline", "RspLanguage")
S3method("getVerbatim", "RspLanguage")

# RspObject
S3method("getAttribute", "RspObject")
S3method("getAttributes", "RspObject")
S3method("hasAttribute", "RspObject")
S3method("print", "RspObject")
S3method("setAttribute", "RspObject")
S3method("setAttributes", "RspObject")

# RspPage
S3method("getAbsolutePath", "RspPage")
S3method("getName", "RspPage")
S3method("getPath", "RspPage")

# RspPageDirective
S3method("getType", "RspPageDirective")

# RspParser
S3method("parse", "RspParser")
S3method("parseRaw", "RspParser")

# RspPreprocessingException
S3method("getItem", "RspPreprocessingException")
S3method("getMessage", "RspPreprocessingException")

# RspProduct
S3method("findProcessor", "RspProduct")
S3method("getMetadata", "RspProduct")
S3method("getType", "RspProduct")
S3method("hasProcessor", "RspProduct")
S3method("print", "RspProduct")
S3method("process", "RspProduct")
S3method("view", "RspProduct")

# RspResponse
S3method("flush", "RspResponse")
S3method("import", "RspResponse")
S3method("write", "RspResponse")

# RspRSourceCode
S3method("evaluate", "RspRSourceCode")
S3method("findProcessor", "RspRSourceCode")
S3method("parse", "RspRSourceCode")
S3method("rcat", "RspRSourceCode")
S3method("rfile", "RspRSourceCode")
S3method("rsource", "RspRSourceCode")
S3method("tangle", "RspRSourceCode")
S3method("tidy", "RspRSourceCode")

# RspRSourceCodeFactory
S3method("exprToCode", "RspRSourceCodeFactory")
S3method("getCompleteCode", "RspRSourceCodeFactory")

# RspShSourceCode
S3method("evaluate", "RspShSourceCode")
S3method("findProcessor", "RspShSourceCode")

# RspShSourceCodeFactory
S3method("exprToCode", "RspShSourceCodeFactory")

# RspSourceCode
S3method("evaluate", "RspSourceCode")
S3method("print", "RspSourceCode")
S3method("rstring", "RspSourceCode")
S3method("tangle", "RspSourceCode")
S3method("tidy", "RspSourceCode")

# RspSourceCodeFactory
S3method("exprToCode", "RspSourceCodeFactory")
S3method("getCompleteCode", "RspSourceCodeFactory")
S3method("getLanguage", "RspSourceCodeFactory")
S3method("makeSourceCode", "RspSourceCodeFactory")
S3method("toSourceCode", "RspSourceCodeFactory")

# RspString
S3method("evaluate", "RspString")
S3method("getMetadata", "RspString")
S3method("getSource", "RspString")
S3method("getType", "RspString")
S3method("nbrOfLines", "RspString")
S3method("parse", "RspString")
S3method("print", "RspString")
S3method("rcat", "RspString")
S3method("rclean", "RspString")
S3method("rcompile", "RspString")
S3method("rfile", "RspString")
S3method("rscript", "RspString")
S3method("rsource", "RspString")
S3method("rstring", "RspString")
S3method("toR", "RspString")

# RspStringProduct
S3method("as.character", "RspStringProduct")
S3method("print", "RspStringProduct")

# RspText
S3method("asRspString", "RspText")
S3method("getContent", "RspText")
S3method("getInclude", "RspText")

# RspUnparsedDirective
S3method("asRspString", "RspUnparsedDirective")
S3method("parse", "RspUnparsedDirective")

# RspUnparsedExpression
S3method("parse", "RspUnparsedExpression")

# RspVariableDirective
S3method("getInclude", "RspVariableDirective")
