• Nicholas Hollingum's avatar
    borealis: Infrastructure for state management and state transitions · 3e923d48
    Nicholas Hollingum authored
    This infrastructure will hopefully form the basis of the state
    management for the borealis system. The important concepts are:
     - State is managed by manager objects, which can be in exactly two
       states (on/off)
     - State is conceptualized with state objects, that are constructed or
       destroyed during state transitions, based on what those transitions
       are defined as.
     - The state manager owns the instance of the state object, so we force
       designs that work a bit like an onion/stack in the sense that
       if state C is a descendant of P then we model this by having P own
       the *state manager* for C (as opposed to having C own/inherit/extend
       P itself).
    
    Bug: b/172178036
    Change-Id: I2b065f71972d11e3212509f2f4c569e598ca9c41
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2526865Reviewed-by: default avatarDavid Munro <davidmunro@google.com>
    Reviewed-by: default avatarDaniel Ng <danielng@google.com>
    Commit-Queue: Nic Hollingum <hollingum@google.com>
    Cr-Commit-Position: refs/heads/master@{#830784}
    3e923d48
state_manager.h 6.78 KB