# only when we have src code
# useDynLib("lavaan")

importFrom("stats", 
           coef,
           residuals, resid,
           fitted.values, fitted,
           predict,
           update,
           anova,
           vcov)

# AIC and friends...
if(getRversion() >= "2.13.0") {
    importFrom("stats4",AIC, BIC, logLik, nobs)
    export(logLik, nobs) # not AIC, BIC?
} else {
    importFrom("stats4",AIC, BIC, logLik)
    export(logLik, BIC, nobs) # not AIC?
}


# export ordinary functions defined in this package
export("lavaan", "cfa", "sem", "growth",
       # new name           # old name
       "lavParTable",       "lavaanify",
       "lavNames",          "lavaanNames",
       "lavParseModelString", # "parseModelString",
       # utilities
       "getCov", "char2num", "cor2cov",
       "vech", "vech.reverse", "vechru", "vechru.reverse", "lower2full",
       "vechr", "vechr.reverse", "vechu", "vechu.reverse", "upper2full", 
       "duplicationMatrix", "commutationMatrix",
       "sqrtSymmetricMatrix",
       "modindices", "modificationIndices", "modificationindices",
       "standardizedSolution", "standardizedsolution",
       "parameterEstimates", "parameterestimates",
       "parameterTable", "parametertable", "parTable", "partable",
       "varTable", "vartable",
       "fitMeasures", "fitmeasures",
       "inspectSampleCov",
       "bootstrapLavaan", "bootstrapLRT", "InformativeTesting",
       "simulateData",
       "estfun.lavaan", "lavScores",
       "lavTables", 
       "lavExport",
       "lavMatrixRepresentation",
       "mplus2lavaan"
      )

# export Classes
exportClasses(
              "lavaan"
             )

# export Methods
exportMethods(
              "predict", 
              "update",
              "anova",
              "coef",
              "residuals", "resid",
              "vcov", 
              "logLik",
              "fitted.values", "fitted",
              "summary",
              "inspect"
             )

S3method(print, lavaan.data.frame)
S3method(print, lavaan.matrix)
S3method(print, lavaan.matrix.symmetric)
S3method(print, lavaan.vector)
S3method(pairs, lavaan)
S3method(print, InformativeTesting)
S3method(plot, InformativeTesting)
#S3method(summary, lavaan.boot)
