Package ghidra.program.model.data
Interface DataTypeWithCharset
-
- All Superinterfaces:
DataType
- All Known Implementing Classes:
AbstractStringDataType
,CharDataType
,PascalString255DataType
,PascalStringDataType
,PascalUnicodeDataType
,SignedCharDataType
,StringDataType
,StringUTF8DataType
,TerminatedStringDataType
,TerminatedUnicode32DataType
,TerminatedUnicodeDataType
,Unicode32DataType
,UnicodeDataType
,UnsignedCharDataType
,WideChar16DataType
,WideChar32DataType
,WideCharDataType
public interface DataTypeWithCharset extends DataType
-
-
Field Summary
-
Fields inherited from interface ghidra.program.model.data.DataType
CONFLICT_SUFFIX, DEFAULT, NO_LAST_CHANGE_TIME, NO_SOURCE_SYNC_TIME, VOID
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default byte[]
encodeCharacterRepresentation(java.lang.String repr, MemBuffer buf, Settings settings)
Utility for character data types to encode a representation.default byte[]
encodeCharacterValue(java.lang.Object value, MemBuffer buf, Settings settings)
Utility for character data types to encode a value.default java.lang.String
getCharsetName(Settings settings)
Get the character set for a specific data type and settings-
Methods inherited from interface ghidra.program.model.data.DataType
addParent, clone, copy, dataTypeAlignmentChanged, dataTypeDeleted, dataTypeNameChanged, dataTypeReplaced, dataTypeSizeChanged, dependsOn, encodeRepresentation, encodeValue, getAlignment, getCategoryPath, getDataOrganization, getDataTypeManager, getDataTypePath, getDefaultAbbreviatedLabelPrefix, getDefaultLabelPrefix, getDefaultLabelPrefix, getDefaultOffcutLabelPrefix, getDefaultSettings, getDescription, getDisplayName, getDocs, getLastChangeTime, getLastChangeTimeInSourceArchive, getLength, getMnemonic, getName, getParents, getPathName, getRepresentation, getSettingsDefinitions, getSourceArchive, getUniversalID, getValue, getValueClass, hasLanguageDependantLength, isDeleted, isEncodable, isEquivalent, isNotYetDefined, isZeroLength, removeParent, replaceWith, setCategoryPath, setDefaultSettings, setDescription, setLastChangeTime, setLastChangeTimeInSourceArchive, setName, setNameAndCategory, setSourceArchive
-
-
-
-
Method Detail
-
encodeCharacterValue
default byte[] encodeCharacterValue(java.lang.Object value, MemBuffer buf, Settings settings) throws DataTypeEncodeException
Utility for character data types to encode a value.- Parameters:
value
- the character value to encode.buf
- a buffer representing the eventual destination of the bytes.settings
- the settings to use.- Returns:
- the encoded value
- Throws:
DataTypeEncodeException
- if the value cannot be encoded
-
encodeCharacterRepresentation
default byte[] encodeCharacterRepresentation(java.lang.String repr, MemBuffer buf, Settings settings) throws DataTypeEncodeException
Utility for character data types to encode a representation.- Parameters:
repr
- the single-character string to encode.buf
- a buffer representing the eventual destination of the bytes.settings
- the settings to use.- Returns:
- the encoded value
- Throws:
DataTypeEncodeException
- if the value cannot be encoded
-
getCharsetName
default java.lang.String getCharsetName(Settings settings)
Get the character set for a specific data type and settings- Parameters:
settings
- data instance settings- Returns:
- Charset for this datatype and settings
-
-