Class: GBTiles::GBM::Map::Objects::Map
- Inherits:
-
GBTiles::GBM::Map::Object
- Object
- GBTiles::GBM::Map::Object
- GBTiles::GBM::Map::Objects::Map
- Defined in:
- lib/gbtiles/gbm/map/objects/map.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#name ⇒ Object
Returns the value of attribute name.
-
#prop_color_count ⇒ Object
Returns the value of attribute prop_color_count.
-
#prop_count ⇒ Object
Returns the value of attribute prop_count.
-
#tile_count ⇒ Object
Returns the value of attribute tile_count.
-
#tile_file ⇒ Object
Returns the value of attribute tile_file.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from GBTiles::GBM::Map::Object
#master_id, #object_id, #object_type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Map
constructor
A new instance of Map.
Constructor Details
#initialize ⇒ Map
Returns a new instance of Map.
15 16 17 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 15 def initialize super GBTiles::GBM::Map::OBJECT_TYPE[:map] end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
9 10 11 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 9 def height @height end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 7 def name @name end |
#prop_color_count ⇒ Object
Returns the value of attribute prop_color_count.
13 14 15 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 13 def prop_color_count @prop_color_count end |
#prop_count ⇒ Object
Returns the value of attribute prop_count.
10 11 12 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 10 def prop_count @prop_count end |
#tile_count ⇒ Object
Returns the value of attribute tile_count.
12 13 14 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 12 def tile_count @tile_count end |
#tile_file ⇒ Object
Returns the value of attribute tile_file.
11 12 13 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 11 def tile_file @tile_file end |
#width ⇒ Object
Returns the value of attribute width.
8 9 10 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 8 def width @width end |
Class Method Details
.initFromBitString(src) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gbtiles/gbm/map/objects/map.rb', line 19 def self.initFromBitString src object = GBTiles::GBM::Map::Objects::Map.new object.name = GBTiles::DataType.string!(src, 128) object.width = GBTiles::DataType.long!(src) object.height = GBTiles::DataType.long!(src) object.prop_count = GBTiles::DataType.long!(src) object.tile_file = GBTiles::DataType.string!(src, 256) object.tile_count = GBTiles::DataType.long!(src) object.prop_color_count = GBTiles::DataType.long!(src) object end |