Class: BMFF::Box::Map

Inherits:
Object
  • Object
show all
Defined in:
lib/bmff/box/map.rb

Overview

vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:

Constant Summary collapse

@@map =
{}
@@uuid_map =
{}

Class Method Summary collapse

Class Method Details

.get_box_class(type) ⇒ Object



13
14
15
# File 'lib/bmff/box/map.rb', line 13

def get_box_class(type)
  @@map[type]
end

.get_uuid_box_class(uuid) ⇒ Object



21
22
23
# File 'lib/bmff/box/map.rb', line 21

def get_uuid_box_class(uuid)
  @@uuid_map[uuid.to_s]
end

.register_box(type, klass) ⇒ Object



9
10
11
# File 'lib/bmff/box/map.rb', line 9

def register_box(type, klass)
  @@map[type] = klass
end

.register_uuid_box(uuid, klass) ⇒ Object



17
18
19
# File 'lib/bmff/box/map.rb', line 17

def register_uuid_box(uuid, klass)
  @@uuid_map[UUIDTools::UUID.parse(uuid).to_s] = klass
end