116 lines
2.3 KiB
Markdown
116 lines
2.3 KiB
Markdown
# NPC
|
|
|
|
```plantuml
|
|
|
|
package Core {
|
|
|
|
package Control {
|
|
class RepositoryFactory
|
|
class ModelFactory
|
|
class StructureFactory
|
|
class FieldFactory{
|
|
+ createField()
|
|
}
|
|
}
|
|
|
|
package Model as PKGmodel {
|
|
class Repository {
|
|
+addStructure()
|
|
+removeStructure()
|
|
+getStructure()
|
|
}
|
|
class Model {
|
|
+getBinary():byte[]
|
|
+getStructures():Structure[]
|
|
+addStructure()
|
|
+removeStructure()
|
|
}
|
|
class Structure {
|
|
-name
|
|
-description
|
|
-fields
|
|
-data
|
|
+putData(Field, data)
|
|
+validateData(Field, data)
|
|
+updateData()
|
|
}
|
|
class Field {
|
|
- owningStructure
|
|
- binary
|
|
- logical
|
|
- visual
|
|
- representation
|
|
}
|
|
}
|
|
|
|
}
|
|
package Editor {
|
|
class MainWindow
|
|
class DockWidget_Tools
|
|
class DockWidget_Helpers
|
|
class StackContainer
|
|
class Syntax
|
|
class Name
|
|
class Input
|
|
class Representation
|
|
class StructureField
|
|
|
|
StructureField *-- Syntax
|
|
StructureField *-- Name
|
|
StructureField *-- Input
|
|
StructureField *-- Representation
|
|
|
|
MainWindow *- StackContainer: as centralWidget
|
|
}
|
|
|
|
|
|
|
|
class RandomAccessBinary {
|
|
- binaryData
|
|
+ setBytes(uint position, std::vector<uint8_t> data)
|
|
+ setByte(uint position, uint8_t data)
|
|
|
|
+ setBit(uint64_t position, bool value)
|
|
+ setBit(uint bytePosition, uint bitPosition, bool value)
|
|
+ setBits(uint64_t position, uint bits, uint value)
|
|
+ setBits(uint bytePosition, uint bitPosition, uint bits, uint value)
|
|
|
|
+ getByte(uint position)
|
|
+ getBytes(uint position, uint bytes)
|
|
|
|
+ getBit(uint64_t position)
|
|
+ getBit(uint bytePosition, uint bitPosition)
|
|
+ getBits(uint64_t position, uint bits)
|
|
+ getBits(uint bytePosition, uint bitPosition, uint bits)
|
|
|
|
+ get_uint32(uint position)
|
|
+ get_uint16(uint position)
|
|
+ get_uint64(uint position)
|
|
+ get_float(uint position)
|
|
+ get_double(uint position)
|
|
|
|
+ get_string(uint position, uint length)
|
|
|
|
+ get_hex_string(uint position, uint length)
|
|
+ get_hex_string()
|
|
}
|
|
|
|
RepositoryFactory --> Repository : creates >
|
|
|
|
ModelFactory -> Model: creates >
|
|
|
|
StructureFactory -> Structure : creates >
|
|
Model *- Structure
|
|
Repository *- Structure
|
|
|
|
FieldFactory -> Field : creates >
|
|
|
|
Structure *- Field
|
|
|
|
Model *-- "1" RandomAccessBinary
|
|
|
|
StructureField *-- Field
|
|
StackContainer *-- StructureField
|
|
|
|
```
|