Interface CCompilerInvoker

All Superinterfaces:
MessagingToolInvoker, ToolInvoker

public interface CCompilerInvoker extends MessagingToolInvoker
An invoker for a C compiler.
  • Method Details

    • addIncludePath

      void addIncludePath(Path path)
      Add an include path.
      Parameters:
      path - the include path to add (must not be null)
    • addIncludePaths

      default void addIncludePaths(Iterable<Path> paths)
      Add all the given include paths.
      Parameters:
      paths - the include paths to add (must not be null)
    • getIncludePathCount

      int getIncludePathCount()
      Get the number of include paths defined.
      Returns:
      the number of include paths
    • getIncludePath

      Path getIncludePath(int index) throws IndexOutOfBoundsException
      Get the include path at the given index.
      Parameters:
      index - the index
      Returns:
      the include path
      Throws:
      IndexOutOfBoundsException - if the index is out of bounds
    • addDefinedSymbol

      default void addDefinedSymbol(String name)
      Define a symbol to the C compiler to "1".
      Parameters:
      name - the symbol to define (must not be null)
    • addDefinedSymbol

      void addDefinedSymbol(String name, String value)
      Define a symbol to the C compiler.
      Parameters:
      name - the symbol to define (must not be null)
      value - the value to give to the defined symbol (must not be null)
    • getDefinedSymbolCount

      int getDefinedSymbolCount()
      Get the number of defined symbols.
      Returns:
      the number of defined symbols
    • getDefinedSymbol

      String getDefinedSymbol(int index) throws IndexOutOfBoundsException
      Get the defined symbol at the given index.
      Parameters:
      index - the index
      Returns:
      the defined symbol
      Throws:
      IndexOutOfBoundsException - if the index is out of bounds
    • getDefinedSymbolValue

      String getDefinedSymbolValue(int index) throws IndexOutOfBoundsException
      Get the defined symbol value.
      Parameters:
      index - the index
      Returns:
      the defined symbol value
      Throws:
      IndexOutOfBoundsException - if the index is out of bounds
    • setSource

      void setSource(InputSource source)
      Set the input source for the C program.
      Parameters:
      source - the input source (must not be null)
    • getSource

      InputSource getSource()
      Get the input source for the C program.
      Returns:
      the input source (not null)
    • setOutputPath

      void setOutputPath(Path path)
      Set the object file output path.
      Parameters:
      path - the output path (must not be null)
    • getSourceLanguage

      CCompilerInvoker.SourceLanguage getSourceLanguage()
    • setSourceLanguage

      void setSourceLanguage(CCompilerInvoker.SourceLanguage sourceLanguage)
    • getOutputPath

      Path getOutputPath() throws IllegalArgumentException
      Get the object file output path.
      Returns:
      the output path
      Throws:
      IllegalArgumentException - if the output path has not been set