Class: Relyze::ExecutableFileModel::DataTypeFactory
- Inherits:
-
Object
- Object
- Relyze::ExecutableFileModel::DataTypeFactory
- Defined in:
- C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb
Overview
The DataTypeFactory manages all data types used by a model. You can access the DataTypeFactory via #data_type_factory or for brevity we can use #dtf. Within the GUI, the Data Type Manager is a front end to the DataTypeFactory.
Class Method Summary collapse
Instance Method Summary collapse
-
#[](name_or_hash) ⇒ Relyze::ExecutableFileModel::DataType?
Get a specific data type in this data type factory.
-
#add(source, lang = :c, compat = :clang) ⇒ true, false
Add a new data type to this data type factory by describing the type via a source declaration.
-
#create_array(count, data_type) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing an array of data types.
-
#create_char_string(count) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing an 8bit char string.
-
#create_function ⇒ Relyze::ExecutableFileModel::DataType?
Create an empty FunctionDataType.
-
#create_pointer(data_type, target_type = :data, pointer_type = :va) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a pointer to a data type.
-
#create_utf16_string(count, endian = :little) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a UTF-16 string.
-
#create_utf32_string(count, endian = :little) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a UTF-32 string.
-
#create_utf8_string(count) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a UTF-8 string.
-
#create_wide_char_string(count) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a 16bit wide char string.
-
#exists?(name_or_hash) ⇒ true, false
Check if a specific data type exists in this data type factory.
-
#get(name_or_hash, source = nil, query_pch = true) ⇒ Relyze::ExecutableFileModel::DataType?
Get a data type from this data type factory, optionally adding the type via a source declaration if the type does not already exist..
- #hash_name(name) ⇒ Integer
-
#items {|data_type| ... } ⇒ Object
Get every DataType in this data type factory.
-
#unmangle_name(name) ⇒ String
Unmangle a mangled name.
-
#unmangle_type(name) ⇒ Relyze::ExecutableFileModel::DataType?
If possible, extract type information from a mangled name in order to create a DataType instance to represent the type.
Class Method Details
.hash_name(name) ⇒ Integer
75 76 77 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 75 def DataTypeFactory.hash_name( name ) return nil end |
Instance Method Details
#[](name_or_hash) ⇒ Relyze::ExecutableFileModel::DataType?
Get a specific data type in this data type factory.
152 153 154 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 152 def []( name_or_hash ) return self.get( name_or_hash ) end |
#add(source, lang = :c, compat = :clang) ⇒ true, false
Add a new data type to this data type factory by describing the type via a source declaration.
125 126 127 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 125 def add( source, lang=:c, compat=:clang ) return false end |
#create_array(count, data_type) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing an array of data types.
203 204 205 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 203 def create_array( count, data_type ) return nil end |
#create_char_string(count) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing an 8bit char string.
160 161 162 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 160 def create_char_string( count ) return nil end |
#create_function ⇒ Relyze::ExecutableFileModel::DataType?
Create an empty FunctionDataType
234 235 236 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 234 def create_function return nil end |
#create_pointer(data_type, target_type = :data, pointer_type = :va) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a pointer to a data type.
213 214 215 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 213 def create_pointer( data_type, target_type=:data, pointer_type=:va ) return nil end |
#create_utf16_string(count, endian = :little) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a UTF-16 string.
185 186 187 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 185 def create_utf16_string( count, endian=:little ) return nil end |
#create_utf32_string(count, endian = :little) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a UTF-32 string.
194 195 196 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 194 def create_utf32_string( count, endian=:little ) return nil end |
#create_utf8_string(count) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a UTF-8 string.
176 177 178 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 176 def create_utf8_string( count ) return nil end |
#create_wide_char_string(count) ⇒ Relyze::ExecutableFileModel::DataType?
Create a data type representing a 16bit wide char string.
168 169 170 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 168 def create_wide_char_string( count ) return nil end |
#exists?(name_or_hash) ⇒ true, false
Check if a specific data type exists in this data type factory.
112 113 114 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 112 def exists?( name_or_hash ) return false end |
#get(name_or_hash, source = nil, query_pch = true) ⇒ Relyze::ExecutableFileModel::DataType?
Get a data type from this data type factory, optionally adding the type via a source declaration if the type does not already exist..
136 137 138 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 136 def get( name_or_hash, source=nil, query_pch=true ) return nil end |
#hash_name(name) ⇒ Integer
85 86 87 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 85 def hash_name( name ) DataTypeFactory.hash_name( name ) end |
#items {|data_type| ... } ⇒ Object
Get every Relyze::ExecutableFileModel::DataType in this data type factory.
144 145 146 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 144 def items return [] end |
#unmangle_name(name) ⇒ String
Unmangle a mangled name. Formats supported are Microsoft, LLVM and Borland style mangled names.
94 95 96 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 94 def unmangle_name( name ) return nil end |
#unmangle_type(name) ⇒ Relyze::ExecutableFileModel::DataType?
If possible, extract type information from a mangled name in order to create a Relyze::ExecutableFileModel::DataType instance to represent the type.
104 105 106 |
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 104 def unmangle_type( name ) return nil end |