Class DataTypeWriter


  • public class DataTypeWriter
    extends java.lang.Object
    A class used to convert data types into ANSI-C. The ANSI-C code should compile on most platforms.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(Category category, TaskMonitor monitor)
      Converts all data types in the category into ANSI-C code.
      void write​(DataType[] dataTypes, TaskMonitor monitor)
      Converts all data types in the array into ANSI-C code.
      void write​(DataTypeManager dataTypeManager, TaskMonitor monitor)
      Converts all data types in the data type manager into ANSI-C code.
      void write​(java.util.List<DataType> dataTypes, TaskMonitor monitor)
      Converts all data types in the list into ANSI-C code.
      void write​(java.util.List<DataType> dataTypes, TaskMonitor monitor, boolean throwExceptionOnInvalidType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataTypeWriter

        public DataTypeWriter​(DataTypeManager dtm,
                              java.io.Writer writer)
                       throws java.io.IOException
        Constructs a new instance of this class using the given writer. The default annotation handler is used.
        Parameters:
        dtm - data-type manager corresponding to target program or null for default
        writer - the writer to use when writing data types
        Throws:
        java.io.IOException - if there is an exception writing the output
      • DataTypeWriter

        public DataTypeWriter​(DataTypeManager dtm,
                              java.io.Writer writer,
                              boolean cppStyleComments)
                       throws java.io.IOException
        Constructs a new instance of this class using the given writer. The default annotation handler is used.
        Parameters:
        dtm - data-type manager corresponding to target program or null for default
        writer - the writer to use when writing data types
        cppStyleComments - whether to use C++ style comments
        Throws:
        java.io.IOException - if there is an exception writing the output
      • DataTypeWriter

        public DataTypeWriter​(DataTypeManager dtm,
                              java.io.Writer writer,
                              AnnotationHandler annotator)
                       throws java.io.IOException
        Constructs a new instance of this class using the given writer and annotation handler
        Parameters:
        dtm - data-type manager corresponding to target program or null for default
        writer - the writer to use when writing data types
        annotator - the annotation handler to use to annotate the data types
        Throws:
        java.io.IOException - if there is an exception writing the output
      • DataTypeWriter

        public DataTypeWriter​(DataTypeManager dtm,
                              java.io.Writer writer,
                              AnnotationHandler annotator,
                              boolean cppStyleComments)
                       throws java.io.IOException
        Constructs a new instance of this class using the given writer and annotation handler
        Parameters:
        dtm - data-type manager corresponding to target program or null for default
        writer - the writer to use when writing data types
        annotator - the annotation handler to use to annotate the data types
        cppStyleComments - whether to use C++ style comments
        Throws:
        java.io.IOException - if there is an exception writing the output
    • Method Detail

      • write

        public void write​(DataTypeManager dataTypeManager,
                          TaskMonitor monitor)
                   throws java.io.IOException,
                          CancelledException
        Converts all data types in the data type manager into ANSI-C code.
        Parameters:
        dataTypeManager - the manager containing the data types to write
        monitor - the task monitor
        Throws:
        java.io.IOException - if there is an exception writing the output
        CancelledException - if the action is cancelled by the user
      • write

        public void write​(Category category,
                          TaskMonitor monitor)
                   throws java.io.IOException,
                          CancelledException
        Converts all data types in the category into ANSI-C code.
        Parameters:
        category - the category containing the datatypes to write
        monitor - the task monitor
        Throws:
        java.io.IOException - if there is an exception writing the output
        CancelledException - if the action is cancelled by the user
      • write

        public void write​(DataType[] dataTypes,
                          TaskMonitor monitor)
                   throws java.io.IOException,
                          CancelledException
        Converts all data types in the array into ANSI-C code.
        Parameters:
        dataTypes - the data types to write
        monitor - the task monitor
        Throws:
        java.io.IOException - if there is an exception writing the output
        CancelledException - if the action is cancelled by the user
      • write

        public void write​(java.util.List<DataType> dataTypes,
                          TaskMonitor monitor)
                   throws java.io.IOException,
                          CancelledException
        Converts all data types in the list into ANSI-C code.
        Parameters:
        dataTypes - the data types to write
        monitor - the task monitor
        Throws:
        java.io.IOException - if there is an exception writing the output
        CancelledException - if the action is cancelled by the user