Debian Codegraph @

src/uk/me/parabola/imgfmt/mdxfmt/MapInfo.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2009.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 or
6 * version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13 package uk.me.parabola.imgfmt.mdxfmt;
14
15 import java.nio.ByteBuffer;
16
17 /**
18 * Represents an individual file in the MDX file.
19 *
20 * I don't really understand the difference between what I call hex mapname
21 * and mapname. We shall always make them equal.
22 *
23 * There is no good reason to call it 'hexMapname' its just a name that stuck
24 * I still don't know what the difference is. We always make them the same
25 * but they can differ.
26 */
27 public class MapInfo {
28 private int hexMapname;
29 private int mapname;
30 private char familyId;
31 private char productId;
32
33 private String filename;
34
35 void write(ByteBuffer os) {
36 os.putInt(hexMapname);
37 os.putChar(productId);
38 os.putChar(familyId);
39 os.putInt(mapname);
40 }
41
42 public int getHexMapname() {
43 return hexMapname;
44 }
45
46 public void setHexMapname(int hexMapname) {
47 this.hexMapname = hexMapname;
48 }
49
50 public void setMapname(int mapname) {
51 this.mapname = mapname;
52 }
53
54 public void setFamilyId(char familyId) {
55 this.familyId = familyId;
56 }
57
58 public void setProductId(char productId) {
59 this.productId = productId;
60 }
61
62 public int getMapname() {
63 return mapname;
64 }
65
66 public String getFilename() {
67 return filename;
68 }
69
70 public void setFilename(String filename) {
71 this.filename = filename;
72 }
73 }