Class: Indis::Entity
- Inherits:
-
Object
- Object
- Indis::Entity
- Defined in:
- lib/indis-core/entity.rb
Overview
Entity represens an object mapped to some given bytes in the traget’s virtual address space
Direct Known Subclasses
Instance Attribute Summary collapse
-
#size ⇒ Fixnum
readonly
abstract
Entity size in bytes.
-
#tags ⇒ Hash
readonly
Cross-references and additional attributes of entity.
-
#vmaddr ⇒ Fixnum
readonly
Virtaul address of the entity.
Instance Method Summary collapse
-
#initialize(ofs) ⇒ Entity
constructor
A new instance of Entity.
- #unmap ⇒ Object
Constructor Details
#initialize(ofs) ⇒ Entity
Returns a new instance of Entity.
32 33 34 35 |
# File 'lib/indis-core/entity.rb', line 32 def initialize(ofs) @vmaddr = ofs @tags = {} end |
Instance Attribute Details
#size ⇒ Fixnum (readonly)
This method is abstract.
You must provide @size value in a subclass
Returns entity size in bytes.
28 29 30 |
# File 'lib/indis-core/entity.rb', line 28 def size @size end |
#tags ⇒ Hash (readonly)
Returns cross-references and additional attributes of entity.
30 31 32 |
# File 'lib/indis-core/entity.rb', line 30 def @tags end |
#vmaddr ⇒ Fixnum (readonly)
Returns virtaul address of the entity.
24 25 26 |
# File 'lib/indis-core/entity.rb', line 24 def vmaddr @vmaddr end |
Instance Method Details
#unmap ⇒ Object
37 38 39 40 |
# File 'lib/indis-core/entity.rb', line 37 def unmap # TODO: Reverse unmap tags @tags = nil end |