summaryrefslogtreecommitdiffstats
path: root/depends/libnbtplusplus/PRD.md
blob: f7b46f1a8a6265eb8640fbd6bf2db4bdaebc90da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# libnbt++2 Product Requirements Document

### Purpose
Provide a C++ interface for working with NBT data, particularly originating
from Minecraft.

### Scope
External Minecraft utilities that read or manipulate parts of savefiles,
such as:
- (Graphical) NBT editors
- Inventory editors
- Tools for reading or changing world metadata
- Map editors and visualizers

### Definitions, Acronyms and Abbreviations
- **libnbt++1:** The predecessor of libnbt++2.
- **Minecraft:** A sandbox voxel world game written in Java, developed by
  Mojang.
- **Mojang's implementation:** The NBT library written in Java that Mojang
  uses in Minecraft.
- **NBT:** Named Binary Tag. A binary serialization format used by Minecraft.
- **Tag:** A data unit in NBT. Can be a number, string, array, list or
  compound.

### Product Functions
- /RF10/ Reading and writing NBT data files/streams with or without
  compression.
- /RF20/ Representing NBT data in memory and allowing programs to read or
  manipulate it in all the ways that Mojang's implementation and libnbt++1
  provide.
- /RF30/ A shorter syntax than in libnbt++1 and preferrably also Mojang's
  implementation.
- /RF35/ Typesafe operations (no possibly unwanted implicit casts), in case
  of incompatible types exceptions should be thrown.
- /RF40/ The need for insecure operations and manual memory management should
  be minimized; references and `std::unique_ptr` should be preferred before
  raw pointers.
- /RF55/ A wrapper for tags that provides syntactic sugar is preferred
  before raw `std::unique_ptr` values.
- /RF50/ Move semantics are preferred before copy semantics.
- /RF55/ Copying tags should be possible, but only in an explicit manner.
- /RF60/ Checked conversions are preferred, unchecked conversions may be
  possible but discouraged.

### Product Performance
- /RP10/ All operations on (not too large) NBT data should not be slower
  than their counterparts in Mojang's implementation.
- /RP20/ The library must be able to handle all possible NBT data that
  Mojang's implementation can create and handle.
- /RP30/ Often used operations on large Lists, Compounds and Arrays must
  be of at most O(log n) time complexity if reasonable. Other operations
  should be at most O(n).

### Quality Requirements
- Functionality: good
- Reliability: normal
- Usability: very good
- Efficiency: good
- Changeability: normal
- Transferability: normal