All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ossuminc.riddl.command.TranslationCommand.scala Maven / Gradle / Ivy

There is a newer version: 0.52.1
Show newest version
/*
 * Copyright 2019 Ossum, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */
package com.ossuminc.riddl.command

import com.ossuminc.riddl.language.AST.*
import com.ossuminc.riddl.passes.translate.TranslatingOptions
import com.ossuminc.riddl.utils.{OutputFile, Timer}

import java.nio.file.Path
import scala.collection.mutable
import scala.reflect.ClassTag


object TranslationCommand {
  trait Options extends TranslatingOptions with PassCommandOptions {
    def inputFile: Option[Path]

    def outputDir: Option[Path]

    def projectName: Option[String]
  }
}

/** An abstract base class for translation style commands. That is, they translate an input file into an output
  * directory of files.
  *
  * @param name
  *   The name of the command to pass to [[Command]]
  * @tparam OPT
  *   The option type for the command
  */
abstract class TranslationCommand[OPT <: TranslationCommand.Options: ClassTag](name: String)
    extends PassCommand[OPT](name) {}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy