module BinData::Framework
def assign(val)
Assigns the value of +val+ to this data object. Note that +val+ must
def assign(val) raise NotImplementedError end
def clear?
def clear? raise NotImplementedError end
def debug_name_of(child) #: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:
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:
Reads the data for this data object from +io+.
def do_read(io) #:nodoc: raise NotImplementedError end
def do_write(io) #:nodoc:
Writes the value for this data to +io+.
def do_write(io) #:nodoc: raise NotImplementedError end
def initialize_instance
Initializes the state of the object. All instance variables that
def initialize_instance end
def initialize_shared_instance
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:
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
def snapshot raise NotImplementedError end