Module: BinData::Framework

Included in:
Base
Defined in:
lib/bindata/framework.rb

Overview

All methods provided by the framework are to be implemented or overridden by subclasses of BinData::Base.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



8
9
10
# File 'lib/bindata/framework.rb', line 8

def self.included(base) #:nodoc:
  base.extend ClassMethods
end

Instance Method Details

#assign(val) ⇒ Object

Assigns the value of val to this data object. Note that val must always be deep copied to ensure no aliasing problems can occur.

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/bindata/framework.rb', line 40

def assign(val)
  raise NotImplementedError
end

#clear?Boolean

Returns true if the object has not been changed since creation.

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


34
35
36
# File 'lib/bindata/framework.rb', line 34

def clear?
  raise NotImplementedError
end

#debug_name_of(child) ⇒ Object

Returns the debug name of child. This only needs to be implemented by objects that contain child objects.



51
52
53
# File 'lib/bindata/framework.rb', line 51

def debug_name_of(child) #:nodoc:
  debug_name
end

#offset_of(child) ⇒ Object

Returns the offset of child. This only needs to be implemented by objects that contain child objects.



57
58
59
# File 'lib/bindata/framework.rb', line 57

def offset_of(child) #:nodoc:
  0
end

#snapshotObject

Returns a snapshot of this data object.

Raises:

  • (NotImplementedError)


45
46
47
# File 'lib/bindata/framework.rb', line 45

def snapshot
  raise NotImplementedError
end