module BinData::Framework

def self.included(base) #:nodoc:

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

def assign(val)

always be deep copied to ensure no aliasing problems can occur.
Assigns the value of +val+ to this data object. Note that +val+ must
def assign(val)
  raise NotImplementedError
end

def clear?

Returns true if the object has not been changed since creation.
def clear?
  raise NotImplementedError
end

def debug_name_of(child) #:nodoc:

:nodoc:
by objects that contain child objects.
Returns the debug name of +child+. This only needs to be implemented
def debug_name_of(child) #:nodoc:
  debug_name
end

def do_num_bytes #:nodoc:

:nodoc:
Returns the number of bytes it will take to write this data.
def do_num_bytes #:nodoc:
  raise NotImplementedError
end

def do_read(io) #:nodoc:

:nodoc:
Reads the data for this data object from +io+.
def do_read(io) #:nodoc:
  raise NotImplementedError
end

def do_write(io) #:nodoc:

:nodoc:
Writes the value for this data to +io+.
def do_write(io) #:nodoc:
  raise NotImplementedError
end

def initialize_instance

are used by the object must be initialized here.
Initializes the state of the object. All instance variables that
def initialize_instance
end

def initialize_shared_instance

This method is called only once for a particular set of parameters.
between all objects that are initialized with the same parameters.
variables set here, and changes to the singleton class will be shared
This should only be used when optimising for performance. Instance

Initialises state that is shared by objects with the same parameters.
def initialize_shared_instance
end

def offset_of(child) #:nodoc:

:nodoc:
by objects that contain child objects.
Returns the offset of +child+. This only needs to be implemented
def offset_of(child) #:nodoc:
  0
end

def snapshot

Returns a snapshot of this data object.
def snapshot
  raise NotImplementedError
end