This repository has been archived on 2020-12-30. You can view files and clone it, but cannot push or open issues or pull requests.
NetworkPacketComposer/doc/core.md

2.6 KiB

core


set namespaceSeparator ::

namespace core {
  class BinaryPacketComposer
  class RandomAccessBinary
  class Tree
  class TreeNode
  interface YAMLSerializer {
    + string toYAML()
    + void fromYAML(string yaml)
  }
  interface JSONSerializer {
    + string toJSON()
    + void fromJSON(string json)
  }

  namespace control {
    class ModelController{
      - Model[] currentModels
    }
    class RepositoryController
    class DataController
    class FieldFactory
    class ModelFactory
    class StructureFactory
  }
  namespace model {
    class Model {
      - Structure[] structures
      - Tree<Field> combinedFields
      - RandomAccessBinary data
    }
    class Generator
    class Repository {
      - Structure[] availableStructures
    }
    class Structure{
      - String name
      - String description
      - Tree<Field> fields
    }
    class Field {
      - String name
      - String description
    }
    class ValueField {
      - String hexvalue
      - uint bitsize
    }
    class CombinationField {
      // - list<Field> otherFields
    }
    class ValidateableValueField {
      - Validator validator
    }
    class RegexValueField {
      - String regex
    }
    class GeneratedField {
      - Generator gen
    }
    class LayerTransitionField {
      // placeholder for nesting
      // structures inside structures
    }
    class Validator {

    }
    class RegexValidator {

    }
  }

  core::Tree *-- core::TreeNode
  core::model::Field <|-- core::model::ValueField
  core::model::ValueField <|-- core::model::ValidateableValueField
  core::model::Field <|-- core::model::CombinationField
  core::model::ValidateableValueField <|-- core::model::RegexValueField
  core::model::ValidateableValueField <|-- core::model::GeneratedField
  core::model::RegexValueField *-- core::model::RegexValidator
  core::model::Validator <|-- core::model::RegexValidator
  core::model::GeneratedField *-- core::model::Generator
  core::model::Field <|-- core::model::LayerTransitionField
  core::model::Repository o-- core::model::Structure
  core::model::Model o-- core::model::Structure
  core::model::Model o-up- core::RandomAccessBinary
  core::model::Model <-- core::control::ModelController : controls
  core::model::Repository <-- core::control::RepositoryController : controls
  core::control::ModelFactory --> core::model::Model : creates
  core::control::FieldFactory --> core::model::Field : creates all Variants
  core::control::StructureFactory --> core::model::Structure : creates
  core::YAMLSerializer <|--- core::model : all classes implement
  core::JSONSerializer <|--- core::model : all classes implement
}