Package ghidra.app.util.exporter
Class CppExporter
- java.lang.Object
-
- ghidra.app.util.exporter.Exporter
-
- ghidra.app.util.exporter.CppExporter
-
- All Implemented Interfaces:
ExtensionPoint
public class CppExporter extends Exporter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CREATE_C_FILE
static java.lang.String
CREATE_HEADER_FILE
static java.lang.String
EMIT_TYPE_DEFINITONS
static java.lang.String
FUNCTION_TAG_EXCLUDE
static java.lang.String
FUNCTION_TAG_FILTERS
static java.lang.String
USE_CPP_STYLE_COMMENTS
-
Fields inherited from class ghidra.app.util.exporter.Exporter
EMPTY_OPTIONS, log, provider
-
-
Constructor Summary
Constructors Constructor Description CppExporter()
CppExporter(boolean createHeader, boolean createFile, boolean emitTypes, boolean excludeTags, java.lang.String tags)
CppExporter(DecompileOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
export(java.io.File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor)
Actually does the work of exporting the program.java.util.List<Option>
getOptions(DomainObjectService domainObjectService)
Returns the available options for this exporter.void
setOptions(java.util.List<Option> options)
Sets the options.-
Methods inherited from class ghidra.app.util.exporter.Exporter
canExportDomainObject, getDefaultFileExtension, getHelpLocation, getMessageLog, getName, setExporterServiceProvider, supportsPartialExport, toString
-
-
-
-
Field Detail
-
CREATE_C_FILE
public static final java.lang.String CREATE_C_FILE
- See Also:
- Constant Field Values
-
CREATE_HEADER_FILE
public static final java.lang.String CREATE_HEADER_FILE
- See Also:
- Constant Field Values
-
USE_CPP_STYLE_COMMENTS
public static final java.lang.String USE_CPP_STYLE_COMMENTS
- See Also:
- Constant Field Values
-
EMIT_TYPE_DEFINITONS
public static final java.lang.String EMIT_TYPE_DEFINITONS
- See Also:
- Constant Field Values
-
FUNCTION_TAG_FILTERS
public static final java.lang.String FUNCTION_TAG_FILTERS
- See Also:
- Constant Field Values
-
FUNCTION_TAG_EXCLUDE
public static final java.lang.String FUNCTION_TAG_EXCLUDE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CppExporter
public CppExporter()
-
CppExporter
public CppExporter(DecompileOptions options)
-
CppExporter
public CppExporter(boolean createHeader, boolean createFile, boolean emitTypes, boolean excludeTags, java.lang.String tags)
-
-
Method Detail
-
export
public boolean export(java.io.File file, DomainObject domainObj, AddressSetView addrSet, TaskMonitor monitor) throws java.io.IOException, ExporterException
Description copied from class:Exporter
Actually does the work of exporting the program.- Specified by:
export
in classExporter
- Parameters:
file
- the output file to write the exported infodomainObj
- the domain object to exportaddrSet
- the address set if only a portion of the program should be exportedmonitor
- the task monitor- Returns:
- true if the program was successfully exported; otherwise, false. If the program was not successfully exported, the message log should be checked to find the source of the error.
- Throws:
java.io.IOException
ExporterException
-
getOptions
public java.util.List<Option> getOptions(DomainObjectService domainObjectService)
Description copied from class:Exporter
Returns the available options for this exporter. The program is needed because some exporters may have options that vary depending on the specific program being exported.- Specified by:
getOptions
in classExporter
- Parameters:
domainObjectService
- a service for retrieving the applicable domainObject.- Returns:
- the available options for this exporter
-
setOptions
public void setOptions(java.util.List<Option> options) throws OptionException
Description copied from class:Exporter
Sets the options. This method is not for defining the options, but rather it is for setting the values of options. If invalid options are passed in, then OptionException should be thrown.- Specified by:
setOptions
in classExporter
- Parameters:
options
- the option values for this exporter- Throws:
OptionException
- if invalid options are passed in
-
-